Functions¶
Details¶
- GstMpegts.buffer_add_mpegts_pes_metadata_meta(buffer)[source]¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Buffer- Returns:
a newly created
GstMpegts.PESMetadataMeta- Return type:
Creates and adds a
GstMpegts.PESMetadataMetato a buffer.New in version 1.24.
- GstMpegts.descriptor_from_custom(tag, data)[source]¶
- Parameters:
- Returns:
GstMpegts.Descriptor, orNoneif input is invalid- Return type:
Creates a
GstMpegts.Descriptorwith custom tag and data
- GstMpegts.descriptor_from_custom_with_extension(tag, tag_extension, data)[source]¶
- Parameters:
- Returns:
- Return type:
Creates a
GstMpegts.Descriptorwith custom tag, tag_extension and dataNew in version 1.20.
- GstMpegts.descriptor_from_dvb_network_name(name)[source]¶
- Parameters:
name (
str) – the network name to set- Returns:
the
GstMpegts.DescriptororNoneon failure.- Return type:
Creates a
GstMpegts.Descriptorto be aGstMpegts.DVBDescriptorType.NETWORK_NAME, with the network name name. The data field of theGstMpegts.Descriptorwill be allocated, and transferred to the caller.
- GstMpegts.descriptor_from_dvb_service(service_type, service_name, service_provider)[source]¶
- Parameters:
service_type (
GstMpegts.DVBServiceType) – Service type defined as aGstMpegts.DVBServiceTypeservice_provider (
strorNone) – Name of the service provider
- Returns:
the
GstMpegts.DescriptororNoneon failure- Return type:
Fills a
GstMpegts.Descriptorto be aGstMpegts.DVBDescriptorType.SERVICE. The data field of theGstMpegts.Descriptorwill be allocated, and transferred to the caller.
- GstMpegts.descriptor_from_dvb_subtitling(lang, type, composition, ancillary)[source]¶
- Parameters:
- Return type:
- GstMpegts.descriptor_from_iso_639_language(language)[source]¶
- Parameters:
- Returns:
GstMpegts.Descriptor,Noneon failure- Return type:
Creates a
GstMpegts.DescriptorType.ISO_639_LANGUAGEGstMpegts.Descriptorwith a single language
- GstMpegts.descriptor_from_jpeg_xs(jpegxs)[source]¶
- Parameters:
jpegxs (
GstMpegts.JpegXsDescriptor) – AGstMpegts.JpegXsDescriptor- Returns:
- Return type:
Create a new
GstMpegts.Descriptorbased on the information in jpegxsNew in version 1.26.
- GstMpegts.descriptor_from_metadata(metadata_descriptor)[source]¶
- Parameters:
metadata_descriptor (
GstMpegts.MetadataDescriptor) –- Return type:
New in version 1.26.
- GstMpegts.descriptor_from_metadata_pointer(metadata_pointer_descriptor)[source]¶
- Parameters:
metadata_pointer_descriptor (
GstMpegts.MetadataPointerDescriptor) – aGstMpegts.MetadataPointerDescriptor- Returns:
a
GstMpegts.Descriptorfrom the metadata pointer descriptor.- Return type:
New in version 1.26.
- GstMpegts.descriptor_from_registration(format_identifier, additional_info)[source]¶
- Parameters:
- Returns:
GstMpegts.Descriptor,Noneon failure- Return type:
Creates a
GstMpegts.DescriptorType.REGISTRATIONGstMpegts.Descriptor
- GstMpegts.descriptor_parse_audio_preselection_dump(source)[source]¶
- Parameters:
source (
GstMpegts.AudioPreselectionDescriptor) –
New in version 1.20.
- GstMpegts.descriptor_parse_audio_preselection_free(source)[source]¶
- Parameters:
source (
GstMpegts.AudioPreselectionDescriptor) –
New in version 1.20.
- GstMpegts.dvb_component_descriptor_free(source)[source]¶
- Parameters:
source (
GstMpegts.ComponentDescriptor) –
- GstMpegts.event_new_mpegts_section(section)[source]¶
- Parameters:
section (
GstMpegts.Section) – TheGstMpegts.Sectionto put in a message- Returns:
The new custom
Gst.Event.- Return type:
Creates a new
Gst.Eventfor aGstMpegts.Section.New in version 1.20.
- GstMpegts.event_parse_mpegts_section(event)[source]¶
- Parameters:
event (
Gst.Event) –Gst.Eventcontaining aGstMpegts.Section- Returns:
The extracted
GstMpegts.Section, orNoneif the event did not contain a validGstMpegts.Section.- Return type:
Extracts the
GstMpegts.Sectioncontained in the eventGst.Event
- GstMpegts.find_descriptor(descriptors, tag)[source]¶
- Parameters:
descriptors ([
GstMpegts.Descriptor]) – an array ofGstMpegts.Descriptortag (
int) – the tag to look for
- Returns:
the first descriptor matching tag, else
None.- Return type:
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.Arraymanually.
- GstMpegts.find_descriptor_with_extension(descriptors, tag, tag_extension)[source]¶
- Parameters:
descriptors ([
GstMpegts.Descriptor]) – an array ofGstMpegts.Descriptortag (
int) – the tag to look fortag_extension (
int) –
- Returns:
the first descriptor matchin tag with tag_extension, else
None.- Return type:
Finds the first descriptor of type tag with tag_extension in the array.
Note: To look for descriptors that can be present more than once in an array of descriptors, iterate the
GLib.Arraymanually.New in version 1.20.
- GstMpegts.initialize()[source]¶
Initializes the MPEG-TS helper library. Must be called before any usage.
- GstMpegts.message_new_mpegts_section(parent, section)[source]¶
- Parameters:
parent (
Gst.Object) – The creator of the messagesection (
GstMpegts.Section) – TheGstMpegts.Sectionto put in a message
- Returns:
The new
Gst.Messageto be posted, orNoneif the section is not valid.- Return type:
Gst.MessageorNone
Creates a new
Gst.Messagefor a GstMpegtsSection.
- GstMpegts.message_parse_mpegts_section(message)[source]¶
- Parameters:
message (
Gst.Message) – aGst.Message- Returns:
the contained
GstMpegts.Section, orNone.- Return type:
Returns the
GstMpegts.Sectioncontained in a message.
- GstMpegts.parse_descriptors(buffer, buf_len)[source]¶
- Parameters:
- Returns:
an array of the parsed descriptors or
Noneif there was an error. Release with #g_array_unref when done with it.- Return type:
[
GstMpegts.Descriptor] orNone
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:
Allocates a new
GLib.PtrArrayforGstMpegts.PatProgram. The array can be filled and then converted to a PAT section withGstMpegts.Section.from_pat().
- GstMpegts.pes_metadata_meta_api_get_type()[source]¶
- Returns:
- Return type:
Return the
GObject.GTypeassociated withGstMpegts.PESMetadataMetaNew in version 1.24.
- GstMpegts.pes_metadata_meta_get_info()[source]¶
- Returns:
The
Gst.MetaInfo- Return type:
Gets the global
Gst.MetaInfodescribing theGstMpegts.PESMetadataMetameta.New in version 1.24.
- GstMpegts.scte_cancel_new(event_id)[source]¶
- Parameters:
event_id (
int) – The event ID to cancel.- Returns:
A newly allocated
GstMpegts.SCTESIT- Return type:
Allocates and initializes a new INSERT command
GstMpegts.SCTESITsetup to cancel the specified event_id.
- GstMpegts.scte_null_new()[source]¶
- Returns:
A newly allocated
GstMpegts.SCTESIT- Return type:
Allocates and initializes a
NonecommandGstMpegts.SCTESIT.
- GstMpegts.scte_splice_in_new(event_id, splice_time)[source]¶
- Parameters:
- Returns:
A newly allocated
GstMpegts.SCTESIT- Return type:
Allocates and initializes a new “Splice In” INSERT command
GstMpegts.SCTESITfor the given event_id and splice_time.If the splice_time is
GObject.G_MAXUINT64then the event will be immediate as opposed to for the target splice_time.
- GstMpegts.scte_splice_out_new(event_id, splice_time, duration)[source]¶
- Parameters:
- Returns:
A newly allocated
GstMpegts.SCTESIT- Return type:
Allocates and initializes a new “Splice Out” INSERT command
GstMpegts.SCTESITfor the given event_id, splice_time and duration.If the splice_time is
GObject.G_MAXUINT64then the event will be immediate as opposed to for the target splice_time.If the duration is 0 it won’t be specified in the event.
- GstMpegts.section_from_atsc_mgt(mgt)[source]¶
- Parameters:
mgt (
GstMpegts.AtscMGT) – aGstMpegts.AtscMGTto create theGstMpegts.Sectionfrom- Returns:
the
GstMpegts.Section, orNoneif mgt is invalid- Return type:
- GstMpegts.section_from_atsc_rrt(rrt)[source]¶
- Parameters:
rrt (
GstMpegts.AtscRRT) –- Return type:
- GstMpegts.section_from_atsc_stt(stt)[source]¶
- Parameters:
stt (
GstMpegts.AtscSTT) –- Return type:
- GstMpegts.section_from_nit(nit)[source]¶
- Parameters:
nit (
GstMpegts.NIT) – aGstMpegts.NITto create theGstMpegts.Sectionfrom- Returns:
the
GstMpegts.Section, orNoneif nit is invalid- Return type:
Ownership of nit is taken. The data in nit is managed by the
GstMpegts.Section
- GstMpegts.section_from_pat(programs, ts_id)[source]¶
- Parameters:
programs ([
GstMpegts.PatProgram]) – an array ofGstMpegts.PatProgramts_id (
int) – Transport stream ID of the PAT
- Returns:
- Return type:
Creates a PAT
GstMpegts.Sectionfrom the programs array ofGstMpegts.PatPrograms
- GstMpegts.section_from_pmt(pmt, pid)[source]¶
- Parameters:
pmt (
GstMpegts.PMT) – aGstMpegts.PMTto create aGstMpegts.Sectionfrompid (
int) – The PID that theGstMpegts.PMTbelongs to
- Returns:
GstMpegts.Section, orNoneif pmt is invalid- Return type:
Creates a
GstMpegts.Sectionfrom pmt that is bound to pid
- GstMpegts.section_from_scte_sit(sit, pid)[source]¶
- Parameters:
sit (
GstMpegts.SCTESIT) – aGstMpegts.SCTESITto create theGstMpegts.Sectionfrompid (
int) –
- Returns:
the
GstMpegts.Section, orNoneif sit is invalid- Return type:
Ownership of sit is taken. The data in sit is managed by the
GstMpegts.Section
- GstMpegts.section_from_sdt(sdt)[source]¶
- Parameters:
sdt (
GstMpegts.SDT) – aGstMpegts.SDTto create theGstMpegts.Sectionfrom- Returns:
the
GstMpegts.SectionorNoneif sdt is invalid- Return type:
Ownership of sdt is taken. The data in sdt is managed by the
GstMpegts.Section