Conditionally compile code for YVYU

Only compile the code for the YVYU format when the format is actually defined.
Spotted by tmatth on IRC.
This commit is contained in:
Wim Taymans 2009-02-23 19:53:58 +01:00 committed by Wim Taymans
parent d2fc4cb3ba
commit 04359c8382

View file

@ -980,10 +980,12 @@ gst_v4l2_get_caps_info (GstV4l2Src * v4l2src, GstCaps * caps,
outsize = GST_ROUND_UP_4 (*w) * GST_ROUND_UP_2 (*h); outsize = GST_ROUND_UP_4 (*w) * GST_ROUND_UP_2 (*h);
outsize += (GST_ROUND_UP_4 (*w) * *h) / 2; outsize += (GST_ROUND_UP_4 (*w) * *h) / 2;
break; break;
#ifdef V4L2_PIX_FMT_YVYU
case GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'): case GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'):
fourcc = V4L2_PIX_FMT_YVYU; fourcc = V4L2_PIX_FMT_YVYU;
outsize = (GST_ROUND_UP_2 (*w) * 2) * *h; outsize = (GST_ROUND_UP_2 (*w) * 2) * *h;
break; break;
#endif
} }
} else if (!strcmp (mimetype, "video/x-raw-rgb")) { } else if (!strcmp (mimetype, "video/x-raw-rgb")) {
gint depth, endianness, r_mask; gint depth, endianness, r_mask;