GstMpegts.Descriptor

Fields

Name

Type

Access

Description

data

int

r/w

the full descriptor data (including tag, extension, length). The first two bytes are the tag and length.

length

int

r/w

the length of the descriptor content (excluding tag/length field)

tag

int

r/w

the type of descriptor

tag_extension

int

r/w

the extended type (if descriptor_tag is 0x7f)

Methods

class

from_custom (tag, data)

class

from_custom_with_extension (tag, tag_extension, data)

class

from_dvb_network_name (name)

class

from_dvb_service (service_type, service_name, service_provider)

class

from_dvb_subtitling (lang, type, composition, ancillary)

class

from_iso_639_language (language)

class

from_registration (format_identifier, additional_info)

class

parse_audio_preselection_dump (source)

class

parse_audio_preselection_free (source)

free ()

parse_audio_preselection_list ()

parse_ca ()

parse_cable_delivery_system ()

parse_dvb_bouquet_name ()

parse_dvb_ca_identifier ()

parse_dvb_component ()

parse_dvb_content ()

parse_dvb_data_broadcast ()

parse_dvb_data_broadcast_id ()

parse_dvb_extended_event ()

parse_dvb_frequency_list ()

parse_dvb_linkage ()

parse_dvb_multilingual_bouquet_name ()

parse_dvb_multilingual_component ()

parse_dvb_multilingual_network_name ()

parse_dvb_multilingual_service_name ()

parse_dvb_network_name ()

parse_dvb_parental_rating ()

parse_dvb_private_data_specifier ()

parse_dvb_scrambling ()

parse_dvb_service ()

parse_dvb_service_list ()

parse_dvb_short_event ()

parse_dvb_stream_identifier ()

parse_dvb_stuffing ()

parse_dvb_subtitling_idx (idx)

parse_dvb_subtitling_nb ()

parse_dvb_t2_delivery_system ()

parse_dvb_teletext_idx (idx)

parse_dvb_teletext_nb ()

parse_iso_639_language ()

parse_iso_639_language_idx (idx)

parse_iso_639_language_nb ()

parse_logical_channel ()

parse_registration ()

parse_satellite_delivery_system ()

parse_terrestrial_delivery_system ()

Details

class GstMpegts.Descriptor

These are the base descriptor types and methods.

For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications and other specifications mentioned in the documentation.

classmethod from_custom(tag, data)
Parameters:
  • tag (int) – descriptor tag

  • data (bytes) – descriptor data (after tag and length field)

Returns:

GstMpegts.Descriptor

Return type:

GstMpegts.Descriptor

Creates a GstMpegts.Descriptor with custom tag and data

classmethod from_custom_with_extension(tag, tag_extension, data)
Parameters:
  • tag (int) – descriptor tag

  • tag_extension (int) – descriptor tag extension

  • data (bytes) – descriptor data (after tag and length field)

Returns:

GstMpegts.Descriptor

Return type:

GstMpegts.Descriptor

Creates a GstMpegts.Descriptor with custom tag, tag_extension and data

New in version 1.20.

classmethod from_dvb_network_name(name)
Parameters:

name (str) – the network name to set

Returns:

the GstMpegts.Descriptor or None on fail

Return type:

GstMpegts.Descriptor

Creates a GstMpegts.Descriptor to be a GstMpegts.DVBDescriptorType.NETWORK_NAME, with the network name name. The data field of the GstMpegts.Descriptor will be allocated, and transferred to the caller.

classmethod from_dvb_service(service_type, service_name, service_provider)
Parameters:
Returns:

the GstMpegts.Descriptor or None on fail

Return type:

GstMpegts.Descriptor

Fills a GstMpegts.Descriptor to be a GstMpegts.DVBDescriptorType.SERVICE. The data field of the GstMpegts.Descriptor will be allocated, and transferred to the caller.

classmethod from_dvb_subtitling(lang, type, composition, ancillary)
Parameters:
  • lang (str) – a string containing the ISO639 language

  • type (int) – subtitling type

  • composition (int) – composition page id

  • ancillary (int) – ancillary page id

Return type:

GstMpegts.Descriptor

classmethod from_iso_639_language(language)
Parameters:

language (str) – ISO-639-2 language 3-str code

Returns:

GstMpegts.Descriptor, None on failure

Return type:

GstMpegts.Descriptor

Creates a GstMpegts.DescriptorType.ISO_639_LANGUAGE GstMpegts.Descriptor with a single language

classmethod from_registration(format_identifier, additional_info)
Parameters:
  • format_identifier (str) – a 4 character format identifier string

  • additional_info (bytes or None) – pointer to optional additional info

Returns:

GstMpegts.Descriptor, None on failure

Return type:

GstMpegts.Descriptor

Creates a GstMpegts.DescriptorType.REGISTRATION GstMpegts.Descriptor

classmethod parse_audio_preselection_dump(source)
Parameters:

source (GstMpegts.AudioPreselectionDescriptor) –

New in version 1.20.

classmethod parse_audio_preselection_free(source)
Parameters:

source (GstMpegts.AudioPreselectionDescriptor) –

New in version 1.20.

free()

Frees self

parse_audio_preselection_list()
Returns:

True if the parsing happened correctly, else False.

list:

the list of audio preselection

Return type:

(bool, list: [GstMpegts.AudioPreselectionDescriptor])

Parses out a list of audio preselection from the self.

New in version 1.20.

parse_ca()
Returns:

True if parsing succeeded, else False.

ca_system_id:

the type of CA system used

ca_pid:

The PID containing ECM or EMM data

private_data:

The private data

Return type:

(bool, ca_system_id: int, ca_pid: int, private_data: bytes)

Extracts the Conditional Access information from self.

parse_cable_delivery_system()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.CableDeliverySystemDescriptor to fill

Return type:

(bool, res: GstMpegts.CableDeliverySystemDescriptor)

Extracts the cable delivery system information from self.

parse_dvb_bouquet_name()
Returns:

True if parsing succeeded, else False.

bouquet_name:

the bouquet name

Return type:

(bool, bouquet_name: str)

Extracts the bouquet name from self.

parse_dvb_ca_identifier()
Returns:

True if the parsing happened correctly, else False.

list:

a list of ca identifier. Edge entry identifies the CA system. Allocations of the value of this field are found in http://www.dvbservices.com

Return type:

(bool, list: [int])

Extracts ca id’s from self.

parse_dvb_component()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.ComponentDescriptor to fill

Return type:

(bool, res: GstMpegts.ComponentDescriptor)

Extracts the DVB component information from self.

parse_dvb_content()
Returns:

True if the parsing happened correctly, else False.

content:

GstMpegts.Content

Return type:

(bool, content: [GstMpegts.Content])

Extracts the DVB content information from self.

parse_dvb_data_broadcast()
Returns:

True if the parsing happened correctly, else False.

res:

GstMpegts.DataBroadcastDescriptor

Return type:

(bool, res: GstMpegts.DataBroadcastDescriptor)

Parses out the data broadcast from the self.

parse_dvb_data_broadcast_id()
Returns:

True if the parsing happened correctly, else False.

data_broadcast_id:

the data broadcast id

id_selector_bytes:

the selector bytes, if present

Return type:

(bool, data_broadcast_id: int, id_selector_bytes: bytes)

Parses out the data broadcast id from the self.

parse_dvb_extended_event()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.ExtendedEventDescriptor to fill

Return type:

(bool, res: GstMpegts.ExtendedEventDescriptor)

Extracts the DVB extended event information from self.

parse_dvb_frequency_list()
Returns:

True if the parsing happened correctly, else False.

offset:

False in Hz, True in kHz

list:

a list of all frequencies in Hz/kHz depending on offset

Return type:

(bool, offset: bool, list: [int])

Parses out a list of frequencies from the self.

parse_dvb_linkage()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.DVBLinkageDescriptor to fill

Return type:

(bool, res: GstMpegts.DVBLinkageDescriptor)

Extracts the DVB linkage information from self.

parse_dvb_multilingual_bouquet_name()
Returns:

True if the parsing happened correctly, else False.

bouquet_name_items:

a GstMpegts.DvbMultilingualBouquetNameItem

Return type:

(bool, bouquet_name_items: [GstMpegts.DvbMultilingualBouquetNameItem])

Parses out the multilingual bouquet name from the self.

parse_dvb_multilingual_component()
Returns:

True if the parsing happened correctly, else False.

component_tag:

the component tag

component_description_items:

a GstMpegts.DvbMultilingualComponentItem

Return type:

(bool, component_tag: int, component_description_items: [GstMpegts.DvbMultilingualComponentItem])

Parses out the multilingual component from the self.

parse_dvb_multilingual_network_name()
Returns:

True if the parsing happened correctly, else False.

network_name_items:

a GstMpegts.DvbMultilingualNetworkNameItem

Return type:

(bool, network_name_items: [GstMpegts.DvbMultilingualNetworkNameItem])

Parses out the multilingual network name from the self.

parse_dvb_multilingual_service_name()
Returns:

True if the parsing happened correctly, else False.

service_name_items:

a GstMpegts.DvbMultilingualServiceNameItem

Return type:

(bool, service_name_items: [GstMpegts.DvbMultilingualServiceNameItem])

Parses out the multilingual service name from the self.

parse_dvb_network_name()
Returns:

True if the parsing happened correctly, else False.

name:

the extracted name

Return type:

(bool, name: str)

Parses out the dvb network name from the self:

parse_dvb_parental_rating()
Returns:

True if the parsing happened correctly, else False.

rating:

GstMpegts.DVBParentalRatingItem

Return type:

(bool, rating: [GstMpegts.DVBParentalRatingItem])

Extracts the DVB parental rating information from self.

parse_dvb_private_data_specifier()
Returns:

True if the parsing happened correctly, else False.

private_data_specifier:

the private data specifier id registered by http://www.dvbservices.com/

private_data:

additional data or None

Return type:

(bool, private_data_specifier: int, private_data: bytes)

Parses out the private data specifier from the self.

parse_dvb_scrambling()
Returns:

True if the parsing happened correctly, else False.

scrambling_mode:

This 8-bit field identifies the selected mode of the scrambling algorithm (GstMpegts.DVBScramblingModeType). 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.

Return type:

(bool, scrambling_mode: GstMpegts.DVBScramblingModeType)

Parses out the scrambling mode from the self.

parse_dvb_service()
Returns:

True if parsing succeeded, else False.

service_type:

the service type

service_name:

the service name

provider_name:

the provider name

Return type:

(bool, service_type: GstMpegts.DVBServiceType, service_name: str, provider_name: str)

Extracts the dvb service information from self.

parse_dvb_service_list()
Returns:

True if the parsing happened correctly, else False.

list:

the list of services

Return type:

(bool, list: [GstMpegts.DVBServiceListItem])

Parses out a list of services from the self:

parse_dvb_short_event()
Returns:

True if parsing succeeded, else False.

language_code:

the language code

event_name:

the event name

text:

the event text

Return type:

(bool, language_code: str, event_name: str, text: str)

Extracts the DVB short event information from self.

parse_dvb_stream_identifier()
Returns:

True if the parsing happened correctly, else False.

component_tag:

the component tag

Return type:

(bool, component_tag: int)

Extracts the component tag from self.

parse_dvb_stuffing()
Returns:

True if the parsing happened correctly, else False.

stuffing_bytes:

the stuffing bytes

Return type:

(bool, stuffing_bytes: int)

Parses out the stuffing bytes from the self.

parse_dvb_subtitling_idx(idx)
Parameters:

idx (int) – Table id of the entry to parse

Returns:

True if parsing succeeded, else False.

lang:

the language code

type:

the type of subtitling

composition_page_id:

the composition page id

ancillary_page_id:

the ancillary page id

Return type:

(bool, lang: str, type: int, composition_page_id: int, ancillary_page_id: int)

Extracts the DVB subtitling informatio from specific table id in self.

Note: Use #gst_tag_get_language_code if you want to get the the ISO 639-1 language code from the returned ISO 639-2 one.

parse_dvb_subtitling_nb()
Returns:

The number of entries in self

Return type:

int

parse_dvb_t2_delivery_system()
Returns:

True if the parsing happened correctly, else False.

res:

GstMpegts.T2DeliverySystemDescriptor

Return type:

(bool, res: GstMpegts.T2DeliverySystemDescriptor)

Parses out the DVB-T2 delivery system from the self.

parse_dvb_teletext_idx(idx)
Parameters:

idx (int) – The id of the teletext to get

Returns:

False on out-of-bounds and errors

language_code:

a null-terminated string

teletext_type:

GstMpegts.DVBTeletextType

Return type:

(bool, language_code: str, teletext_type: GstMpegts.DVBTeletextType, magazine_number: int, page_number: int)

Parses teletext number idx in the self. The language is in ISO639 format.

parse_dvb_teletext_nb()
Returns:

Number of teletext entries

Return type:

int

Find the number of teletext entries in self

parse_iso_639_language()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.ISO639LanguageDescriptor to fill

Return type:

(bool, res: GstMpegts.ISO639LanguageDescriptor)

Extracts the iso 639-2 language information from self.

Note: Use #gst_tag_get_language_code if you want to get the the ISO 639-1 language code from the returned ISO 639-2 one.

parse_iso_639_language_idx(idx)
Parameters:

idx (int) – Table id of the language to parse

Returns:

True if parsing succeeded, else False.

lang:

4-byte str array to hold the language code

audio_type:

the GstMpegts.Iso639AudioType to set

Return type:

(bool, lang: str, audio_type: GstMpegts.Iso639AudioType)

Extracts the iso 639-2 language information from specific table id in self.

Note: Use #gst_tag_get_language_code if you want to get the the ISO 639-1 language code from the returned ISO 639-2 one.

parse_iso_639_language_nb()
Returns:

The number of languages in self

Return type:

int

parse_logical_channel()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.LogicalChannelDescriptor to fill

Return type:

(bool, res: GstMpegts.LogicalChannelDescriptor)

Extracts the logical channels from self.

parse_registration()
Returns:

True if parsing succeeded, else False.

registration_id:

The registration ID (in host endiannes)

additional_info:

The additional information

Return type:

(bool, registration_id: int, additional_info: bytes)

Extracts the Registration information from self.

New in version 1.20.

parse_satellite_delivery_system()
Returns:

True if parsing succeeded, else False.

res:

the GstMpegts.SatelliteDeliverySystemDescriptor to fill

Return type:

(bool, res: GstMpegts.SatelliteDeliverySystemDescriptor)

Extracts the satellite delivery system information from self.

parse_terrestrial_delivery_system()
Returns:

True if the parsing happened correctly, else False.

res:

GstMpegts.TerrestrialDeliverySystemDescriptor

Return type:

(bool, res: GstMpegts.TerrestrialDeliverySystemDescriptor)

Parses out the terrestrial delivery system from the self.