Functions

  descriptor_from_custom (tag, data)
  descriptor_from_custom_with_extension (tag, tag_extension, data)
  descriptor_from_dvb_network_name (name)
  descriptor_from_dvb_service (service_type, service_name, service_provider)
  descriptor_from_dvb_subtitling (lang, type, composition, ancillary)
  descriptor_from_iso_639_language (language)
  descriptor_from_registration (format_identifier, additional_info)
  dvb_component_descriptor_free (source)
  event_parse_mpegts_section (event)
  find_descriptor (descriptors, tag)
  initialize ()
  message_new_mpegts_section (parent, section)
  message_parse_mpegts_section (message)
  parse_descriptors (buffer, buf_len)
  pat_new ()
  section_from_nit (nit)
  section_from_pat (programs, ts_id)
  section_from_pmt (pmt, pid)
  section_from_sdt (sdt)

Details

GstMpegts.descriptor_from_custom(tag, data)[source]
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

GstMpegts.descriptor_from_custom_with_extension(tag, tag_extension, data)[source]
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

GstMpegts.descriptor_from_dvb_network_name(name)[source]
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.

GstMpegts.descriptor_from_dvb_service(service_type, service_name, service_provider)[source]
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.

GstMpegts.descriptor_from_dvb_subtitling(lang, type, composition, ancillary)[source]
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

GstMpegts.descriptor_from_iso_639_language(language)[source]
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

GstMpegts.descriptor_from_registration(format_identifier, additional_info)[source]
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

GstMpegts.dvb_component_descriptor_free(source)[source]
Parameters:source (GstMpegts.ComponentDescriptor) –
GstMpegts.event_parse_mpegts_section(event)[source]
Parameters:event (Gst.Event) – Gst.Event containing a GstMpegts.Section
Returns:The extracted GstMpegts.Section
Return type:GstMpegts.Section

Extracts the GstMpegts.Section contained in the event Gst.Event

GstMpegts.find_descriptor(descriptors, tag)[source]
Parameters:
Returns:

the first descriptor matchin tag, else None.

Return type:

GstMpegts.Descriptor

Finds the first descriptor of type tag in the array.

Note: To look for descriptors that can be present more than once in an array of descriptors, iterate the GLib.Array manually.

GstMpegts.initialize()[source]

Initializes the MPEG-TS helper library. Must be called before any usage.

GstMpegts.message_new_mpegts_section(parent, section)[source]
Parameters:
Returns:

The new Gst.Message to be posted, or None if the section is not valid.

Return type:

Gst.Message

Creates a new Gst.Message for a GstMpegtsSection.

GstMpegts.message_parse_mpegts_section(message)[source]
Parameters:message (Gst.Message) – a Gst.Message
Returns:the contained GstMpegts.Section, or None.
Return type:GstMpegts.Section

Returns the GstMpegts.Section contained in a message.

GstMpegts.parse_descriptors(buffer, buf_len)[source]
Parameters:
  • buffer (int) – descriptors to parse
  • buf_len (int) – Size of buffer
Returns:

an array of the parsed descriptors or None if there was an error. Release with #g_array_unref when done with it.

Return type:

[GstMpegts.Descriptor]

Parses the descriptors present in buffer and returns them as an array.

Note: The data provided in buffer will not be copied.

GstMpegts.pat_new()[source]
Returns:A newly allocated GLib.PtrArray
Return type:[GstMpegts.PatProgram]

Allocates a new GLib.PtrArray for GstMpegts.PatProgram

GstMpegts.section_from_nit(nit)[source]
Parameters:nit (GstMpegts.NIT) – a GstMpegts.NIT to create the GstMpegts.Section from
Returns:the GstMpegts.Section
Return type:GstMpegts.Section

Ownership of nit is taken. The data in nit is managed by the GstMpegts.Section

GstMpegts.section_from_pat(programs, ts_id)[source]
Parameters:
Returns:

a GstMpegts.Section

Return type:

GstMpegts.Section

Creates a PAT GstMpegts.Section from the programs array of GstMpegts.PatPrograms

GstMpegts.section_from_pmt(pmt, pid)[source]
Parameters:
Returns:

GstMpegts.Section

Return type:

GstMpegts.Section

Creates a GstMpegts.Section from pmt that is bound to pid

GstMpegts.section_from_sdt(sdt)[source]
Parameters:sdt (GstMpegts.SDT) – a GstMpegts.SDT to create the GstMpegts.Section from
Returns:the GstMpegts.Section
Return type:GstMpegts.Section

Ownership of sdt is taken. The data in sdt is managed by the GstMpegts.Section