View Source ExRTCP.Packet.TransportFeedback.CC (ex_rtcp v0.2.0)

Transport-wide Congestion Control Feedback packet type (draft-holmer-rmcat-transport-wide-cc-extensions-01).

Summary

Types

Status of reported packets.

t()

Struct representing Transport-wide Congestion Control Feedback RTCP packet.

Types

@type status_symbol() :: :not_received | :no_delta | :small_delta | :large_delta

Status of reported packets.

See draft-holmer-rmcat-transport-wide-cc-extensions-01, sec. 3.1.1 for further explanation. Notice that this RFC section lists 11 value as RESERVED, but it is used in further examples as packet received, w/o timestamp, thus we treat it as a valid value.

@type t() :: %ExRTCP.Packet.TransportFeedback.CC{
  base_sequence_number: ExRTCP.Packet.uint16(),
  fb_pkt_count: ExRTCP.Packet.uint8(),
  media_ssrc: ExRTCP.Packet.uint32(),
  packet_chunks: [
    ExRTCP.Packet.TransportFeedback.CC.RunLength.t()
    | ExRTCP.Packet.TransportFeedback.CC.StatusVector.t()
  ],
  packet_status_count: ExRTCP.Packet.uint16(),
  recv_deltas: [ExRTCP.Packet.uint8() | ExRTCP.Packet.int16()],
  reference_time: ExRTCP.Packet.int24(),
  sender_ssrc: ExRTCP.Packet.uint32()
}

Struct representing Transport-wide Congestion Control Feedback RTCP packet.

Packet will be properly encoded only if the values are valid. Refer to draft-holmer-rmcat-transport-wide-cc-extensions-01, sec. 3 to see what values are considered valid, here's some important remarks:

  • length of recv_deltas must match the number of packets that were described as :small_delta or :large_delta by the packet_chunks,
  • each of recv_deltas values must fit in 2 bytes (if it's :large_delta) or 1 byte (if it's :small_delta).

Trying to encode a packet with invalid values will result in an undefined behaviour (most likely encode/1 will raise).