View Source Membrane.H264.Parser.NALu (Membrane H264 plugin v0.9.3)

A module defining a struct representing a single NAL unit.

Summary

Types

t()

A type defining the structure of a single NAL unit produced by the Membrane.H264.Parser.NALuParser.

Types

@type t() :: %Membrane.H264.Parser.NALu{
  parsed_fields: %{required(atom()) => any()},
  payload: binary(),
  status: :valid | :error,
  stripped_prefix: binary(),
  timestamps: timestamps(),
  type: Membrane.H264.Parser.NALuTypes.nalu_type()
}

A type defining the structure of a single NAL unit produced by the Membrane.H264.Parser.NALuParser.

In the structure there ardqde following fields:

  • parsed_fields - the map with keys being the NALu field names and the values being the value fetched from the NALu binary. They correspond to the NALu schemes defined in the section 7.3. of the "ITU-T Rec. H.264 (01/2012)".
  • stripped_prefix - prefix that used to split the NAL units in the bytestream and was stripped from the payload. The prefix is defined as in: "Annex B" of the "ISO/IEC 14496-10" or in "ISO/IEC 14496-15".
  • type - an atom representing the type of the NALu. Atom's name is based on the "Table 7-1 – NAL unit type codes, syntax element categories, and NAL unit type classes" of the "ITU-T Rec. H.264 (01/2012)".
  • payload - the binary, which parsing resulted in that structure being produced stripped of it's prefix
  • status - :valid, if the parsing was successfull, :error otherwise
@type timestamps() :: {pts :: integer() | nil, dts :: integer() | nil}