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
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
@callback get_nalu_type(non_neg_integer()) :: nalu_type()
@callback parse_nalu_header(binary(), Membrane.H26x.NALuParser.SchemeParser.t()) :: {map(), Membrane.H26x.NALuParser.SchemeParser.t()}
@callback parse_proper_nalu_type( binary(), nalu_type(), Membrane.H26x.NALuParser.SchemeParser.t() ) :: {:ok, map(), Membrane.H26x.NALuParser.SchemeParser.t()} | {:error, Membrane.H26x.NALuParser.SchemeParser.t()}
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.
@spec new(Membrane.H264.Parser.stream_structure()) :: t()
Returns a structure holding a clear NALu parser state. input_stream_structure
determines the prefixes of input NALU payloads.
@spec prefix_nalus_payloads([binary()], Membrane.H264.Parser.stream_structure()) :: binary()
@spec unprefix_nalu_payload(binary(), Membrane.H264.Parser.stream_structure()) :: {stripped_prefix :: binary(), payload :: binary()}