From 2277011875d776ca92f6d00e3fdde900e16fd8fc Mon Sep 17 00:00:00 2001 From: Stefan Ringel Date: Mon, 26 May 2014 20:38:19 +0200 Subject: [PATCH] examples: Add support for DVB multilingual service name descriptor https://bugzilla.gnome.org/show_bug.cgi?id=728429 --- tests/examples/mpegts/ts-parser.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/examples/mpegts/ts-parser.c b/tests/examples/mpegts/ts-parser.c index 5627913..96f4696 100644 --- a/tests/examples/mpegts/ts-parser.c +++ b/tests/examples/mpegts/ts-parser.c @@ -226,6 +226,24 @@ dump_multiligual_bouquet_name (GstMpegTsDescriptor * desc, guint spacing) } static void +dump_multiligual_service_name (GstMpegTsDescriptor * desc, guint spacing) +{ + GPtrArray *items; + if (gst_mpegts_descriptor_parse_dvb_multilingual_service_name (desc, &items)) { + guint i; + for (i = 0; i < items->len; i++) { + GstMpegTsDvbMultilingualServiceNameItem *item = + g_ptr_array_index (items, i); + g_printf ("%*s item : %u\n", spacing, "", i); + g_printf ("%*s language_code : %s\n", spacing, "", item->language_code); + g_printf ("%*s service_name : %s\n", spacing, "", item->service_name); + g_printf ("%*s provider_name : %s\n", spacing, "", item->provider_name); + } + g_ptr_array_unref (items); + } +} + +static void dump_iso_639_language (GstMpegTsDescriptor * desc, guint spacing) { guint i; @@ -322,6 +340,11 @@ dump_descriptors (GPtrArray * descriptors, guint spacing) dump_multiligual_network_name (desc, spacing + 2); break; } + case GST_MTS_DESC_DVB_MULTILINGUAL_SERVICE_NAME: + { + dump_multiligual_service_name (desc, spacing + 2); + break; + } case GST_MTS_DESC_ISO_639_LANGUAGE: dump_iso_639_language (desc, spacing + 2); break; -- 2.7.4