dshowsrcwrapper: Add support for UYVY

This commit is contained in:
Andoni Morales Alastruey 2012-12-01 16:24:22 +00:00 committed by Sebastian Dröge
parent 611ab7f744
commit d4c3fd8a7e
3 changed files with 9 additions and 0 deletions

View file

@ -405,6 +405,9 @@ gst_dshow_guid_to_gst_video_format (AM_MEDIA_TYPE *mediatype)
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_YUY2, FORMAT_VideoInfo)) if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_YUY2, FORMAT_VideoInfo))
return GST_VIDEO_FORMAT_YUY2; return GST_VIDEO_FORMAT_YUY2;
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_UYVY, FORMAT_VideoInfo))
return GST_VIDEO_FORMAT_UYVY;
return GST_VIDEO_FORMAT_UNKNOWN; return GST_VIDEO_FORMAT_UNKNOWN;
} }
@ -429,6 +432,9 @@ gst_dshow_new_video_caps (GstVideoFormat video_format, const gchar * name,
case GST_VIDEO_FORMAT_YUY2: case GST_VIDEO_FORMAT_YUY2:
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("YUY2")); video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("YUY2"));
break; break;
case GST_VIDEO_FORMAT_UYVY:
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("UYVY"));
break;
default: default:
break; break;
} }

View file

@ -37,6 +37,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_VIDEO_CAPS_BGR ";" GST_STATIC_CAPS (GST_VIDEO_CAPS_BGR ";"
GST_VIDEO_CAPS_YUV ("{ I420 }") ";" GST_VIDEO_CAPS_YUV ("{ I420 }") ";"
GST_VIDEO_CAPS_YUV ("{ YUY2 }") ";" GST_VIDEO_CAPS_YUV ("{ YUY2 }") ";"
GST_VIDEO_CAPS_YUV ("{ UYVY }") ";"
"video/x-dv," "video/x-dv,"
"systemstream = (boolean) FALSE," "systemstream = (boolean) FALSE,"
"width = (int) [ 1, MAX ]," "width = (int) [ 1, MAX ],"

View file

@ -32,6 +32,8 @@
// 30323449-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_I420 // 30323449-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_I420
DEFINE_GUID (MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00, DEFINE_GUID (MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, 0x80, 0x00, 0x00,
0xAA, 0x00, 0x38, 0x9B, 0x71);
DEFINE_GUID (MEDIASUBTYPE_UYVY, 0x59565955, 0x0000, 0x0010, 0x80, 0x00, 0x00,
0xAA, 0x00, 0x38, 0x9B, 0x71); 0xAA, 0x00, 0x38, 0x9B, 0x71);
G_BEGIN_DECLS G_BEGIN_DECLS