mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 20:59:44 +00:00
mpegts: add data broadcast id descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
This commit is contained in:
parent
065abf6d54
commit
ace60abef5
3 changed files with 40 additions and 1 deletions
|
@ -305,6 +305,8 @@ gst_mpegts_descriptor_parse_dvb_private_data_specifier
|
|||
<SUBSECTION data_broadcast>
|
||||
GstMpegTsDataBroadcastDescriptor
|
||||
gst_mpegts_descriptor_parse_dvb_data_broadcast
|
||||
<SUBSECTION data_broadcast_id>
|
||||
gst_mpegts_descriptor_parse_dvb_data_broadcast_id
|
||||
<SUBSECTION parental_rating>
|
||||
GstMpegTsDVBParentalRatingItem
|
||||
gst_mpegts_descriptor_parse_dvb_parental_rating
|
||||
|
|
|
@ -1325,6 +1325,42 @@ gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegTsDescriptor
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */
|
||||
/**
|
||||
* gst_mpegts_descriptor_parse_dvb_data_broadcast_id:
|
||||
* @descriptor: a %GST_MTS_DESC_DVB_DATA_BROADCAST_ID #GstMpegTsDescriptor
|
||||
* @data_broadcast_id: (out): the data broadcast id
|
||||
* @id_selector_bytes: (out): the selector bytes, if present
|
||||
* @len: (out): the length of #id_selector_bytes
|
||||
*
|
||||
* Parses out the data broadcast id from the @descriptor.
|
||||
*
|
||||
* Returns: %TRUE if the parsing happened correctly, else %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
gst_mpegts_descriptor_parse_dvb_data_broadcast_id (const GstMpegTsDescriptor
|
||||
* descriptor, guint16 * data_broadcast_id, guint8 ** id_selector_bytes,
|
||||
guint8 * len)
|
||||
{
|
||||
guint8 *data;
|
||||
|
||||
g_return_val_if_fail (descriptor != NULL && data_broadcast_id != NULL &&
|
||||
id_selector_bytes != NULL, FALSE);
|
||||
__common_desc_checks (descriptor, GST_MTS_DESC_DVB_DATA_BROADCAST_ID, 2,
|
||||
FALSE);
|
||||
|
||||
data = (guint8 *) descriptor->data + 2;
|
||||
|
||||
*data_broadcast_id = GST_READ_UINT16_BE (data);
|
||||
data += 2;
|
||||
|
||||
*len = descriptor->length - 2;
|
||||
|
||||
*id_selector_bytes = g_memdup (data, *len);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_EXT_DVB_T2_DELIVERY_SYSTEM (0x7F && 0x04) */
|
||||
static void
|
||||
_gst_mpegts_t2_delivery_system_cell_extension_free
|
||||
|
|
|
@ -658,7 +658,8 @@ gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegTsDescript
|
|||
*descriptor, GstMpegTsDataBroadcastDescriptor * res);
|
||||
|
||||
/* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */
|
||||
/* FIXME : Implement */
|
||||
gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast_id (const GstMpegTsDescriptor
|
||||
* descriptor, guint16 * data_broadcast_id, guint8 ** id_selector_bytes, guint8 * len);
|
||||
|
||||
/* GST_MTS_DESC_DVB_AC3 (0x6a) */
|
||||
/* FIXME : Implement */
|
||||
|
|
Loading…
Reference in a new issue