mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
isomp4/qtmux: accept video/x-h264, stream-format=avc3
The main difference between avc1 and avc3 is that avc3 is allowed to contain in-band SPS / PPS. In practice decoders will always use in-band parameter sets anyway, but it is cleaner to explicitly advertise it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047>
This commit is contained in:
parent
fa835d686f
commit
896c49cf49
2 changed files with 12 additions and 2 deletions
|
@ -6321,12 +6321,22 @@ gst_qt_mux_video_sink_set_caps (GstQTMuxPad * qtpad, GstCaps * caps)
|
||||||
"output might not play in Apple QuickTime (try global-headers?)");
|
"output might not play in Apple QuickTime (try global-headers?)");
|
||||||
}
|
}
|
||||||
} else if (strcmp (mimetype, "video/x-h264") == 0) {
|
} else if (strcmp (mimetype, "video/x-h264") == 0) {
|
||||||
|
const gchar *stream_format;
|
||||||
|
|
||||||
if (!codec_data) {
|
if (!codec_data) {
|
||||||
GST_WARNING_OBJECT (qtmux, "no codec_data in h264 caps");
|
GST_WARNING_OBJECT (qtmux, "no codec_data in h264 caps");
|
||||||
goto refuse_caps;
|
goto refuse_caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stream_format = gst_structure_get_string (structure, "stream-format");
|
||||||
|
|
||||||
|
if (!g_strcmp0 (stream_format, "avc")) {
|
||||||
entry.fourcc = FOURCC_avc1;
|
entry.fourcc = FOURCC_avc1;
|
||||||
|
} else if (!g_strcmp0 (stream_format, "avc3")) {
|
||||||
|
entry.fourcc = FOURCC_avc3;
|
||||||
|
} else {
|
||||||
|
g_assert_not_reached ();
|
||||||
|
}
|
||||||
|
|
||||||
ext_atom = build_btrt_extension (0, qtpad->avg_bitrate, qtpad->max_bitrate);
|
ext_atom = build_btrt_extension (0, qtpad->avg_bitrate, qtpad->max_bitrate);
|
||||||
if (ext_atom != NULL)
|
if (ext_atom != NULL)
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
#define H264_CAPS \
|
#define H264_CAPS \
|
||||||
"video/x-h264, " \
|
"video/x-h264, " \
|
||||||
"stream-format = (string) avc, " \
|
"stream-format = (string) { avc, avc3 }, " \
|
||||||
"alignment = (string) au, " \
|
"alignment = (string) au, " \
|
||||||
COMMON_VIDEO_CAPS
|
COMMON_VIDEO_CAPS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue