matroska: Add support for more pixel formats

- Add support for GRAY16_LE (using ffmpeg fourcc mapping)
- Update documentation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4824>
This commit is contained in:
Mark Hymers 2023-04-04 14:58:33 +01:00 committed by GStreamer Marge Bot
parent 00178cbd89
commit 1ae8af4909
3 changed files with 7 additions and 2 deletions

View file

@ -9786,7 +9786,7 @@
"presence": "request" "presence": "request"
}, },
"video_%%u": { "video_%%u": {
"caps": "video/mpeg:\n mpegversion: { (int)1, (int)2, (int)4 }\n systemstream: false\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-h264:\n stream-format: { (string)avc, (string)avc3 }\n alignment: au\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-h265:\n stream-format: { (string)hvc1, (string)hev1 }\n alignment: au\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-divx:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-huffyuv:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-dv:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-h263:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-msmpeg:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nimage/jpeg:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-theora:\nvideo/x-dirac:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-pn-realvideo:\n rmversion: [ 1, 4 ]\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-vp8:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-vp9:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-raw:\n format: { YUY2, I420, YV12, UYVY, AYUV, GRAY8, BGR, RGB }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-prores:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-wmv:\n wmvversion: [ 1, 3 ]\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-av1:\n stream-format: obu-stream\n alignment: tu\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-ffv:\n ffversion: 1\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n", "caps": "video/mpeg:\n mpegversion: { (int)1, (int)2, (int)4 }\n systemstream: false\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-h264:\n stream-format: { (string)avc, (string)avc3 }\n alignment: au\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-h265:\n stream-format: { (string)hvc1, (string)hev1 }\n alignment: au\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-divx:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-huffyuv:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-dv:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-h263:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-msmpeg:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nimage/jpeg:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-theora:\nvideo/x-dirac:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-pn-realvideo:\n rmversion: [ 1, 4 ]\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-vp8:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-vp9:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-raw:\n format: { YUY2, I420, YV12, UYVY, AYUV, GRAY8, GRAY10_LE32, GRAY16_LE, BGR, RGB, RGBA64_LE, BGRA64_LE }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-prores:\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-wmv:\n wmvversion: [ 1, 3 ]\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-av1:\n stream-format: obu-stream\n alignment: tu\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\nvideo/x-ffv:\n ffversion: 1\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n",
"direction": "sink", "direction": "sink",
"presence": "request" "presence": "request"
} }

View file

@ -6504,6 +6504,9 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
case GST_MAKE_FOURCC ('Y', '1', 0, 10): case GST_MAKE_FOURCC ('Y', '1', 0, 10):
format = GST_VIDEO_FORMAT_GRAY10_LE32; format = GST_VIDEO_FORMAT_GRAY10_LE32;
break; break;
case GST_MAKE_FOURCC ('Y', '1', 0, 16):
format = GST_VIDEO_FORMAT_GRAY16_LE;
break;
case GST_MAKE_FOURCC ('R', 'G', 'B', 24): case GST_MAKE_FOURCC ('R', 'G', 'B', 24):
format = GST_VIDEO_FORMAT_RGB; format = GST_VIDEO_FORMAT_RGB;
break; break;

View file

@ -142,7 +142,7 @@ static GstStaticPadTemplate videosink_templ =
COMMON_VIDEO_CAPS "; " COMMON_VIDEO_CAPS "; "
"video/x-raw, " "video/x-raw, "
"format = (string) { YUY2, I420, YV12, UYVY, AYUV, GRAY8, GRAY10_LE32," "format = (string) { YUY2, I420, YV12, UYVY, AYUV, GRAY8, GRAY10_LE32,"
" BGR, RGB, RGBA64_LE, BGRA64_LE }, " " GRAY16_LE, BGR, RGB, RGBA64_LE, BGRA64_LE }, "
COMMON_VIDEO_CAPS "; " COMMON_VIDEO_CAPS "; "
"video/x-prores, " "video/x-prores, "
COMMON_VIDEO_CAPS "; " COMMON_VIDEO_CAPS "; "
@ -1259,6 +1259,8 @@ skip_details:
videocontext->fourcc = GST_MAKE_FOURCC ('Y', '8', '0', '0'); videocontext->fourcc = GST_MAKE_FOURCC ('Y', '8', '0', '0');
else if (!strcmp (fstr, "GRAY10_LE32")) else if (!strcmp (fstr, "GRAY10_LE32"))
videocontext->fourcc = GST_MAKE_FOURCC ('Y', '1', 0, 10); videocontext->fourcc = GST_MAKE_FOURCC ('Y', '1', 0, 10);
else if (!strcmp (fstr, "GRAY16_LE"))
videocontext->fourcc = GST_MAKE_FOURCC ('Y', '1', 0, 16);
else if (!strcmp (fstr, "BGR")) else if (!strcmp (fstr, "BGR"))
videocontext->fourcc = GST_MAKE_FOURCC ('B', 'G', 'R', 24); videocontext->fourcc = GST_MAKE_FOURCC ('B', 'G', 'R', 24);
else if (!strcmp (fstr, "RGB")) else if (!strcmp (fstr, "RGB"))