ExMP4.BitStreamFilter behaviour (MP4 Reader and Writer v0.11.0)

View Source

A behaviour module for implementing a bit stream filter.

A bit stream filter operates on encoded data without decoding by performing bitstream level modifications.

Summary

Callbacks

Callback invoked to filter a payload (usually a video frame or audio sample).

Callback invoked to initialize the filter.

Types

opts()

@type opts() :: Keyword.t()

state()

@type state() :: any()

Callbacks

filter(state, t)

@callback filter(state(), ExMP4.Sample.t()) :: {ExMP4.Sample.t(), state()}

Callback invoked to filter a payload (usually a video frame or audio sample).

This method should not fail, in case of error returns the input data.

init(t, opts)

@callback init(ExMP4.Track.t(), opts()) :: {:ok, state()} | {:error, any()}

Callback invoked to initialize the filter.