ExWebRTC.RTP.Depayloader (ex_webrtc v0.15.0)
View SourceRTP depayloader.
It unpacks RTP packets into audio/video frames.
Summary
Functions
Processes binary data from a single RTP packet, and outputs a frame if assembled.
Creates a new depayloader that matches the passed codec parameters.
Types
Functions
@spec depayload(depayloader(), ExRTP.Packet.t()) :: {(frame :: binary()) | (dtmf_event :: map()) | nil, depayloader()}
Processes binary data from a single RTP packet, and outputs a frame if assembled.
Returns a tuple where the first element is a frame, dtmf event (map), or nil
if a frame/dtmf event
could not be depayloaded yet, and the second element is the updated depayloader.
@spec new(ExWebRTC.RTPCodecParameters.t()) :: {:ok, depayloader()} | {:error, :no_depayloader_for_codec}
Creates a new depayloader that matches the passed codec parameters.