mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 10:04:23 +00:00
mpegts: add scrambling descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
This commit is contained in:
parent
e535967ee9
commit
0c773b8cdd
3 changed files with 53 additions and 0 deletions
|
@ -307,6 +307,9 @@ gst_mpegts_descriptor_parse_dvb_frequency_list
|
|||
<SUBSECTION data_broadcast>
|
||||
GstMpegTsDataBroadcastDescriptor
|
||||
gst_mpegts_descriptor_parse_dvb_data_broadcast
|
||||
<SUBSECTION scrambling>
|
||||
GstMpegTsDvbScramblingModeType
|
||||
gst_mpegts_descriptor_parse_dvb_scrambling
|
||||
<SUBSECTION data_broadcast_id>
|
||||
gst_mpegts_descriptor_parse_dvb_data_broadcast_id
|
||||
<SUBSECTION parental_rating>
|
||||
|
|
|
@ -1386,6 +1386,37 @@ gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegTsDescriptor
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_DVB_SCRAMBLING (0x65) */
|
||||
/**
|
||||
* gst_mpegts_descriptor_parse_dvb_scrambling:
|
||||
* @descriptor: a %GST_MTS_DESC_DVB_SCRAMBLING #GstMpegTsDescriptor
|
||||
* @scrambling_mode: (out): This 8-bit field identifies the selected
|
||||
* mode of the scrambling algorithm (#GstMpegTsDVBScramblingModeType).
|
||||
* The technical details of the scrambling algorithm are available only
|
||||
* to bona-fide users upon signature of a Non Disclosure Agreement (NDA)
|
||||
* administered by the DVB Common Scrambling Algorithm Custodian.
|
||||
*
|
||||
* Parses out the scrambling mode from the @descriptor.
|
||||
*
|
||||
* Returns: %TRUE if the parsing happened correctly, else %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
gst_mpegts_descriptor_parse_dvb_scrambling (const GstMpegTsDescriptor *
|
||||
descriptor, GstMpegTsDVBScramblingModeType * scrambling_mode)
|
||||
{
|
||||
guint8 *data;
|
||||
|
||||
g_return_val_if_fail (descriptor != NULL && scrambling_mode != NULL, FALSE);
|
||||
__common_desc_checks_exact (descriptor, GST_MTS_DESC_DVB_SCRAMBLING, 1,
|
||||
FALSE);
|
||||
|
||||
data = (guint8 *) descriptor->data + 2;
|
||||
|
||||
*scrambling_mode = *data;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */
|
||||
/**
|
||||
* gst_mpegts_descriptor_parse_dvb_data_broadcast_id:
|
||||
|
|
|
@ -658,6 +658,25 @@ struct _GstMpegTsDataBroadcastDescriptor
|
|||
gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast (const GstMpegTsDescriptor
|
||||
*descriptor, GstMpegTsDataBroadcastDescriptor * res);
|
||||
|
||||
/* GST_MTS_DESC_DVB_SCRAMBLING (0x65) */
|
||||
typedef enum
|
||||
{
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_RESERVED = 0x00,
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA1 = 0x01,
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA2 = 0x02,
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_STANDARD = 0x03,
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_MINIMAL_ENHANCED = 0x04,
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_CSA3_FULL_ENHANCED = 0x05,
|
||||
/* 0x06 - 0x0f reserved for future use */
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_CISSA = 0x10,
|
||||
/* 0x11 - 0x1f reserved for future DVB-CISSA versions */
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_0 = 0x70,
|
||||
GST_MPEGTS_DVB_SCRAMBLING_MODE_ATIS_F = 0x7f,
|
||||
} GstMpegTsDVBScramblingModeType;
|
||||
|
||||
gboolean gst_mpegts_descriptor_parse_dvb_scrambling (const GstMpegTsDescriptor * descriptor,
|
||||
GstMpegTsDVBScramblingModeType * scrambling_mode);
|
||||
|
||||
/* GST_MTS_DESC_DVB_DATA_BROADCAST_ID (0x66) */
|
||||
gboolean gst_mpegts_descriptor_parse_dvb_data_broadcast_id (const GstMpegTsDescriptor
|
||||
* descriptor, guint16 * data_broadcast_id, guint8 ** id_selector_bytes, guint8 * len);
|
||||
|
|
Loading…
Reference in a new issue