mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-03 15:06:34 +00:00
ksvideosrc: support 'Y16 ' FOURCC as GRAY16_LE
The FLIR Boson USB provides 16-bit grayscale video using this FOURCC.
This commit is contained in:
parent
6c53d696dd
commit
ca90ecef9c
1 changed files with 10 additions and 4 deletions
|
@ -164,10 +164,16 @@ ks_video_format_to_structure (GUID subtype_guid, GUID format_guid,
|
||||||
GST_WARNING ("Unsupported video format ARGB4444");
|
GST_WARNING ("Unsupported video format ARGB4444");
|
||||||
} else if (memcmp (&subtype_guid.Data2, &MEDIASUBTYPE_FOURCC.Data2,
|
} else if (memcmp (&subtype_guid.Data2, &MEDIASUBTYPE_FOURCC.Data2,
|
||||||
sizeof (subtype_guid) - sizeof (subtype_guid.Data1)) == 0) {
|
sizeof (subtype_guid) - sizeof (subtype_guid.Data1)) == 0) {
|
||||||
guint8 *p = (guint8 *) & subtype_guid.Data1;
|
guint32 fourcc = subtype_guid.Data1;
|
||||||
gchar *format = g_strdup_printf ("%c%c%c%c", p[0], p[1], p[2], p[3]);
|
gchar *format =
|
||||||
structure = gst_structure_new ("video/x-raw", "format",
|
g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
|
||||||
G_TYPE_STRING, format, NULL);
|
if (GST_STR_FOURCC (format) == GST_MAKE_FOURCC ('Y', '1', '6', ' ')) {
|
||||||
|
structure = gst_structure_new ("video/x-raw", "format",
|
||||||
|
G_TYPE_STRING, "GRAY16_LE", NULL);
|
||||||
|
} else {
|
||||||
|
structure = gst_structure_new ("video/x-raw", "format",
|
||||||
|
G_TYPE_STRING, format, NULL);
|
||||||
|
}
|
||||||
g_free (format);
|
g_free (format);
|
||||||
} else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_dvsd)) {
|
} else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_dvsd)) {
|
||||||
if (IsEqualGUID (&format_guid, &FORMAT_DvInfo)) {
|
if (IsEqualGUID (&format_guid, &FORMAT_DvInfo)) {
|
||||||
|
|
Loading…
Reference in a new issue