mpegtsmux: add support for H.265/HEVC video

https://bugzilla.gnome.org/show_bug.cgi?id=744367
This commit is contained in:
Tim-Philipp Müller 2016-01-19 17:08:50 +00:00
parent 6e79d54ae5
commit ab5aab60a9
3 changed files with 6 additions and 0 deletions

View file

@ -127,6 +127,8 @@ static GstStaticPadTemplate mpegtsmux_sink_factory =
"video/x-dirac;"
"video/x-h264,stream-format=(string)byte-stream,"
"alignment=(string){au, nal}; "
"video/x-h265,stream-format=(string)byte-stream,"
"alignment=(string){au, nal}; "
"audio/mpeg, "
"parsed = (boolean) TRUE, "
"mpegversion = (int) { 1, 2 };"
@ -612,6 +614,8 @@ mpegtsmux_create_stream (MpegTsMux * mux, MpegTsPadData * ts_data)
st = TSMUX_ST_PS_AUDIO_LPCM;
} else if (strcmp (mt, "video/x-h264") == 0) {
st = TSMUX_ST_VIDEO_H264;
} else if (strcmp (mt, "video/x-h265") == 0) {
st = TSMUX_ST_VIDEO_HEVC;
} else if (strcmp (mt, "audio/mpeg") == 0) {
gint mpegversion;

View file

@ -138,6 +138,7 @@ tsmux_stream_new (guint16 pid, TsMuxStreamType stream_type)
case TSMUX_ST_VIDEO_MPEG2:
case TSMUX_ST_VIDEO_MPEG4:
case TSMUX_ST_VIDEO_H264:
case TSMUX_ST_VIDEO_HEVC:
/* FIXME: Assign sequential IDs? */
stream->id = 0xE0;
stream->pi.flags |= TSMUX_PACKET_FLAG_PES_FULL_HEADER;

View file

@ -133,6 +133,7 @@ enum TsMuxStreamType {
TSMUX_ST_AUDIO_AAC = 0x0f,
TSMUX_ST_VIDEO_MPEG4 = 0x10,
TSMUX_ST_VIDEO_H264 = 0x1b,
TSMUX_ST_VIDEO_HEVC = 0x24,
/* private stream types */
TSMUX_ST_PS_AUDIO_AC3 = 0x81,