diff --git a/docs/libs/gst-plugins-bad-libs-sections.txt b/docs/libs/gst-plugins-bad-libs-sections.txt index 2a0d53345e..af944317d6 100644 --- a/docs/libs/gst-plugins-bad-libs-sections.txt +++ b/docs/libs/gst-plugins-bad-libs-sections.txt @@ -325,6 +325,8 @@ GstMpegTsDVBServiceListItem gst_mpegts_descriptor_parse_dvb_service_list gst_mpegts_descriptor_parse_dvb_stuffing + +gst_mpegts_descriptor_parse_dvb_bouquet_name GST_TYPE_MPEG_TSDVB_CODE_RATE gst_mpegts_dvb_code_rate_get_type diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c index 3f1275f912..8d4c81ac6e 100644 --- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c +++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c @@ -389,6 +389,31 @@ gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegTsDescriptor * return TRUE; } +/* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */ +/** + * gst_mpegts_descriptor_parse_dvb_bouquet_name: + * @bouquet_name: (out) (transfer full) (allow-none): the bouquet name + * + * Extracts the bouquet name from @descriptor. + * + * Returns: %TRUE if parsing succeeded, else %FALSE. + */ +gboolean +gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegTsDescriptor * + descriptor, gchar ** bouquet_name) +{ + guint8 *data; + + g_return_val_if_fail (descriptor != NULL && bouquet_name != NULL, FALSE); + __common_desc_checks (descriptor, GST_MTS_DESC_DVB_BOUQUET_NAME, 1, FALSE); + + data = (guint8 *) descriptor->data + 2; + + *bouquet_name = get_encoding_and_convert ((const gchar *) data + 1, *data); + + return TRUE; +} + /* GST_MTS_DESC_DVB_SERVICE (0x48) */ /** * gst_mpegts_descriptor_parse_dvb_service: diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.h b/gst-libs/gst/mpegts/gst-dvb-descriptor.h index 65804c1ace..2963d00da2 100644 --- a/gst-libs/gst/mpegts/gst-dvb-descriptor.h +++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.h @@ -283,6 +283,10 @@ struct _GstMpegTsCableDeliverySystemDescriptor gboolean gst_mpegts_descriptor_parse_cable_delivery_system (const GstMpegTsDescriptor *descriptor, GstMpegTsCableDeliverySystemDescriptor *res); +/* GST_MTS_DESC_DVB_BOUQUET_NAME (0x47) */ +gboolean gst_mpegts_descriptor_parse_dvb_bouquet_name (const GstMpegTsDescriptor * descriptor, + gchar ** bouquet_name); + /* GST_MTS_DESC_DVB_SERVICE (0x48) */ /** * GstMpegTsDVBServiceType: