View Source Membrane.RTP.H265.NAL.Header (Membrane RTP H265 Plugin v0.5.1)

Defines a structure representing Network Abstraction Layer Unit Header

Defined in RFC 7798

  +---------------+---------------+
  |0|1|2|3|4|5|6|7|0|1|2|3|4|5|6|7|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |F|   Type    |  LayerId  | TID |
  +-------------+-----------------+

Link to this section Summary

Types

Required to be 0 in first version of HEVC, may be used in future extensions.

Specifies the temporal sub-layer identifier of the NAL unit plus 1.

t()

Specifies the type of RBSP data structure contained in the NAL unit.

Functions

Parses type stored in NAL Header

Encodes given NAL type

Link to this section Types

Specs

nuh_layer_id() :: 0

Required to be 0 in first version of HEVC, may be used in future extensions.

Link to this type

nuh_temporal_id_plus1()

View Source

Specs

nuh_temporal_id_plus1() :: 1..7

Specifies the temporal sub-layer identifier of the NAL unit plus 1.

Specs

supported_types() :: :ap | :fu | :single_nalu

Specs

t() :: %Membrane.RTP.H265.NAL.Header{
  nuh_layer_id: nuh_layer_id(),
  nuh_temporal_id_plus1: nuh_temporal_id_plus1(),
  type: type()
}

Specs

type() :: 0..63

Specifies the type of RBSP data structure contained in the NAL unit.

Specs

types() :: supported_types() | unsupported_types() | :reserved

Specs

unsupported_types() :: :paci

Link to this section Functions

Link to this function

add_header(payload, reserved, type, layer_id, t_id)

View Source

Specs

add_header(binary(), 0 | 1, type(), nuh_layer_id(), nuh_temporal_id_plus1()) ::
  binary()

Adds NAL header to payload

Specs

decode_type(t()) :: types()

Parses type stored in NAL Header

Specs

encode_type(types()) :: type()

Encodes given NAL type

Link to this function

parse_unit_header(raw_nal)

View Source

Specs

parse_unit_header(binary()) ::
  {:error, :malformed_data} | {:ok, {t(), binary()}}