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

A module providing functionality of parsing a stream of binaries, out of which each is a payload of a single NAL unit.

Summary

Types

t()

A structure holding the state of the NALu parser.

Functions

Returns payload of the NALu with appropriate prefix generated based on output stream structure and prefix length.

Returns a structure holding a clear NALu parser state. input_stream_structure determines the prefixes of input NALU payloads.

Parses a binary representing a single NALu and removes it's prefix (if it exists).

Parses a list of binaries, each representing a single NALu.

Types

@opaque t()

A structure holding the state of the NALu parser.

Functions

Link to this function

get_prefixed_nalu_payload(nalu, output_stream_structure, stable_prefixing? \\ true)

View Source
@spec get_prefixed_nalu_payload(
  Membrane.H264.Parser.NALu.t(),
  Membrane.H264.Parser.stream_structure(),
  boolean()
) :: binary()

Returns payload of the NALu with appropriate prefix generated based on output stream structure and prefix length.

Link to this function

new(input_stream_structure \\ :annexb)

View Source

Returns a structure holding a clear NALu parser state. input_stream_structure determines the prefixes of input NALU payloads.

Link to this function

parse(nalu_payload, timestamps \\ {nil, nil}, payload_prefixed? \\ true, state)

View Source

Parses a binary representing a single NALu and removes it's prefix (if it exists).

Returns a structure that contains parsed fields fetched from that NALu. When payload_prefixed? is true the input binary is expected to contain one of:

  • prefix defined as the "Annex B" of the "ITU-T Rec. H.264 (01/2012)".
  • prefix of size defined in state describing the length of the NALU in bytes, as described in ISO/IEC 14496-15.
Link to this function

parse_nalus(nalus_payloads, timestamps \\ {nil, nil}, payload_prefixed? \\ true, state)

View Source

Parses a list of binaries, each representing a single NALu.

See parse/3 for details.

Link to this function

prefix_nalus_payloads(nalus, arg2)

View Source
@spec prefix_nalus_payloads([binary()], Membrane.H264.Parser.stream_structure()) ::
  binary()