mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 21:51:09 +00:00
matroska: add support for GRAY8, BGR and RGB video colourspaces in V_UNCOMPRESSED codec
https://bugzilla.gnome.org/show_bug.cgi?id=723849
This commit is contained in:
parent
cf31a4284b
commit
19a307930a
2 changed files with 17 additions and 2 deletions
|
@ -4900,7 +4900,16 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
|
||||||
case GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'):
|
case GST_MAKE_FOURCC ('A', 'Y', 'U', 'V'):
|
||||||
format = GST_VIDEO_FORMAT_AYUV;
|
format = GST_VIDEO_FORMAT_AYUV;
|
||||||
break;
|
break;
|
||||||
|
case GST_MAKE_FOURCC ('Y', '8', '0', '0'):
|
||||||
|
case GST_MAKE_FOURCC ('Y', '8', ' ', ' '):
|
||||||
|
format = GST_VIDEO_FORMAT_GRAY8;
|
||||||
|
break;
|
||||||
|
case GST_MAKE_FOURCC ('R', 'G', 'B', 24):
|
||||||
|
format = GST_VIDEO_FORMAT_RGB;
|
||||||
|
break;
|
||||||
|
case GST_MAKE_FOURCC ('B', 'G', 'R', 24):
|
||||||
|
format = GST_VIDEO_FORMAT_BGR;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GST_DEBUG ("Unknown fourcc %" GST_FOURCC_FORMAT,
|
GST_DEBUG ("Unknown fourcc %" GST_FOURCC_FORMAT,
|
||||||
GST_FOURCC_ARGS (videocontext->fourcc));
|
GST_FOURCC_ARGS (videocontext->fourcc));
|
||||||
|
|
|
@ -126,7 +126,7 @@ static GstStaticPadTemplate videosink_templ =
|
||||||
"video/x-vp8, "
|
"video/x-vp8, "
|
||||||
COMMON_VIDEO_CAPS "; "
|
COMMON_VIDEO_CAPS "; "
|
||||||
"video/x-raw, "
|
"video/x-raw, "
|
||||||
"format = (string) { YUY2, I420, YV12, UYVY, AYUV }, "
|
"format = (string) { YUY2, I420, YV12, UYVY, AYUV, GRAY8, BGR, RGB }, "
|
||||||
COMMON_VIDEO_CAPS "; "
|
COMMON_VIDEO_CAPS "; "
|
||||||
"video/x-wmv, " "wmvversion = (int) [ 1, 3 ], " COMMON_VIDEO_CAPS)
|
"video/x-wmv, " "wmvversion = (int) [ 1, 3 ], " COMMON_VIDEO_CAPS)
|
||||||
);
|
);
|
||||||
|
@ -1021,6 +1021,12 @@ skip_details:
|
||||||
fstr = gst_structure_get_string (structure, "format");
|
fstr = gst_structure_get_string (structure, "format");
|
||||||
if (fstr && strlen (fstr) == 4)
|
if (fstr && strlen (fstr) == 4)
|
||||||
videocontext->fourcc = GST_STR_FOURCC (fstr);
|
videocontext->fourcc = GST_STR_FOURCC (fstr);
|
||||||
|
else if (!strcmp (fstr, "GRAY8"))
|
||||||
|
videocontext->fourcc = GST_MAKE_FOURCC ('Y', '8', '0', '0');
|
||||||
|
else if (!strcmp (fstr, "BGR"))
|
||||||
|
videocontext->fourcc = GST_MAKE_FOURCC ('B', 'G', 'R', 24);
|
||||||
|
else if (!strcmp (fstr, "RGB"))
|
||||||
|
videocontext->fourcc = GST_MAKE_FOURCC ('R', 'G', 'B', 24);
|
||||||
} else if (!strcmp (mimetype, "video/x-huffyuv") /* MS/VfW compatibility cases */
|
} else if (!strcmp (mimetype, "video/x-huffyuv") /* MS/VfW compatibility cases */
|
||||||
||!strcmp (mimetype, "video/x-divx")
|
||!strcmp (mimetype, "video/x-divx")
|
||||||
|| !strcmp (mimetype, "video/x-dv")
|
|| !strcmp (mimetype, "video/x-dv")
|
||||||
|
|
Loading…
Reference in a new issue