View Source Membrane.RTP.PayloadFormat (Membrane RTP format v0.8.0)

This module contains utilities for resolving RTP default payload types, encoding names, clock rates and (de)payloaders.

Summary

Functions

Returns payload format registered for given encoding name.

Returns encoding name and clock rate for given payload type, if registered.

Registers payload format.

Registers default encoding name and clock rate for a dynamic payload_type

Types

@type t() :: %Membrane.RTP.PayloadFormat{
  depayloader: module() | nil,
  encoding_name: Membrane.RTP.encoding_name_t(),
  frame_detector: (binary() -> boolean()) | nil,
  keyframe_detector: (binary() -> boolean()) | nil,
  payload_type: Membrane.RTP.payload_type_t() | nil,
  payloader: module() | nil
}

Functions

@spec get(Membrane.RTP.encoding_name_t()) :: t()

Returns payload format registered for given encoding name.

Link to this function

get_payload_type_mapping(payload_type)

View Source
@spec get_payload_type_mapping(Membrane.RTP.payload_type_t()) :: %{
  optional(:encoding_name) => Membrane.RTP.encoding_name_t(),
  optional(:clock_rate) => Membrane.RTP.clock_rate_t()
}

Returns encoding name and clock rate for given payload type, if registered.

Link to this function

register(payload_format)

View Source
@spec register(t()) :: :ok | no_return()

Registers payload format.

Raises if some payload format field was already registered and set to different value.

Link to this function

register_payload_type_mapping(payload_type, encoding_name, clock_rate)

View Source

Registers default encoding name and clock rate for a dynamic payload_type