diff options
author | Edward Hervey <edward@collabora.com> | 2013-07-08 08:43:50 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2013-07-09 12:25:11 +0200 |
commit | 0ef3e3c7d253727f1e0c5fd704927e3510d008b8 (patch) | |
tree | 9b281ed2b05ef79656279982ecf87e22e7491914 /tests | |
parent | ae4d6bb33491c065b42478dac4d3a32031512e6a (diff) | |
download | gstreamer-plugins-bad-0ef3e3c7d253727f1e0c5fd704927e3510d008b8.tar.gz |
examples: Add BAT support to mpegts example
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examples/mpegts/ts-parser.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/examples/mpegts/ts-parser.c b/tests/examples/mpegts/ts-parser.c index 069be355e..26d32c2f3 100644 --- a/tests/examples/mpegts/ts-parser.c +++ b/tests/examples/mpegts/ts-parser.c @@ -301,6 +301,27 @@ dump_nit (GstMpegTsSection * section) } static void +dump_bat (GstMpegTsSection * section) +{ + const GstMpegTsBAT *bat = gst_mpegts_section_get_bat (section); + guint i, len; + + g_assert (bat); + + g_printf (" bouquet_id : 0x%04x\n", section->subtable_extension); + dump_descriptors (bat->descriptors, 7); + len = bat->streams->len; + g_printf (" %d Streams:\n", len); + for (i = 0; i < len; i++) { + GstMpegTsBATStream *stream = g_ptr_array_index (bat->streams, i); + g_printf + (" transport_stream_id:0x%04x , original_network_id:0x%02x\n", + stream->transport_stream_id, stream->original_network_id); + dump_descriptors (stream->descriptors, 9); + } +} + +static void dump_sdt (GstMpegTsSection * section) { const GstMpegTsSDT *sdt = gst_mpegts_section_get_sdt (section); @@ -377,6 +398,9 @@ dump_section (GstMpegTsSection * section) case GST_MPEGTS_SECTION_NIT: dump_nit (section); break; + case GST_MPEGTS_SECTION_BAT: + dump_bat (section); + break; case GST_MPEGTS_SECTION_EIT: dump_eit (section); break; |