View Source ExWebRTC.RTP.Depayloader (ex_webrtc v0.6.2)

RTP 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

@opaque depayloader()

Functions

Link to this function

depayload(depayloader, packet)

View Source
@spec depayload(depayloader(), ExRTP.Packet.t()) :: {binary() | nil, depayloader()}

Processes binary data from a single RTP packet, and outputs a frame if assembled.

Returns the frame (or nil if a frame could not be depayloaded yet) together with 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.