summaryrefslogtreecommitdiff
path: root/tests/examples
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2014-05-26 11:42:46 +0200
committerEdward Hervey <bilboed@bilboed.com>2014-05-26 11:42:46 +0200
commit2240630b041b5f84c80c1d28dc0530160597e825 (patch)
tree8787430b436c898ea87bea8bddca5eb5c08a72e2 /tests/examples
parentbc7cf1520c4b303c9bbc4fb99624cda9a432b417 (diff)
downloadgstreamer-plugins-bad-2240630b041b5f84c80c1d28dc0530160597e825.tar.gz
examples: Add support for DVB Service List descriptor
Diffstat (limited to 'tests/examples')
-rw-r--r--tests/examples/mpegts/ts-parser.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/examples/mpegts/ts-parser.c b/tests/examples/mpegts/ts-parser.c
index 978d4312a..82ef55e2b 100644
--- a/tests/examples/mpegts/ts-parser.c
+++ b/tests/examples/mpegts/ts-parser.c
@@ -157,6 +157,24 @@ dump_cable_delivery_descriptor (GstMpegTsDescriptor * desc, guint spacing)
}
static void
+dump_dvb_service_list (GstMpegTsDescriptor * desc, guint spacing)
+{
+ GPtrArray *res;
+
+ if (gst_mpegts_descriptor_parse_dvb_service_list (desc, &res)) {
+ guint i;
+ g_printf ("%*s DVB Service List Descriptor\n", spacing, "");
+ for (i = 0; i < res->len; i++) {
+ GstMpegTsDVBServiceListItem *item = g_ptr_array_index (res, i);
+ g_printf ("%*s Service #%d, id:0x%04x, type:0x%x (%s)\n",
+ spacing, "", i, item->service_id, item->type,
+ enum_name (GST_TYPE_MPEG_TS_DVB_SERVICE_TYPE, item->type));
+ }
+ g_ptr_array_unref (res);
+ }
+}
+
+static void
dump_logical_channel_descriptor (GstMpegTsDescriptor * desc, guint spacing)
{
GstMpegTsLogicalChannelDescriptor res;
@@ -221,6 +239,11 @@ dump_descriptors (GPtrArray * descriptors, guint spacing)
}
break;
}
+ case GST_MTS_DESC_DVB_SERVICE_LIST:
+ {
+ dump_dvb_service_list (desc, spacing + 2);
+ break;
+ }
case GST_MTS_DESC_DVB_CABLE_DELIVERY_SYSTEM:
dump_cable_delivery_descriptor (desc, spacing + 2);
break;