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.Section
object is the representation of MPEG-TS Section (SI or PSI).Various elements can post those on the bus via
Gst.Message
of 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.AtscMGT
to create theGstMpegts.Section
from- Returns:
the
GstMpegts.Section
, orNone
if 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.NIT
to create theGstMpegts.Section
from- Returns:
the
GstMpegts.Section
, orNone
if 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.PatProgram
ts_id (
int
) – Transport stream ID of the PAT
- Returns:
- Return type:
Creates a PAT
GstMpegts.Section
from the programs array ofGstMpegts.PatPrograms
- classmethod 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:
GstMpegts.Section
, orNone
if pmt is invalid- Return type:
Creates a
GstMpegts.Section
from pmt that is bound to pid
- classmethod from_scte_sit(sit, pid)[source]¶
- Parameters:
sit (
GstMpegts.SCTESIT
) – aGstMpegts.SCTESIT
to create theGstMpegts.Section
frompid (
int
) –
- Returns:
the
GstMpegts.Section
, orNone
if 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.SDT
to create theGstMpegts.Section
from- Returns:
the
GstMpegts.Section
orNone
if 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.Section
if the data was valid, elseNone
- Return type:
Creates a new
GstMpegts.Section
from 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,
None
will 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.AtscVCT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscVCT
contained in the self
- get_atsc_eit()[source]¶
- Returns:
The
GstMpegts.AtscEIT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscEIT
contained in the self.
- get_atsc_ett()[source]¶
- Returns:
The
GstMpegts.AtscETT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscETT
contained in the self.
- get_atsc_mgt()[source]¶
- Returns:
The
GstMpegts.AtscMGT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscMGT
contained in the self.
- get_atsc_rrt()[source]¶
- Returns:
The
GstMpegts.AtscRRT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscRRT
contained in the self.New in version 1.18.
- get_atsc_stt()[source]¶
- Returns:
The
GstMpegts.AtscSTT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscSTT
contained in the self.
- get_atsc_tvct()[source]¶
- Returns:
The
GstMpegts.AtscVCT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.AtscVCT
contained in the self
- get_bat()[source]¶
- Returns:
The
GstMpegts.BAT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.BAT
contained in the self.
- get_cat()[source]¶
- Returns:
The array of
GstMpegts.Descriptor
contained in the section, orNone
if 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.Descriptor
contained 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.EIT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.EIT
contained in the self.
- get_nit()[source]¶
- Returns:
The
GstMpegts.NIT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.NIT
contained in the self.
- get_pat()[source]¶
- Returns:
The
GstMpegts.PatProgram
contained in the section, orNone
if 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.PatProgram
contained in the section.Note: The PAT
transport_stream_id
field corresponds to the “subtable_extension” field of the provided self.
- get_pmt()[source]¶
- Returns:
The
GstMpegts.PMT
contained in the section, orNone
if an error happened.- Return type:
Parses the Program Map Table contained in the self.
- get_scte_sit()[source]¶
- Returns:
The
GstMpegts.SCTESIT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.SCTESIT
contained in the self.
- get_sdt()[source]¶
- Returns:
The
GstMpegts.SDT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.SDT
contained in the self.
- get_sit()[source]¶
- Returns:
The
GstMpegts.SIT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.SIT
contained in the self.New in version 1.20.
- get_tdt()[source]¶
- Returns:
The
Gst.DateTime
contained in the section, orNone
if an error happened. Release withGst.DateTime.unref
when done.- Return type:
Gst.DateTime
orNone
Returns the
Gst.DateTime
of the TDT
- get_tot()[source]¶
- Returns:
The
GstMpegts.TOT
contained in the section, orNone
if an error happened.- Return type:
Returns the
GstMpegts.TOT
contained in the self.
- get_tsdt()[source]¶
- Returns:
The array of
GstMpegts.Descriptor
contained in the section, orNone
if 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.Descriptor
contained in the section
- packetize()[source]¶
- Returns:
pointer to section data, or
None
on 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.Element
to send to section event to- Returns:
True
if the event was sent to the element.- Return type:
Creates a custom
Gst.Event
with a GstMpegtsSection and send it the elementGst.Element
.
- Generic usage of sections with