mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
qtmux: add basic HEVC/H.265 muxing support
https://bugzilla.gnome.org/show_bug.cgi?id=736752
This commit is contained in:
parent
fcdba65302
commit
4c6a69fdff
2 changed files with 30 additions and 1 deletions
|
@ -4226,6 +4226,28 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps)
|
||||||
ext_atom = build_codec_data_extension (FOURCC_avcC, codec_data);
|
ext_atom = build_codec_data_extension (FOURCC_avcC, codec_data);
|
||||||
if (ext_atom != NULL)
|
if (ext_atom != NULL)
|
||||||
ext_atom_list = g_list_prepend (ext_atom_list, ext_atom);
|
ext_atom_list = g_list_prepend (ext_atom_list, ext_atom);
|
||||||
|
} else if (strcmp (mimetype, "video/x-h265") == 0) {
|
||||||
|
const gchar *format;
|
||||||
|
|
||||||
|
if (!codec_data) {
|
||||||
|
GST_WARNING_OBJECT (qtmux, "no codec_data in h265 caps");
|
||||||
|
goto refuse_caps;
|
||||||
|
}
|
||||||
|
|
||||||
|
format = gst_structure_get_string (structure, "stream-format");
|
||||||
|
if (strcmp (format, "hvc1") == 0)
|
||||||
|
entry.fourcc = FOURCC_hvc1;
|
||||||
|
else if (strcmp (format, "hev1") == 0)
|
||||||
|
entry.fourcc = FOURCC_hev1;
|
||||||
|
|
||||||
|
ext_atom = build_btrt_extension (0, qtpad->avg_bitrate, qtpad->max_bitrate);
|
||||||
|
if (ext_atom != NULL)
|
||||||
|
ext_atom_list = g_list_prepend (ext_atom_list, ext_atom);
|
||||||
|
|
||||||
|
ext_atom = build_codec_data_extension (FOURCC_hvcC, codec_data);
|
||||||
|
if (ext_atom != NULL)
|
||||||
|
ext_atom_list = g_list_prepend (ext_atom_list, ext_atom);
|
||||||
|
|
||||||
} else if (strcmp (mimetype, "video/x-svq") == 0) {
|
} else if (strcmp (mimetype, "video/x-svq") == 0) {
|
||||||
gint version = 0;
|
gint version = 0;
|
||||||
const GstBuffer *seqh = NULL;
|
const GstBuffer *seqh = NULL;
|
||||||
|
|
|
@ -64,6 +64,12 @@
|
||||||
"alignment = (string) au, " \
|
"alignment = (string) au, " \
|
||||||
COMMON_VIDEO_CAPS
|
COMMON_VIDEO_CAPS
|
||||||
|
|
||||||
|
#define H265_CAPS \
|
||||||
|
"video/x-h265, " \
|
||||||
|
"stream-format = (string) { hvc1, hev1 }, " \
|
||||||
|
"alignment = (string) au, " \
|
||||||
|
COMMON_VIDEO_CAPS
|
||||||
|
|
||||||
#define MPEG4V_CAPS \
|
#define MPEG4V_CAPS \
|
||||||
"video/mpeg, " \
|
"video/mpeg, " \
|
||||||
"mpegversion = (int) 4, "\
|
"mpegversion = (int) 4, "\
|
||||||
|
@ -173,6 +179,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
|
||||||
PRORES_CAPS "; "
|
PRORES_CAPS "; "
|
||||||
H263_CAPS "; "
|
H263_CAPS "; "
|
||||||
H264_CAPS "; "
|
H264_CAPS "; "
|
||||||
|
H265_CAPS "; "
|
||||||
SVQ_CAPS "; "
|
SVQ_CAPS "; "
|
||||||
"video/x-dv, "
|
"video/x-dv, "
|
||||||
"systemstream = (boolean) false, "
|
"systemstream = (boolean) false, "
|
||||||
|
@ -202,7 +209,7 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = {
|
||||||
"MP4",
|
"MP4",
|
||||||
"GstMP4Mux",
|
"GstMP4Mux",
|
||||||
GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"),
|
GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"),
|
||||||
GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";"
|
GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";" H265_CAPS ";"
|
||||||
"video/x-mp4-part," COMMON_VIDEO_CAPS),
|
"video/x-mp4-part," COMMON_VIDEO_CAPS),
|
||||||
GST_STATIC_CAPS (MP123_CAPS "; "
|
GST_STATIC_CAPS (MP123_CAPS "; "
|
||||||
AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS),
|
AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS),
|
||||||
|
|
Loading…
Reference in a new issue