View Source ExMP4.BitStreamFilter behaviour (MP4 Reader and Writer v0.9.0)
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
Callbacks
@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.
@callback init(ExMP4.Track.t(), opts()) :: {:ok, state()} | {:error, any()}
Callback invoked to initialize the filter.