From 77bc4ff763b8c7b44f7ea2cec45ca50cca443df7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 28 Mar 2009 09:43:23 +0100 Subject: [PATCH] ffmpegcolorspace: video/x-raw-gray is the same as the YUV Y800 format --- gst/ffmpegcolorspace/gstffmpegcodecmap.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gst/ffmpegcolorspace/gstffmpegcodecmap.c b/gst/ffmpegcolorspace/gstffmpegcodecmap.c index 0a11659..1f4b45c 100644 --- a/gst/ffmpegcolorspace/gstffmpegcodecmap.c +++ b/gst/ffmpegcolorspace/gstffmpegcodecmap.c @@ -362,10 +362,17 @@ 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: + case PIX_FMT_GRAY8:{ + GstCaps *tmp; + 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; default: /* give up ... */ @@ -632,6 +639,9 @@ gst_ffmpeg_caps_to_pixfmt (const GstCaps * caps, case GST_MAKE_FOURCC ('Y', '4', '4', '4'): context->pix_fmt = PIX_FMT_YUV444P; break; + case GST_MAKE_FOURCC ('Y', '8', '0', '0'): + context->pix_fmt = PIX_FMT_GRAY8; + break; } } } else if (gst_structure_has_name (structure, "video/x-raw-rgb")) { -- 2.7.4