mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-05 07:40:01 +00:00
dshowsrcwrapper: add support for RGB32, RGB555, RGB565 and RGB8 color spaces
Some cameras (IDS) only support those. https://bugzilla.gnome.org//show_bug.cgi?id=765427
This commit is contained in:
parent
97529971fc
commit
26dfb7db83
1 changed files with 24 additions and 0 deletions
|
@ -406,6 +406,18 @@ gst_dshow_guid_to_gst_video_format (AM_MEDIA_TYPE *mediatype)
|
|||
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_UYVY, FORMAT_VideoInfo))
|
||||
return GST_VIDEO_FORMAT_UYVY;
|
||||
|
||||
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_RGB32, FORMAT_VideoInfo))
|
||||
return GST_VIDEO_FORMAT_BGRx;
|
||||
|
||||
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_RGB565, FORMAT_VideoInfo))
|
||||
return GST_VIDEO_FORMAT_BGR16;
|
||||
|
||||
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_RGB555, FORMAT_VideoInfo))
|
||||
return GST_VIDEO_FORMAT_BGR15;
|
||||
|
||||
if (gst_dshow_check_mediatype (mediatype, MEDIASUBTYPE_RGB8, FORMAT_VideoInfo))
|
||||
return GST_VIDEO_FORMAT_GRAY8;
|
||||
|
||||
return GST_VIDEO_FORMAT_UNKNOWN;
|
||||
}
|
||||
|
||||
|
@ -449,6 +461,18 @@ gst_dshow_new_video_caps (GstVideoFormat video_format, const gchar * name,
|
|||
case GST_VIDEO_FORMAT_UYVY:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("UYVY"));
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_BGRx:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("BGRx"));
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_BGR16:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("BGR16"));
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_BGR15:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("BGR15"));
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_GRAY8:
|
||||
video_caps = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("GRAY8"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue