Gjsify LogoGjsify Logo

The %GstMpegtsSection object is the representation of MPEG-TS Section (SI or PSI).

Various elements can post those on the bus via %GstMessage of type %GST_MESSAGE_ELEMENT. The gst_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 via gst_mpegts_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 gst_mpegts_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:

  • gst_mpegts_section_get_pat()
  • gst_mpegts_pat_program_new()
  • %GstMpegtsPatProgram

Conditional Access Table (CAT)

See:

  • gst_mpegts_section_get_cat()

Program Map Table (PMT)

See:

  • %GstMpegtsPMT
  • gst_mpegts_section_get_pmt()
  • gst_mpegts_pmt_new()
  • %GstMpegtsPMTStream

Transport Stream Description Table (TSDT)

See:

  • gst_mpegts_section_get_tsdt()

API

record

Hierarchy

  • Section

Index

Constructors

  • new Section(pid: number, data: Uint8Array): Section
  • Creates a new #GstMpegtsSection 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, %NULL will be returned.

    Note: it is the responsibility of the caller to ensure data does point to the beginning of the section.

    Parameters

    • pid: number

      the PID to which this section belongs

    • data: Uint8Array

      a pointer to the beginning of the section (i.e. the first byte should contain the table_id field).

    Returns Section

Properties

crc: number

Checksum (if applicable)

field
current_next_indicator: boolean

Applies to current/next stream or not

field
last_section_number: number

Number of the last expected section (if multiple)

field
pid: number

The PID on which this section was found or belongs to.

field
section_number: number

Number of the section (if multiple)

field
section_type: SectionType

The type of section.

field
subtable_extension: number

This meaning differs per section. See the documentation of the parsed section type for the meaning of this field

field
table_id: number

The table id of this section. See %GstMpegtsSectionTableID and derivates for more information.

field
version_number: number

Version of the section.

field
name: string

Methods

  • Parses a Program Association Table (ITU H.222.0, ISO/IEC 13818-1).

    Returns the array of #GstMpegtsPatProgram contained in the section.

    Note: The PAT transport_stream_id field corresponds to the "subtable_extension" field of the provided section.

    Returns PatProgram[]

  • packetize(): [number, number]
  • Packetize (i.e. serialize) the section. If the data in section has already been packetized, the data pointer is returned immediately. Otherwise, the data field is allocated and populated.

    Returns [number, number]

  • Creates a custom #GstEvent with a GstMpegtsSection and send it the element #GstElement.

    Parameters

    • element: Gst.Element

      The #GstElement to send to section event to

    Returns boolean

  • Creates a #GstMpegtsSection from pmt that is bound to pid

    Parameters

    • pmt: PMT

      a #GstMpegtsPMT to create a #GstMpegtsSection from

    • pid: number

      The PID that the #GstMpegtsPMT belongs to

    Returns Section

  • new(pid: number, data: Uint8Array): Section
  • Creates a new #GstMpegtsSection 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, %NULL will be returned.

    Note: it is the responsibility of the caller to ensure data does point to the beginning of the section.

    Parameters

    • pid: number

      the PID to which this section belongs

    • data: Uint8Array

      a pointer to the beginning of the section (i.e. the first byte should contain the table_id field).

    Returns Section

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method