isomp4: Add stream-format = (string) obu-stream to AV1 caps

Anything else is not allowed in MP4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3740>
This commit is contained in:
Sebastian Dröge 2023-01-17 17:50:27 +02:00
parent ac1d10f80c
commit 4c8141a0c3
3 changed files with 15 additions and 17 deletions

View file

@ -8155,7 +8155,7 @@
"type": "GstQTMuxPad" "type": "GstQTMuxPad"
}, },
"video_%%u": { "video_%%u": {
"caps": "video/mpeg:\n mpegversion: 4\n systemstream: false\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-divx:\n divxversion: 5\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h264:\n stream-format: { (string)avc, (string)avc3 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h265:\n stream-format: { (string)hvc1, (string)hev1 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-mp4-part:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-av1:\n alignment: tu\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-vp9:\n profile: { (string)0, (string)1, (string)2, (string)3 }\n chroma-format: { (string)4:2:0, (string)4:2:2, (string)4:4:4 }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\n", "caps": "video/mpeg:\n mpegversion: 4\n systemstream: false\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-divx:\n divxversion: 5\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h264:\n stream-format: { (string)avc, (string)avc3 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h265:\n stream-format: { (string)hvc1, (string)hev1 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-mp4-part:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-av1:\n stream-format: obu-stream\n alignment: tu\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-vp9:\n profile: { (string)0, (string)1, (string)2, (string)3 }\n chroma-format: { (string)4:2:0, (string)4:2:2, (string)4:4:4 }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\n",
"direction": "sink", "direction": "sink",
"presence": "request", "presence": "request",
"type": "GstQTMuxPad" "type": "GstQTMuxPad"
@ -8328,7 +8328,7 @@
"type": "GstQTMuxPad" "type": "GstQTMuxPad"
}, },
"video_%%u": { "video_%%u": {
"caps": "video/x-raw:\n format: { RGB, UYVY, v210 }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/mpeg:\n mpegversion: 4\n systemstream: false\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-divx:\n divxversion: 5\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-prores:\n variant: { (string)standard, (string)lt, (string)hq, (string)proxy, (string)4444, (string)4444xq }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-cineform:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h263:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h264:\n stream-format: { (string)avc, (string)avc3 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h265:\n stream-format: { (string)hvc1, (string)hev1 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-svq:\n svqversion: 3\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-dv:\n systemstream: false\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nimage/jpeg:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nimage/png:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-vp8:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-vp9:\n profile: { (string)0, (string)1, (string)2, (string)3 }\n chroma-format: { (string)4:2:0, (string)4:2:2, (string)4:4:4 }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-dirac:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-qt-part:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-av1:\n alignment: tu\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\n", "caps": "video/x-raw:\n format: { RGB, UYVY, v210 }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/mpeg:\n mpegversion: 4\n systemstream: false\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-divx:\n divxversion: 5\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-prores:\n variant: { (string)standard, (string)lt, (string)hq, (string)proxy, (string)4444, (string)4444xq }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-cineform:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h263:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h264:\n stream-format: { (string)avc, (string)avc3 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-h265:\n stream-format: { (string)hvc1, (string)hev1 }\n alignment: au\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-svq:\n svqversion: 3\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-dv:\n systemstream: false\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nimage/jpeg:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nimage/png:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-vp8:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-vp9:\n profile: { (string)0, (string)1, (string)2, (string)3 }\n chroma-format: { (string)4:2:0, (string)4:2:2, (string)4:4:4 }\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-dirac:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-qt-part:\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\nvideo/x-av1:\n stream-format: obu-stream\n alignment: tu\n width: [ 16, 2147483647 ]\n height: [ 16, 2147483647 ]\n",
"direction": "sink", "direction": "sink",
"presence": "request", "presence": "request",
"type": "GstQTMuxPad" "type": "GstQTMuxPad"

View file

@ -210,17 +210,13 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
VP9_CAPS "; " VP9_CAPS "; "
"video/x-dirac, " "video/x-dirac, "
COMMON_VIDEO_CAPS "; " "video/x-qt-part, " COMMON_VIDEO_CAPS "; " COMMON_VIDEO_CAPS "; " "video/x-qt-part, " COMMON_VIDEO_CAPS "; "
"video/x-av1, " "alignment = (string) \"tu\", " "video/x-av1, " "stream-format = (string) \"obu-stream\", "
COMMON_VIDEO_CAPS ";"), "alignment = (string) \"tu\", " COMMON_VIDEO_CAPS ";"),
GST_STATIC_CAPS (PCM_CAPS_FULL "; " GST_STATIC_CAPS (PCM_CAPS_FULL "; " PCM_CAPS_UNPOSITIONED " ; "
PCM_CAPS_UNPOSITIONED " ; " MP123_CAPS " ; " AAC_CAPS " ; " AC3_CAPS " ; " ADPCM_CAPS " ; "
MP123_CAPS " ; " "audio/x-alaw, " COMMON_AUDIO_CAPS (2,
AAC_CAPS " ; " MAX) "; " "audio/x-mulaw, " COMMON_AUDIO_CAPS (2,
AC3_CAPS " ; " MAX) "; " AMR_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS),
ADPCM_CAPS " ; "
"audio/x-alaw, " COMMON_AUDIO_CAPS (2, MAX) "; "
"audio/x-mulaw, " COMMON_AUDIO_CAPS (2, MAX) "; "
AMR_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS),
GST_STATIC_CAPS (TEXT_UTF8), GST_STATIC_CAPS (TEXT_UTF8),
GST_STATIC_CAPS (CEA608_CAPS "; " CEA708_CAPS)} GST_STATIC_CAPS (CEA608_CAPS "; " CEA708_CAPS)}
, ,
@ -235,10 +231,11 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"), GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"),
GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";" H265_CAPS ";" GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";" H265_CAPS ";"
"video/x-mp4-part," COMMON_VIDEO_CAPS "; " "video/x-mp4-part," COMMON_VIDEO_CAPS "; "
"video/x-av1, " "alignment = (string) \"tu\", " "video/x-av1, " "stream-format = (string) \"obu-stream\", "
COMMON_VIDEO_CAPS "; " VP9_CAPS "; "), "alignment = (string) \"tu\", " COMMON_VIDEO_CAPS "; " VP9_CAPS
GST_STATIC_CAPS (MP123_CAPS "; " "; "),
AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS), GST_STATIC_CAPS (MP123_CAPS "; " AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS
" ; " OPUS_CAPS),
GST_STATIC_CAPS (TEXT_UTF8), GST_STATIC_CAPS (TEXT_UTF8),
GST_STATIC_CAPS_NONE} GST_STATIC_CAPS_NONE}
, ,

View file

@ -15018,6 +15018,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
case FOURCC_av01: case FOURCC_av01:
_codec ("AV1"); _codec ("AV1");
caps = gst_caps_new_simple ("video/x-av1", caps = gst_caps_new_simple ("video/x-av1",
"stream-format", G_TYPE_STRING, "obu-stream",
"alignment", G_TYPE_STRING, "tu", NULL); "alignment", G_TYPE_STRING, "tu", NULL);
break; break;
case GST_MAKE_FOURCC ('k', 'p', 'c', 'd'): case GST_MAKE_FOURCC ('k', 'p', 'c', 'd'):