RTSP.RTP.Encoder behaviour (RTSP v0.3.2)

View Source

Behaviour to payload data into rtp packets.

Summary

Callbacks

Invoked to handle a new sample (e.g. access unit in case of video)

Initialize deapyloader

Types

init_opts()

@type init_opts() :: [
  {:sequence_number, non_neg_integer()}
  | {:max_payload_size, non_neg_integer()}
  | {:payload_type, non_neg_integer()}
  | {:ssrc, non_neg_integer()}
  | {atom(), any()}
]

rtp_timestamp()

@type rtp_timestamp() :: non_neg_integer()

sample()

@type sample() :: binary()

state()

@type state() :: %{:sequence_number => non_neg_integer(), required(atom()) => any()}

Callbacks

handle_sample(sample, rtp_timestamp, state)

@callback handle_sample(sample(), rtp_timestamp(), state()) ::
  {[ExRTP.Packet.t()], state()}

Invoked to handle a new sample (e.g. access unit in case of video)

init(init_opts)

@callback init(init_opts()) :: state()

Initialize deapyloader