RTSP.RTP.Encoder behaviour (RTSP v0.4.0)
View SourceBehaviour to payload data into rtp packets.
Summary
Callbacks
Invoked to flush the encoder. All remaining data are encoded into a final RTP packet
Invoked to handle a new sample (e.g. access unit in case of video)
Initialize deapyloader
Types
@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()} ]
@type rtp_timestamp() :: non_neg_integer()
@type sample() :: binary()
@type state() :: %{:sequence_number => non_neg_integer(), required(atom()) => any()}
Callbacks
@callback flush(state()) :: [ExRTP.Packet.t()]
Invoked to flush the encoder. All remaining data are encoded into a final RTP packet
@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)
Initialize deapyloader