tsdemux: add support for KLV metadata streams

There's no timestamps for these streams though, we
might want to make some up based on the last/next
video PTS or so.
This commit is contained in:
Tim-Philipp Müller 2014-06-30 13:20:12 +01:00
parent a755fbb440
commit eeaf4d11b7
2 changed files with 8 additions and 1 deletions

View file

@ -231,5 +231,6 @@
#define DRF_ID_CUEI 0x43554549
#define DRF_ID_ETV1 0x45545631
#define DRF_ID_HEVC 0x48455643
#define DRF_ID_KLVA 0x4b4c5641 /* defined in RP217 */
#endif /* __GST_MPEG_DESC_H__ */

View file

@ -1196,6 +1196,12 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
"stream-format", G_TYPE_STRING, "byte-stream",
"alignment", G_TYPE_STRING, "nal", NULL);
break;
case DRF_ID_KLVA:
sparse = TRUE;
is_private = TRUE;
caps = gst_caps_new_simple ("meta/x-klv",
"parsed", G_TYPE_BOOLEAN, TRUE, NULL);
break;
}
if (caps)
break;
@ -1851,7 +1857,7 @@ gst_ts_demux_parse_pes_header (GstTSDemux * demux, TSDemuxStream * stream,
stream->expected_size -= header.header_size;
} else {
/* next packet will have to complete this one */
GST_ERROR ("invalid header and packet size combination");
GST_WARNING ("invalid header and packet size combination, empty packet");
stream->expected_size = 0;
}
}