MediaCodecs.H264.NaluSplitter (MediCodecs v0.4.0)

View Source

Split a bytestream to a list of nalus.

Summary

Functions

Flushes any unprocessed data from the splitter.

Creates a new NaluSplitter.

Processes the given data and splits it into nalus.

Types

input_structure()

@type input_structure() ::
  :annexb | :elementary | {:elementary, size :: non_neg_integer()}

t()

@type t() :: %MediaCodecs.H264.NaluSplitter{
  input_structure: input_structure(),
  prefix_pattern: :binary.cp(),
  unprocessed_data: binary()
}

Functions

flush(splitter)

@spec flush(t()) :: list()

Flushes any unprocessed data from the splitter.

new(input_structure \\ :annexb)

@spec new(input_structure()) :: t()

Creates a new NaluSplitter.

Options

  • :input_type - The type of input data, can be :annexb, :elementary, or {:elementary, size}. Defaults to :annexb.

process(splitter, data)

@spec process(t(), binary()) :: {[binary()], t()}

Processes the given data and splits it into nalus.