mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mpegts: add dvb ca identifier descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
This commit is contained in:
parent
0c773b8cdd
commit
eeaf6e4811
3 changed files with 42 additions and 0 deletions
|
@ -317,6 +317,8 @@ GstMpegTsDVBParentalRatingItem
|
|||
gst_mpegts_descriptor_parse_dvb_parental_rating
|
||||
<SUBSECTION stream_identifier>
|
||||
gst_mpegts_descriptor_parse_dvb_stream_identifier
|
||||
<SUBSECTION ca_identifier>
|
||||
gst_mpegts_descriptor_parse_dvb_ca_identifier
|
||||
<SUBSECTION Standard>
|
||||
GST_TYPE_MPEG_TSDVB_CODE_RATE
|
||||
gst_mpegts_dvb_code_rate_get_type
|
||||
|
|
|
@ -948,6 +948,42 @@ gst_mpegts_descriptor_parse_dvb_stream_identifier (const GstMpegTsDescriptor
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_DVB_CA_IDENTIFIER (0x53) */
|
||||
/**
|
||||
* gst_mpegts_descriptor_parse_dvb_ca_identifier:
|
||||
* @descriptor: a %GST_MTS_DESC_DVB_CA_IDENTIFIER #GstMpegTsDescriptor
|
||||
* @list: (out) (transfer none) (element-type guint16): This 16-bit field
|
||||
* identifies the CA system. Allocations of the value of this field are found
|
||||
* in http://www.dvbservices.com
|
||||
*
|
||||
* Extracts ca id's from @descriptor.
|
||||
*
|
||||
* Returns: %TRUE if the parsing happened correctly, else %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegTsDescriptor *
|
||||
descriptor, GArray ** list)
|
||||
{
|
||||
guint8 *data;
|
||||
guint16 tmp;
|
||||
|
||||
g_return_val_if_fail (descriptor != NULL && list != NULL, FALSE);
|
||||
/* 2 bytes = one entry */
|
||||
__common_desc_checks (descriptor, GST_MTS_DESC_DVB_CA_IDENTIFIER, 2, FALSE);
|
||||
|
||||
data = (guint8 *) descriptor->data + 2;
|
||||
|
||||
*list = g_array_new (FALSE, FALSE, sizeof (guint16));
|
||||
|
||||
for (guint i = 0; i < descriptor->length - 1; i += 2) {
|
||||
tmp = GST_READ_UINT16_BE (data);
|
||||
g_array_append_val (*list, tmp);
|
||||
data += 2;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_DVB_CONTENT (0x54) */
|
||||
static void
|
||||
_gst_mpegts_content_free (GstMpegTsContent * content)
|
||||
|
|
|
@ -486,6 +486,10 @@ gboolean gst_mpegts_descriptor_parse_dvb_component (const GstMpegTsDescriptor *d
|
|||
gboolean gst_mpegts_descriptor_parse_dvb_stream_identifier (const GstMpegTsDescriptor *descriptor,
|
||||
guint8 *component_tag);
|
||||
|
||||
/* GST_MTS_DESC_DVB_CA_IDENTIFIER (0x53) */
|
||||
gboolean gst_mpegts_descriptor_parse_dvb_ca_identifier (const GstMpegTsDescriptor * descriptor,
|
||||
GArray ** list);
|
||||
|
||||
/* GST_MTS_DESC_DVB_CONTENT (0x54) */
|
||||
typedef struct _GstMpegTsContent GstMpegTsContent;
|
||||
struct _GstMpegTsContent
|
||||
|
|
Loading…
Reference in a new issue