GST_WARNING ("Unsupported video format ARGB4444");
} else if (memcmp (&subtype_guid.Data2, &MEDIASUBTYPE_FOURCC.Data2,
sizeof (subtype_guid) - sizeof (subtype_guid.Data1)) == 0) {
- guint8 *p = (guint8 *) & subtype_guid.Data1;
- gchar *format = g_strdup_printf ("%c%c%c%c", p[0], p[1], p[2], p[3]);
- structure = gst_structure_new ("video/x-raw", "format",
- G_TYPE_STRING, format, NULL);
+ guint32 fourcc = subtype_guid.Data1;
+ gchar *format =
+ g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
+ 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);
} else if (IsEqualGUID (&subtype_guid, &MEDIASUBTYPE_dvsd)) {
if (IsEqualGUID (&format_guid, &FORMAT_DvInfo)) {
guess_aspect (gint width, gint height, gint * par_width, gint * par_height)
{
/*
- * As we dont have access to the actual pixel aspect, we will try to do a
+ * As we don't have access to the actual pixel aspect, we will try to do a
* best-effort guess. The guess is based on most sensors being either 4/3
* or 16/9, and most pixel aspects being close to 1/1.
*/
if (IsEqualGUID (&range->MajorFormat, &MEDIATYPE_Video)
|| IsEqualGUID (&range->MajorFormat, &MEDIATYPE_Interleaved)) {
KsVideoMediaType *entry;
- gpointer src_vscc, src_format;
+ gpointer src_vscc = NULL, src_format = NULL;
GstStructure *media_structure;
entry = g_new0 (KsVideoMediaType, 1);