Membrane Element: H264 v0.1.0 Membrane.Element.RTP.H264.FU View Source

Module responsible for parsing H264 Fragmentation Unit.

Link to this section Summary

Functions

Parses H264 Fragmentation Unit

Link to this section Types

Link to this type

t() View Source
t() :: %Membrane.Element.RTP.H264.FU{
  data: [binary()],
  last_seq_num: nil | Membrane.Element.RTP.H264.Depayloader.sequence_number()
}

Link to this section Functions

Link to this function

parse(data, seq_num, acc) View Source
parse(binary(), Membrane.Element.RTP.H264.Depayloader.sequence_number(), t()) ::
  {:ok, {binary(), Membrane.Element.RTP.H264.NAL.Header.type()}}
  | {:error, :packet_malformed | :invalid_first_packet}
  | {:incomplete, t()}

Parses H264 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}} tuple will be returned, where data is NAL Unit created by concatenating subsequent Fragmentation Units.