Membrane RTP plugin v0.4.0-alpha Membrane.RTCP.Packet behaviour View Source

Functions common to all RTCP Packets

Link to this section Summary

Functions

Parses packet body using data from parsed header

Converts packet structure into binary

Callbacks

Decodes binary with packet body (without header) into packet struct. Used by parse/1

Encodes packet struct into the tuple used by to_binary/1

Link to this section Types

Link to this section Functions

Link to this function

parse_body(packet, map)

View Source
parse_body(binary(), Membrane.RTCP.Header.t()) ::
  {:ok, t()} | {:error, reason :: atom()}

Parses packet body using data from parsed header

Link to this function

strip_padding(body, present?)

View Source

See Membrane.RTP.Packet.strip_padding/2.

Link to this function

to_binary(packet)

View Source
to_binary(t()) :: binary()

Converts packet structure into binary

Link to this section Callbacks

Link to this callback

decode(binary, packet_specific)

View Source
decode(binary(), packet_specific :: Membrane.RTCP.Header.packet_specific_t()) ::
  {:ok, struct()} | {:error, atom()}

Decodes binary with packet body (without header) into packet struct. Used by parse/1

Link to this callback

encode(struct)

View Source
encode(struct()) ::
  {body :: binary(), packet_type :: Membrane.RTCP.Header.packet_type_t(),
   packet_specific :: Membrane.RTCP.Header.packet_specific_t()}

Encodes packet struct into the tuple used by to_binary/1