mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
example: ts-parser: add parential rating descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=730854
This commit is contained in:
parent
ac88f31ac7
commit
6a622a678e
2 changed files with 18 additions and 0 deletions
|
@ -1166,6 +1166,7 @@ gst_mpegts_descriptor_parse_dvb_parental_rating (const GstMpegTsDescriptor
|
|||
g_ptr_array_add (*rating, item);
|
||||
|
||||
memcpy (item->country_code, data, 3);
|
||||
item->country_code[3] = 0;
|
||||
data += 3;
|
||||
|
||||
if (g_strcmp0 (item->country_code, "BRA") == 0) {
|
||||
|
|
|
@ -630,6 +630,23 @@ dump_descriptors (GPtrArray * descriptors, guint spacing)
|
|||
case GST_MTS_DESC_DVB_CONTENT:
|
||||
dump_content (desc, spacing + 2);
|
||||
break;
|
||||
case GST_MTS_DESC_DVB_PARENTAL_RATING:
|
||||
{
|
||||
GPtrArray *ratings;
|
||||
guint j;
|
||||
|
||||
if (gst_mpegts_descriptor_parse_dvb_parental_rating (desc, &ratings)) {
|
||||
for (j = 0; j < ratings->len; j++) {
|
||||
GstMpegTsDVBParentalRatingItem *item =
|
||||
g_ptr_array_index (ratings, j);
|
||||
g_printf ("%*s country_code : %s\n", spacing, "",
|
||||
item->country_code);
|
||||
g_printf ("%*s rating age : %d\n", spacing, "", item->rating);
|
||||
}
|
||||
g_ptr_array_unref (ratings);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GST_MTS_DESC_ISO_639_LANGUAGE:
|
||||
dump_iso_639_language (desc, spacing + 2);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue