Membrane.MPEGTS.Muxer.Engine (Membrane MPEG-TS Plugin v0.5.0)

View Source

A module with functionalities allowing for muxing stream into the MPEG-TS container.

Summary

Functions

Creates a new muxer instance and returns initial payload with container metadata.

Adds a frame to a given track and returns next part of the container payload.

Adds a new track to the muxer and returns track metadata.

Types

t()

@type t() :: %{
  ts: Membrane.MPEGTS.Muxer.TS.t(),
  tracks_pids: [{track(), pos_integer()}],
  next_es_pid: pos_integer()
}

track()

@type track() :: :audio | :video

Functions

new()

@spec new() :: {binary(), t()}

Creates a new muxer instance and returns initial payload with container metadata.

put_frame(frame, track_type, pts_ms, dts_ms, state)

@spec put_frame(binary(), track(), non_neg_integer(), non_neg_integer(), t()) ::
  {binary(), t()}

Adds a frame to a given track and returns next part of the container payload.

register_track(track_type, state)

@spec register_track(track(), t()) :: {binary(), t()}

Adds a new track to the muxer and returns track metadata.