[gst-cvs] gst-plugins-base: ffmpegcolorspace: Map "Y8 " and "GREY" to "Y800" and add it to the template caps
Sebastian Dröge
slomo at kemper.freedesktop.org
Sun Jun 6 23:33:22 PDT 2010
Module: gst-plugins-base
Branch: master
Commit: 39b68dc2a89ff412ac91e23f2d01ffe5bc7275dc
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=39b68dc2a89ff412ac91e23f2d01ffe5bc7275dc
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Mon Jun 7 08:31:25 2010 +0200
ffmpegcolorspace: Map "Y8 " and "GREY" to "Y800" and add it to the template caps
---
gst/ffmpegcolorspace/gstffmpegcodecmap.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/gst/ffmpegcolorspace/gstffmpegcodecmap.c b/gst/ffmpegcolorspace/gstffmpegcodecmap.c
index 796b8c5..cde098f 100644
--- a/gst/ffmpegcolorspace/gstffmpegcodecmap.c
+++ b/gst/ffmpegcolorspace/gstffmpegcodecmap.c
@@ -340,9 +340,22 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
case PIX_FMT_YUV411P:
fmt = GST_MAKE_FOURCC ('Y', '4', '1', 'B');
break;
- case PIX_FMT_Y800:
- fmt = GST_MAKE_FOURCC ('Y', '8', '0', '0');
+ case PIX_FMT_Y800:{
+ GstCaps *tmp;
+
+ caps = gst_ff_vid_caps_new (context, "video/x-raw-yuv",
+ "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', '8', '0', '0'),
+ NULL);
+ tmp =
+ gst_ff_vid_caps_new (context, "video/x-raw-yuv", "format",
+ GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', '8', ' ', ' '), NULL);
+ gst_caps_append (caps, tmp);
+ tmp = gst_ff_vid_caps_new (context, "video/x-raw-yuv",
+ "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('G', 'R', 'E', 'Y'),
+ NULL);
+ gst_caps_append (caps, tmp);
break;
+ }
case PIX_FMT_Y16:
fmt = GST_MAKE_FOURCC ('Y', '1', '6', ' ');
break;
@@ -371,17 +384,10 @@ gst_ffmpeg_pixfmt_to_caps (enum PixelFormat pix_fmt, AVCodecContext * context)
case PIX_FMT_AYUV4444:
fmt = GST_MAKE_FOURCC ('A', 'Y', 'U', 'V');
break;
- case PIX_FMT_GRAY8:{
- GstCaps *tmp;
-
+ case PIX_FMT_GRAY8:
bpp = depth = 8;
caps = gst_ff_vid_caps_new (context, "video/x-raw-gray",
"bpp", G_TYPE_INT, bpp, "depth", G_TYPE_INT, depth, NULL);
- tmp = gst_ff_vid_caps_new (context, "video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, GST_MAKE_FOURCC ('Y', '8', '0', '0'),
- NULL);
- gst_caps_append (caps, tmp);
- }
break;
case PIX_FMT_GRAY16_L:
bpp = depth = 16;
More information about the Gstreamer-commits
mailing list