MPEG.TS.Muxer (MPEG.TS v2.2.0)
View SourceModule responsible for muxing acces units into mpeg-ts packets.
Summary
Functions
Add a new elementary stream.
Mux the PAT table into a packet.
Mux a PCR packet.
Mux the PMT table into a packet.
Mux a media sample.
Create a new muxer.
Types
@type t() :: %MPEG.TS.Muxer{ continuity_counters: %{required(MPEG.TS.Packet.pid_t()) => 0..15}, pat: MPEG.TS.PAT.t(), pid_to_stream_id: %{required(MPEG.TS.Packet.pid_t()) => non_neg_integer()}, pmt: MPEG.TS.PMT.t() }
@type timestamp() :: non_neg_integer()
Functions
@spec add_elementary_stream(t(), MPEG.TS.PMT.stream_type_id_t(), boolean()) :: {MPEG.TS.Packet.pid_t(), t()}
Add a new elementary stream.
@spec mux_pat(t()) :: {MPEG.TS.Packet.t(), t()}
Mux the PAT table into a packet.
@spec mux_pcr(t(), timestamp()) :: {MPEG.TS.Packet.t(), t()}
Mux a PCR packet.
@spec mux_pmt(t()) :: {MPEG.TS.Packet.t(), t()}
Mux the PMT table into a packet.
@spec mux_sample( t(), MPEG.TS.Packet.pid_t(), iodata(), timestamp(), keyword() ) :: {[MPEG.TS.Packet.t()], t()}
Mux a media sample.
The following optional options may be provided:
:sync?
- whether the sample is a sync sample (keyframe). Default:false
:send_pcr?
- whether to send a PCR with this sample. Default:false
:dts
- the decoding timestamp of the sample. Default:nil
@spec new() :: t()
Create a new muxer.