View Source ExWebRTC.RTP.Payloader (ex_webrtc v0.7.0)
RTP payloader.
It packs audio/video frames into one or more RTP packets.
Summary
Functions
Creates a new payloader that matches the passed codec parameters.
Packs a frame into one or more RTP packets.
Types
@opaque payloader()
Functions
@spec new(ExWebRTC.RTPCodecParameters.t(), [{:max_payload_size, integer()}]) :: {:ok, payloader()} | {:error, :no_payloader_for_codec}
Creates a new payloader that matches the passed codec parameters.
Opts:
- max_payload_size - determines the maximum size of a single RTP packet outputted by the payloader.
It must be greater than
100
, and is set to1000
by default.
@spec payload(payloader(), binary()) :: {[ExRTP.Packet.t()], payloader()}
Packs a frame into one or more RTP packets.
Returns the packets together with the updated payloader.