mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
mpegts: Add support for component descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=724034
This commit is contained in:
parent
347ac5fbd7
commit
792fc1cf01
1 changed files with 43 additions and 1 deletions
|
@ -46,7 +46,6 @@
|
||||||
* * GST_MTS_DESC_DVB_DATA_BROADCAST
|
* * GST_MTS_DESC_DVB_DATA_BROADCAST
|
||||||
* * GST_MTS_DESC_DVB_CAROUSEL_IDENTIFIER
|
* * GST_MTS_DESC_DVB_CAROUSEL_IDENTIFIER
|
||||||
* * GST_MTS_DESC_DVB_STREAM_IDENTIFIER
|
* * GST_MTS_DESC_DVB_STREAM_IDENTIFIER
|
||||||
* * GST_MTS_DESC_DVB_COMPONENT
|
|
||||||
* * GST_MTS_DESC_DVB_FREQUENCY_LIST
|
* * GST_MTS_DESC_DVB_FREQUENCY_LIST
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -548,6 +547,49 @@ gst_mpegts_descriptor_parse_dvb_extended_event (const GstMpegTsDescriptor
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* GST_MTS_DESC_DVB_COMPONENT (0x50) */
|
||||||
|
/**
|
||||||
|
* gst_mpegts_descriptor_parse_dvb_component:
|
||||||
|
* @descriptor: a %GST_MTS_DESC_DVB_COMPONENT #GstMpegTsDescriptor
|
||||||
|
* @res: (out) (transfer none): the #GstMpegTsComponentDescriptor to fill
|
||||||
|
*
|
||||||
|
* Extracts the DVB component information from @descriptor.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if parsing succeeded, else %FALSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gst_mpegts_descriptor_parse_dvb_component (const GstMpegTsDescriptor
|
||||||
|
* descriptor, GstMpegTsComponentDescriptor * res)
|
||||||
|
{
|
||||||
|
guint8 *data;
|
||||||
|
guint8 len;
|
||||||
|
|
||||||
|
g_return_val_if_fail (descriptor != NULL && descriptor->data != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (res != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (descriptor->tag == GST_MTS_DESC_DVB_COMPONENT, FALSE);
|
||||||
|
|
||||||
|
data = (guint8 *) descriptor->data + 2;
|
||||||
|
|
||||||
|
res->stream_content = *data & 0x0f;
|
||||||
|
data += 1;
|
||||||
|
|
||||||
|
res->component_type = *data;
|
||||||
|
data += 1;
|
||||||
|
|
||||||
|
res->component_tag = *data;
|
||||||
|
data += 1;
|
||||||
|
|
||||||
|
memcpy (data, res->language_code, 3);
|
||||||
|
data += 3;
|
||||||
|
|
||||||
|
len = descriptor->length - 6;
|
||||||
|
if (len)
|
||||||
|
res->text = get_encoding_and_convert ((const gchar *) data, len);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM (0x5A) */
|
/* GST_MTS_DESC_DVB_TERRESTRIAL_DELIVERY_SYSTEM (0x5A) */
|
||||||
/**
|
/**
|
||||||
* gst_mpegts_descriptor_parse_dvb_terrestrial_delivary_system:
|
* gst_mpegts_descriptor_parse_dvb_terrestrial_delivary_system:
|
||||||
|
|
Loading…
Reference in a new issue