View Source Membrane.H265.Parser.NALuSplitter (Membrane H265 plugin v0.2.0)

A module with functions responsible for splitting the h265 stream into the NAL units.

The splitting is based on "Annex B" of the "ITU-T Rec. H.265 (08/2021)".

Link to this section Summary

Types

t()

A structure holding the state of the NALu splitter.

Functions

Flushes the payload out of the splitter state.

Returns a structure holding a NALu splitter state.

Splits the binary into NALus sequence.

Link to this section Types

Specs

t()

A structure holding the state of the NALu splitter.

Link to this section Functions

Specs

flush(t()) :: {binary(), t()}

Flushes the payload out of the splitter state.

That function gets the payload from the inner state of the splitter and sets the payload in the inner state clean.

Link to this function

new(intial_binary \\ <<>>)

View Source

Specs

new(binary()) :: t()

Returns a structure holding a NALu splitter state.

By default, the inner unparsed_payload of the state is clean. However, there is a possibility to set that unparsed_payload to a given binary, provided as an argument of the new/1 function.

Specs

split(payload :: binary(), state :: t()) :: {[binary()], t()}

Splits the binary into NALus sequence.

Takes a binary h265 stream as an input and produces a list of binaries, where each binary is a complete NALu that can be passed to the Membrane.H265.Parser.NALuParser.parse/2.