View Source Membrane.H26x.NALuParser behaviour (Membrane H.264 and H.265 plugin v0.10.2)

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.

Types

@type nalu_type() :: atom()
@type t() :: %Membrane.H26x.NALuParser{
  input_stream_structure: Membrane.H264.Parser.stream_structure(),
  scheme_parser_state: Membrane.H26x.NALuParser.SchemeParser.t()
}

A structure holding the state of the NALu parser.

Callbacks

Link to this callback

get_nalu_header_and_body(binary)

View Source
@callback get_nalu_header_and_body(binary()) :: {binary(), binary()}
Link to this callback

get_nalu_type(non_neg_integer)

View Source
@callback get_nalu_type(non_neg_integer()) :: nalu_type()
Link to this callback

parse_nalu_header(binary, t)

View Source
Link to this callback

parse_proper_nalu_type(binary, nalu_type, t)

View Source

Functions

Link to this function

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

View Source
@spec get_prefixed_nalu_payload(
  Membrane.H26x.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)

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

prefix_nalus_payloads(nalus, arg2)

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

unprefix_nalu_payload(nalu_payload, arg2)

View Source
@spec unprefix_nalu_payload(binary(), Membrane.H264.Parser.stream_structure()) ::
  {stripped_prefix :: binary(), payload :: binary()}