diff options
author | Bastien Nocera <hadess@hadess.net> | 2008-06-09 08:42:49 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-06-09 08:42:49 +0000 |
commit | d4e7ab0e8cf8d5dd837ab4276d5cfe14e48b0cbe (patch) | |
tree | 26c9221c8837741dcba53810d3974382eae80a67 /sys/v4l2/v4l2_calls.c | |
parent | ec7e0e7d488e7f5fc21af6b61a77cce6a5d1e3b1 (diff) |
sys/v4l2/: Fix compilation with newer GIT kernels that deprecated
Original commit message from CVS:
Patch by: Bastien Nocera <hadess at hadess dot net>
* sys/v4l2/gstv4l2vidorient.c:
* sys/v4l2/v4l2_calls.c: (gst_v4l2_fill_lists):
Fix compilation with newer GIT kernels that deprecated
V4L2_CID_HCENTER and V4L2_CID_VCENTER. Fixes bug #536317.
Diffstat (limited to 'sys/v4l2/v4l2_calls.c')
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index e22678ce..891428bd 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -45,6 +45,14 @@ #include "gstv4l2src.h" +/* Those are ioctl calls */ +#ifndef V4L2_CID_HCENTER +#define V4L2_CID_HCENTER V4L2_CID_HCENTER_DEPRECATED +#endif +#ifndef V4L2_CID_VCENTER +#define V4L2_CID_VCENTER V4L2_CID_VCENTER_DEPRECATED +#endif + GST_DEBUG_CATEGORY_EXTERN (v4l2_debug); #define GST_CAT_DEFAULT v4l2_debug @@ -97,6 +105,7 @@ static gboolean gst_v4l2_fill_lists (GstV4l2Object * v4l2object) { gint n; + GstElement *e; e = v4l2object->element; @@ -109,6 +118,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) for (n = 0;; n++) { struct v4l2_input input = { 0, }; GstV4l2TunerChannel *v4l2channel; + GstTunerChannel *channel; input.index = n; @@ -177,6 +187,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) for (n = 0;; n++) { struct v4l2_standard standard = { 0, }; GstV4l2TunerNorm *v4l2norm; + GstTunerNorm *norm; /* fill in defaults */ @@ -216,6 +227,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) for (n = V4L2_CID_BASE;; n++) { struct v4l2_queryctrl control = { 0, }; GstV4l2ColorBalanceChannel *v4l2channel; + GstColorBalanceChannel *channel; /* when we reached the last official CID, continue with private CIDs */ @@ -267,6 +279,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) case V4L2_CID_VFLIP: case V4L2_CID_HCENTER: case V4L2_CID_VCENTER: +#ifdef V4L2_CID_PAN_RESET + case V4L2_CID_PAN_RESET: +#endif +#ifdef V4L2_CID_TILT_RESET + case V4L2_CID_TILT_RESET: +#endif /* not handled here, handled by VideoOrientation interface */ control.id++; break; @@ -297,6 +315,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) (currently none of base controls are of this type) */ if (control.type == V4L2_CTRL_TYPE_MENU) { struct v4l2_querymenu menu, *mptr; + int i; menu.id = n; @@ -557,6 +576,7 @@ gst_v4l2_get_frequency (GstV4l2Object * v4l2object, gint tunernum, gulong * frequency) { struct v4l2_frequency freq; + GstTunerChannel *channel; GST_DEBUG_OBJECT (v4l2object->element, "getting current tuner frequency"); @@ -595,6 +615,7 @@ gst_v4l2_set_frequency (GstV4l2Object * v4l2object, gint tunernum, gulong frequency) { struct v4l2_frequency freq; + GstTunerChannel *channel; GST_DEBUG_OBJECT (v4l2object->element, |