MPEG.TS.PSI (MPEG.TS v3.2.3)

View Source

Program Specific Information payload. Supported tables are PMT and PAT.

Summary

Functions

Maps a table_id to its corresponding table type atom based on ISO/IEC 13818-1.

Types

header_t()

@type header_t() :: %{
  table_id: 0..255,
  section_syntax_indicator: boolean(),
  section_length: 0..4095,
  transport_stream_id: 0..65535 | nil,
  version_number: 0..31 | nil,
  current_next_indicator: boolean() | nil,
  section_number: 0..255 | nil,
  last_section_number: 0..255 | nil
}

t()

@type t() :: %MPEG.TS.PSI{
  crc: binary(),
  header: header_t(),
  table: struct() | bitstring(),
  table_type: atom()
}

Functions

table_id_to_type(id)

@spec table_id_to_type(0..255) :: atom()

Maps a table_id to its corresponding table type atom based on ISO/IEC 13818-1.

Standard Table IDs (ISO/IEC 13818-1)

  • 0x00 - Program Association Table (PAT)
  • 0x01 - Conditional Access Table (CAT)
  • 0x02 - Program Map Table (PMT)
  • 0x03 - Transport Stream Description Table
  • 0x04 - ISO/IEC 14496 scene description section
  • 0x05 - ISO/IEC 14496 object description section
  • 0x06 - Metadata section
  • 0x07 - ISO/IEC 13818-11 IPMP control information (DRM)
  • 0x08-0x39 - Reserved
  • 0x3A-0x3F - ISO/IEC 13818-6 DSM CC sections
  • 0x40-0x7F - Used by DVB
  • 0x80-0x8F - DVB-CSA and DigiCipher II/ATSC CA message sections
  • 0x90-0xBF - May be assigned as needed to other data tables
  • 0xC0-0xFE - Used by DigiCipher II/ATSC/SCTE (includes SCTE-35 at 0xFC)
  • 0xFF - Forbidden (used for null padding)

Examples

iex> table_id_to_type(0x00)
:pat

iex> table_id_to_type(0x02)
:pmt

iex> table_id_to_type(0xFC)
:scte35

iex> table_id_to_type(0xFF)
:forbidden

unmarshal_header(arg1)

unmarshal_header(data, bool)