View Source ExMP4.Read behaviour (MP4 Reader and Writer v0.2.0)
A behaviour defining how to read data from an mp4 input
Summary
Callbacks
Close the input stream.
Open the provided input in read mode
Seek and read from the input stream.
Read the specified amount of bytes from the input
Seek to the provided position in the input stream
Types
Callbacks
@callback close(state()) :: :ok
Close the input stream.
Open the provided input in read mode
The returned state
will be the first argument on the other callbacks
@callback pread(state(), location(), chars :: non_neg_integer()) :: iodata() | :eof
Seek and read from the input stream.
Some stream may have optimised way of seeking and reading at the same time as the case for :file
@callback read(state(), chars :: non_neg_integer()) :: iodata() | :eof
Read the specified amount of bytes from the input
Seek to the provided position in the input stream