mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
dshowsrcwrapper: Add support for UYVY
This commit is contained in:
parent
611ab7f744
commit
d4c3fd8a7e
3 changed files with 9 additions and 0 deletions
|
@ -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))
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -429,6 +432,9 @@ gst_dshow_new_video_caps (GstVideoFormat video_format, const gchar * name,
|
|||
case GST_VIDEO_FORMAT_YUY2:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("YUY2"));
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_UYVY:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_YUV ("UYVY"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
GST_STATIC_CAPS (GST_VIDEO_CAPS_BGR ";"
|
||||
GST_VIDEO_CAPS_YUV ("{ I420 }") ";"
|
||||
GST_VIDEO_CAPS_YUV ("{ YUY2 }") ";"
|
||||
GST_VIDEO_CAPS_YUV ("{ UYVY }") ";"
|
||||
"video/x-dv,"
|
||||
"systemstream = (boolean) FALSE,"
|
||||
"width = (int) [ 1, MAX ],"
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
// 30323449-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_I420
|
||||
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);
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
|
Loading…
Reference in a new issue