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.PESMetadataMeta
to a buffer.New in version 1.24.
- GstMpegts.descriptor_from_custom(tag, data)[source]¶
- Parameters:
- Returns:
- Return type:
Creates a
GstMpegts.Descriptor
with custom tag and data
- GstMpegts.descriptor_from_custom_with_extension(tag, tag_extension, data)[source]¶
- Parameters:
- Returns:
- Return type:
Creates a
GstMpegts.Descriptor
with 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.Descriptor
orNone
on fail- Return type:
Creates a
GstMpegts.Descriptor
to be aGstMpegts.DVBDescriptorType.NETWORK_NAME
, with the network name name. The data field of theGstMpegts.Descriptor
will 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.DVBServiceType
service_provider (
str
orNone
) – Name of the service provider
- Returns:
the
GstMpegts.Descriptor
orNone
on fail- Return type:
Fills a
GstMpegts.Descriptor
to be aGstMpegts.DVBDescriptorType.SERVICE
. The data field of theGstMpegts.Descriptor
will 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
,None
on failure- Return type:
Creates a
GstMpegts.DescriptorType.ISO_639_LANGUAGE
GstMpegts.Descriptor
with a single language
- GstMpegts.descriptor_from_registration(format_identifier, additional_info)[source]¶
- Parameters:
- Returns:
GstMpegts.Descriptor
,None
on failure- Return type:
Creates a
GstMpegts.DescriptorType.REGISTRATION
GstMpegts.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.Section
to put in a message- Returns:
The new custom
Gst.Event
.- Return type:
Creates a new
Gst.Event
for aGstMpegts.Section
.New in version 1.20.
- GstMpegts.event_parse_mpegts_section(event)[source]¶
- Parameters:
event (
Gst.Event
) –Gst.Event
containing aGstMpegts.Section
- Returns:
The extracted
GstMpegts.Section
, orNone
if the event did not contain a validGstMpegts.Section
.- Return type:
Extracts the
GstMpegts.Section
contained in the eventGst.Event
- GstMpegts.find_descriptor(descriptors, tag)[source]¶
- Parameters:
descriptors ([
GstMpegts.Descriptor
]) – an array ofGstMpegts.Descriptor
tag (
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.Array
manually.
- GstMpegts.find_descriptor_with_extension(descriptors, tag, tag_extension)[source]¶
- Parameters:
descriptors ([
GstMpegts.Descriptor
]) – an array ofGstMpegts.Descriptor
tag (
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.Array
manually.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.Section
to put in a message
- Returns:
The new
Gst.Message
to be posted, orNone
if the section is not valid.- Return type:
Creates a new
Gst.Message
for 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.Section
contained in a message.
- GstMpegts.parse_descriptors(buffer, buf_len)[source]¶
- Parameters:
- 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:
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.PtrArray
forGstMpegts.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.GType
associated withGstMpegts.PESMetadataMeta
New in version 1.24.
- GstMpegts.pes_metadata_meta_get_info()[source]¶
- Returns:
The
Gst.MetaInfo
- Return type:
Gets the global
Gst.MetaInfo
describing theGstMpegts.PESMetadataMeta
meta.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.SCTESIT
setup to cancel the specified event_id.
- GstMpegts.scte_null_new()[source]¶
- Returns:
A newly allocated
GstMpegts.SCTESIT
- Return type:
Allocates and initializes a
None
commandGstMpegts.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.SCTESIT
for the given event_id and splice_time.If the splice_time is
GObject.G_MAXUINT64
then 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.SCTESIT
for the given event_id, splice_time and duration.If the splice_time is
GObject.G_MAXUINT64
then 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.AtscMGT
to create theGstMpegts.Section
from- Returns:
- Return type:
New in version 1.18.
- 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.NIT
to create theGstMpegts.Section
from- Returns:
- 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.PatProgram
ts_id (
int
) – Transport stream ID of the PAT
- Returns:
- Return type:
Creates a PAT
GstMpegts.Section
from the programs array ofGstMpegts.PatPrograms
- GstMpegts.section_from_pmt(pmt, pid)[source]¶
- Parameters:
pmt (
GstMpegts.PMT
) – aGstMpegts.PMT
to create aGstMpegts.Section
frompid (
int
) – The PID that theGstMpegts.PMT
belongs to
- Returns:
- Return type:
Creates a
GstMpegts.Section
from pmt that is bound to pid
- GstMpegts.section_from_scte_sit(sit, pid)[source]¶
- Parameters:
sit (
GstMpegts.SCTESIT
) – aGstMpegts.SCTESIT
to create theGstMpegts.Section
frompid (
int
) –
- Returns:
- 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.SDT
to create theGstMpegts.Section
from- Returns:
- Return type:
Ownership of sdt is taken. The data in sdt is managed by the
GstMpegts.Section