View Source Membrane.RTP.H265.FU (Membrane RTP H265 Plugin v0.5.1)

Module responsible for parsing H265 Fragmentation Unit.

Link to this section Summary

Functions

Parses H265 Fragmentation Unit

Serialize H265 unit into list of FU payloads

Link to this section Types

Specs

don() :: nil | non_neg_integer()

Specs

t() :: %Membrane.RTP.H265.FU{
  data: [binary()],
  don: don(),
  donl?: boolean(),
  last_seq_num: nil | non_neg_integer(),
  type: Membrane.RTP.H265.NAL.Header.type()
}

Link to this section Functions

Link to this function

parse(data, seq_num, acc)

View Source

Specs

parse(binary(), non_neg_integer(), t()) ::
  {:ok, {binary(), Membrane.RTP.H265.NAL.Header.type(), don()}}
  | {:error, :packet_malformed | :invalid_first_packet}
  | {:incomplete, t()}

Parses H265 Fragmentation Unit

If a packet that is being parsed is not considered last then a {:incomplete, t()} tuple will be returned. In case of last packet {:ok, {type, data, don}} tuple will be returned, where data is NAL Unit created by concatenating subsequent Fragmentation Units and don is the decoding order number of the NAL unit in case donl field is present in the packet.

Link to this function

serialize(data, preferred_size)

View Source

Specs

serialize(binary(), pos_integer()) :: [binary()] | {:error, :unit_too_small}

Serialize H265 unit into list of FU payloads