mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 16:51:10 +00:00
mpegts: Fix TOT section parsing
And use it in example
This commit is contained in:
parent
61a8cbae41
commit
6a611e5d3d
2 changed files with 15 additions and 0 deletions
|
@ -739,6 +739,7 @@ _parse_tot (GstMpegTsSection * section)
|
|||
data = section->data + 8;
|
||||
|
||||
desc_len = GST_READ_UINT16_BE (data) & 0xFFF;
|
||||
data += 2;
|
||||
tot->descriptors = gst_mpegts_parse_descriptors (data, desc_len);
|
||||
|
||||
return tot;
|
||||
|
|
|
@ -326,6 +326,17 @@ dump_tdt (GstMpegTsSection * section)
|
|||
gst_date_time_unref (date);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_tot (GstMpegTsSection * section)
|
||||
{
|
||||
const GstMpegTsTOT *tot = gst_mpegts_section_get_tot (section);
|
||||
gchar *str = gst_date_time_to_iso8601_string (tot->utc_time);
|
||||
|
||||
g_printf (" utc_time : %s\n", str);
|
||||
dump_descriptors (tot->descriptors, 7);
|
||||
g_free (str);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_section (GstMpegTsSection * section)
|
||||
{
|
||||
|
@ -339,6 +350,9 @@ dump_section (GstMpegTsSection * section)
|
|||
case GST_MPEGTS_SECTION_TDT:
|
||||
dump_tdt (section);
|
||||
break;
|
||||
case GST_MPEGTS_SECTION_TOT:
|
||||
dump_tot (section);
|
||||
break;
|
||||
case GST_MPEGTS_SECTION_SDT:
|
||||
dump_sdt (section);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue