From a09f32d0a79d07e1f9e855ca38d2aeaa78feb27b Mon Sep 17 00:00:00 2001 From: Stefan Ringel Date: Tue, 27 May 2014 20:32:42 +0200 Subject: [PATCH] example: ts-parser: printing enum types https://bugzilla.gnome.org/show_bug.cgi?id=730847 --- tests/examples/mpegts/ts-parser.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/examples/mpegts/ts-parser.c b/tests/examples/mpegts/ts-parser.c index ef9e3d53cb..a7ce142027 100644 --- a/tests/examples/mpegts/ts-parser.c +++ b/tests/examples/mpegts/ts-parser.c @@ -149,10 +149,13 @@ dump_cable_delivery_descriptor (GstMpegTsDescriptor * desc, guint spacing) if (gst_mpegts_descriptor_parse_cable_delivery_system (desc, &res)) { g_printf ("%*s Cable Delivery Descriptor\n", spacing, ""); g_printf ("%*s Frequency : %d Hz\n", spacing, "", res.frequency); - g_printf ("%*s Outer FEC : %d\n", spacing, "", res.outer_fec); - g_printf ("%*s modulation : %d\n", spacing, "", res.modulation); + g_printf ("%*s Outer FEC : %d (%s)\n", spacing, "", res.outer_fec, + enum_name (GST_TYPE_MPEG_TS_CABLE_OUTER_FEC_SCHEME, res.outer_fec)); + g_printf ("%*s modulation : %d (%s)\n", spacing, "", res.modulation, + enum_name (GST_TYPE_MPEG_TS_MODULATION_TYPE, res.modulation)); g_printf ("%*s Symbol rate : %d sym/s\n", spacing, "", res.symbol_rate); - g_printf ("%*s Inner FEC : %d\n", spacing, "", res.fec_inner); + g_printf ("%*s Inner FEC : %d (%s)\n", spacing, "", res.fec_inner, + enum_name (GST_TYPE_MPEG_TS_DVB_CODE_RATE, res.fec_inner)); } } @@ -746,6 +749,9 @@ main (int argc, gchar ** argv) g_type_class_ref (GST_TYPE_MPEG_TS_SECTION_DVB_TABLE_ID); g_type_class_ref (GST_TYPE_MPEG_TS_SECTION_ATSC_TABLE_ID); g_type_class_ref (GST_TYPE_MPEG_TS_SECTION_SCTE_TABLE_ID); + g_type_class_ref (GST_TYPE_MPEG_TS_MODULATION_TYPE); + g_type_class_ref (GST_TYPE_MPEG_TS_DVB_CODE_RATE); + g_type_class_ref (GST_TYPE_MPEG_TS_CABLE_OUTER_FEC_SCHEME); mainloop = g_main_loop_new (NULL, FALSE);