View Source MPEG.TS.PMT (MPEG.TS v2.0.2)

Program Map Table.

Summary

Functions

Categorizes a stream type as :video, :audio, or :other.

Categorizes a stream based on its stream_id (as an integer value) as :video, :audio, or :other.

Determines if a given stream type is an audio stream.

Determines if a given stream type is a video stream.

Types

@type stream_id_t() :: 0..8191
@type stream_t() :: %{stream_type: atom(), stream_type_id: stream_type_id_t()}
@type stream_type_id_t() :: 0..255
@type streams_t() :: %{required(stream_id_t()) => stream_t()}
@type t() :: %MPEG.TS.PMT{
  pcr_pid: 0..8191,
  program_info: list(),
  streams: streams_t()
}

Functions

Link to this function

get_stream_category(stream_type)

View Source

Categorizes a stream type as :video, :audio, or :other.

Examples

iex> get_stream_category(:H264)
:video

iex> get_stream_category(:AAC)
:audio

iex> get_stream_category(:DVB_SUBTITLE)
:other
Link to this function

get_stream_category_by_id(stream_id)

View Source

Categorizes a stream based on its stream_id (as an integer value) as :video, :audio, or :other.

Examples

iex> get_stream_category_by_id(0x1B)
:video

iex> get_stream_category_by_id(0x0F)
:audio

iex> get_stream_category_by_id(0x42)
:other
Link to this function

is_audio_stream?(stream_type)

View Source

Determines if a given stream type is an audio stream.

Examples

iex> is_audio_stream?(:AAC)
true

iex> is_audio_stream?(:H264)
false
Link to this function

is_video_stream?(stream_type)

View Source

Determines if a given stream type is a video stream.

Examples

iex> is_video_stream?(:H264)
true

iex> is_video_stream?(:AAC)
false
@spec unmarshal_table(binary()) :: {:ok, t()} | {:error, :invalid_data}