GstMpegts.Section¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
cached_parsed |
r |
||
crc |
r/w |
Checksum (if applicable) |
|
current_next_indicator |
r/w |
Applies to current/next stream or not |
|
data |
r |
||
destroy_parsed |
r |
||
last_section_number |
r/w |
Number of the last expected section (if multiple) |
|
offset |
r |
||
packetizer |
r |
||
parent |
r |
||
pid |
r/w |
The PID on which this section was found or belongs to. |
|
section_length |
r |
||
section_number |
r/w |
Number of the section (if multiple) |
|
section_type |
r/w |
The type of section. |
|
short_section |
r |
||
subtable_extension |
r/w |
This meaning differs per section. See the documentation of the parsed section type for the meaning of this field |
|
table_id |
r/w |
The table id of this section. See |
|
version_number |
r/w |
Version of the section. |
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GstMpegts.Section¶
- Generic usage of sections with
GstMpegts.Section
The
GstMpegts.Sectionobject is the representation of MPEG-TS Section (SI or PSI).Various elements can post those on the bus via
Gst.Messageof typeGst.MessageType.ELEMENT. TheGstMpegts.message_parse_mpegts_section() function provides access to the section.Applications (or other elements) can create them either by using one of the
gst_mpegts_section_from_*functions, or by providing the raw SI data viaGstMpegts.Section.new().Elements outputting MPEG-TS streams can also create sections using the various convenience functions and then get the packetized data (to be inserted in MPEG-TS packets) using
GstMpegts.Section.packetize().For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications and other specifications mentioned in the documentation.
- Supported base MPEG-TS sections
These are the sections for which parsing and packetizing code exists.
- Program Association Table (PAT)
See:
- Conditional Access Table (CAT)
See:
- Program Map Table (PMT)
See:
- Transport Stream Description Table (TSDT)
See:
- API
- classmethod from_atsc_mgt(mgt)[source]¶
- Parameters:
mgt (
GstMpegts.AtscMGT) – aGstMpegts.AtscMGTto create theGstMpegts.Sectionfrom- Returns:
the
GstMpegts.Section, orNoneif mgt is invalid- Return type:
- classmethod from_atsc_rrt(rrt)[source]¶
- Parameters:
rrt (
GstMpegts.AtscRRT) –- Return type:
- classmethod from_atsc_stt(stt)[source]¶
- Parameters:
stt (
GstMpegts.AtscSTT) –- Return type:
- classmethod 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
- classmethod 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
- classmethod 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
- classmethod 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
- classmethod 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
- classmethod new(pid, data)[source]¶
- Parameters:
- Returns:
A new
GstMpegts.Sectionif the data was valid, elseNone- Return type:
Creates a new
GstMpegts.Sectionfrom the provided data.Note: Ensuring data is big enough to contain the full section is the responsibility of the caller. If it is not big enough,
Nonewill be returned.Note: it is the responsibility of the caller to ensure data does point to the beginning of the section.
- get_atsc_cvct()[source]¶
- Returns:
The
GstMpegts.AtscVCTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscVCTcontained in the self
- get_atsc_eit()[source]¶
- Returns:
The
GstMpegts.AtscEITcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscEITcontained in the self.
- get_atsc_ett()[source]¶
- Returns:
The
GstMpegts.AtscETTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscETTcontained in the self.
- get_atsc_mgt()[source]¶
- Returns:
The
GstMpegts.AtscMGTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscMGTcontained in the self.
- get_atsc_rrt()[source]¶
- Returns:
The
GstMpegts.AtscRRTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscRRTcontained in the self.New in version 1.18.
- get_atsc_stt()[source]¶
- Returns:
The
GstMpegts.AtscSTTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscSTTcontained in the self.
- get_atsc_tvct()[source]¶
- Returns:
The
GstMpegts.AtscVCTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.AtscVCTcontained in the self
- get_bat()[source]¶
- Returns:
The
GstMpegts.BATcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.BATcontained in the self.
- get_cat()[source]¶
- Returns:
The array of
GstMpegts.Descriptorcontained in the section, orNoneif an error happened. Release with #g_array_unref when done.- Return type:
[
GstMpegts.Descriptor] orNone
Parses a Conditional Access Table.
Returns the array of
GstMpegts.Descriptorcontained in the Conditional Access Table.
- get_data()[source]¶
- Returns:
The original unparsed section data.
- Return type:
Gets the original unparsed section data.
- get_eit()[source]¶
- Returns:
The
GstMpegts.EITcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.EITcontained in the self.
- get_nit()[source]¶
- Returns:
The
GstMpegts.NITcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.NITcontained in the self.
- get_pat()[source]¶
- Returns:
The
GstMpegts.PatProgramcontained in the section, orNoneif an error happened or the self did not contain a valid PAT. Release with #g_ptr_array_unref when done.- Return type:
[
GstMpegts.PatProgram] orNone
Parses a Program Association Table (ITU H.222.0, ISO/IEC 13818-1).
Returns the array of
GstMpegts.PatProgramcontained in the section.Note: The PAT
transport_stream_idfield corresponds to the “subtable_extension” field of the provided self.
- get_pmt()[source]¶
- Returns:
The
GstMpegts.PMTcontained in the section, orNoneif an error happened.- Return type:
Parses the Program Map Table contained in the self.
- get_scte_sit()[source]¶
- Returns:
The
GstMpegts.SCTESITcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.SCTESITcontained in the self.
- get_sdt()[source]¶
- Returns:
The
GstMpegts.SDTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.SDTcontained in the self.
- get_sit()[source]¶
- Returns:
The
GstMpegts.SITcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.SITcontained in the self.New in version 1.20.
- get_tdt()[source]¶
- Returns:
The
Gst.DateTimecontained in the section, orNoneif an error happened. Release withGst.DateTime.unrefwhen done.- Return type:
Gst.DateTimeorNone
Returns the
Gst.DateTimeof the TDT
- get_tot()[source]¶
- Returns:
The
GstMpegts.TOTcontained in the section, orNoneif an error happened.- Return type:
Returns the
GstMpegts.TOTcontained in the self.
- get_tsdt()[source]¶
- Returns:
The array of
GstMpegts.Descriptorcontained in the section, orNoneif an error happened. Release with #g_array_unref when done.- Return type:
[
GstMpegts.Descriptor] orNone
Parses a Transport Stream Description Table.
Returns the array of
GstMpegts.Descriptorcontained in the section
- packetize()[source]¶
- Returns:
pointer to section data, or
Noneon failure.- output_size:
#gsize to hold the size of the data
- Return type:
Packetize (i.e. serialize) the self. If the data in self has already been packetized, the data pointer is returned immediately. Otherwise, the data field is allocated and populated.
- send_event(element)[source]¶
- Parameters:
element (
Gst.Element) – TheGst.Elementto send to section event to- Returns:
Trueif the event was sent to the element.- Return type:
Creates a custom
Gst.Eventwith a GstMpegtsSection and send it the elementGst.Element.
- Generic usage of sections with