Commit b191053c authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Edward Hervey

examples: Add CAT section and CA descriptor support

https://bugzilla.gnome.org/show_bug.cgi?id=732986
parent 9e73b487
......@@ -507,6 +507,23 @@ dump_descriptors (GPtrArray * descriptors, guint spacing)
break;
}
case GST_MTS_DESC_CA:
{
guint16 ca_pid, ca_system_id;
const guint8 *private_data;
gsize private_data_size;
if (gst_mpegts_descriptor_parse_ca (desc, &ca_system_id, &ca_pid,
&private_data, &private_data_size)) {
g_printf ("%*s CA system id : 0x%04x\n", spacing, "", ca_system_id);
g_printf ("%*s CA PID : 0x%04x\n", spacing, "", ca_pid);
if (private_data_size) {
g_printf ("%*s Private Data :\n", spacing, "");
dump_memory_bytes ((guint8 *) private_data, private_data_size,
spacing + 2);
}
}
break;
}
case GST_MTS_DESC_DVB_NETWORK_NAME:
{
gchar *network_name;
......@@ -1083,6 +1100,17 @@ dump_vct (GstMpegtsSection * section)
dump_descriptors (vct->descriptors, 7);
}
static void
dump_cat (GstMpegtsSection * section)
{
GPtrArray *descriptors;
descriptors = gst_mpegts_section_get_cat (section);
g_assert (descriptors);
dump_descriptors (descriptors, 7);
g_ptr_array_unref (descriptors);
}
static void
dump_section (GstMpegtsSection * section)
{
......@@ -1093,6 +1121,9 @@ dump_section (GstMpegtsSection * section)
case GST_MPEGTS_SECTION_PMT:
dump_pmt (section);
break;
case GST_MPEGTS_SECTION_CAT:
dump_cat (section);
break;
case GST_MPEGTS_SECTION_TDT:
dump_tdt (section);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment