View Source Membrane.RTP.VP8.PayloadDescriptor (Membrane RTP VP8 Plugin v0.9.0)

Defines a structure representing VP8 payload descriptor Described in details under following link: https://tools.ietf.org/html/rfc7741#section-4.2

   0 1 2 3 4 5 6 7                     0 1 2 3 4 5 6 7
  +-+-+-+-+-+-+-+-+                   +-+-+-+-+-+-+-+-+
  |X|R|N|S|R| PID | (REQUIRED)        |X|R|N|S|R| PID | (REQUIRED)
  +-+-+-+-+-+-+-+-+                   +-+-+-+-+-+-+-+-+

X: |I|L|T|K| RSV | (OPTIONAL) X: |I|L|T|K| RSV | (OPTIONAL)

  +-+-+-+-+-+-+-+-+                   +-+-+-+-+-+-+-+-+

I: |M| PictureID | (OPTIONAL) I: |M| PictureID | (OPTIONAL)

  +-+-+-+-+-+-+-+-+                   +-+-+-+-+-+-+-+-+

L: | TL0PICIDX | (OPTIONAL) | PictureID |

  +-+-+-+-+-+-+-+-+                   +-+-+-+-+-+-+-+-+

T/K: |TID|Y| KEYIDX | (OPTIONAL) L: | TL0PICIDX | (OPTIONAL)

  +-+-+-+-+-+-+-+-+                   +-+-+-+-+-+-+-+-+
                                 T/K: |TID|Y| KEYIDX  | (OPTIONAL)
                                      +-+-+-+-+-+-+-+-+

Structure with single octet picture ID on the left and structure with extended picture id on the right (when M bit is set)

Summary

Types

@type bit() :: 0..1
@type first_octet() :: binary()
@type keyidx() :: 0..31
@type partition_index() :: 0..7
@type picture_id() :: 0..32767
@type t() :: %Membrane.RTP.VP8.PayloadDescriptor{
  i: bit(),
  k: bit(),
  keyidx: keyidx(),
  l: bit(),
  m: term(),
  n: bit(),
  partition_index: partition_index(),
  picture_id: picture_id(),
  s: bit(),
  t: bit(),
  tid: tid(),
  tl0picidx: tl0picidx(),
  x: bit(),
  y: bit()
}
@type tid() :: 0..3
@type tl0picidx() :: 0..255

Functions

Link to this function

parse_payload_descriptor(payload)

View Source
@spec parse_payload_descriptor(binary()) ::
  {:error, :malformed_data | :payload_too_short} | {:ok, {t(), binary()}}
Link to this function

serialize(payload_descriptor)

View Source
@spec serialize(t()) :: binary()