summaryrefslogtreecommitdiff
authorWim Taymans <wim.taymans@collabora.co.uk>2012-04-19 10:38:58 (GMT)
committer Sebastian Dröge <sebastian.droege@collabora.co.uk>2012-04-19 11:50:48 (GMT)
commitd3dbd5b3324ff7816b21b23ff338c6296fba38f8 (patch) (side-by-side diff)
tree14fd862afd50e23312cde4bfcf98c6f5edc3c56b
parent3bd50184563a522a8d0960e59916d744ef1d319d (diff)
downloadgst-plugins-good-d3dbd5b3324ff7816b21b23ff338c6296fba38f8.zip
gst-plugins-good-d3dbd5b3324ff7816b21b23ff338c6296fba38f8.tar.gz
v4l2: fix compilation on older v4l2
Fix compilation on systems where the H264 format is not defined. Conflicts: sys/v4l2/gstv4l2object.c
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--sys/v4l2/gstv4l2object.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index bbe6e2d..51696fe 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -840,7 +840,9 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
{V4L2_PIX_FMT_DV, TRUE},
{V4L2_PIX_FMT_MPEG, FALSE},
+#ifdef V4L2_PIX_FMT_H264
{V4L2_PIX_FMT_H264, TRUE},
+#endif
/* Vendor-specific formats */
{V4L2_PIX_FMT_WNVA, TRUE},
@@ -1157,9 +1159,11 @@ gst_v4l2_object_v4l2fourcc_to_structure (guint32 fourcc)
case V4L2_PIX_FMT_JPEG: /* JFIF JPEG */
structure = gst_structure_new ("image/jpeg", NULL);
break;
+#ifdef V4L2_PIX_FMT_H264
case V4L2_PIX_FMT_H264: /* H.264 */
structure = gst_structure_new ("video/x-h264", NULL);
break;
+#endif
case V4L2_PIX_FMT_RGB332:
case V4L2_PIX_FMT_RGB555:
case V4L2_PIX_FMT_RGB555X:
@@ -1518,8 +1522,10 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
fourcc = V4L2_PIX_FMT_DV;
} else if (strcmp (mimetype, "image/jpeg") == 0) {
fourcc = V4L2_PIX_FMT_JPEG;
+#ifdef V4L2_PIX_FMT_H264
} else if (strcmp (mimetype, "video/x-h264") == 0) {
fourcc = V4L2_PIX_FMT_H264;
+#endif
#ifdef V4L2_PIX_FMT_SBGGR8
} else if (strcmp (mimetype, "video/x-raw-bayer") == 0) {
fourcc = V4L2_PIX_FMT_SBGGR8;