Xav.Reader (xav v0.1.1)
Media reader.
Link to this section Summary
Link to this section Types
Link to this type
opts()
@type opts() :: [read: :audio | :video, device?: boolean()]
Reader options.
read
- determines which stream to read from a file with both audio and video. Defaults to:video
.device?
- determines whether path points to video camera. Defaults tofalse
.
Link to this section Functions
Link to this function
new(path, opts)
Creates a new media reader.
Both reading from a file and video camera is supported. In case of video camera, v4l2 driver is required and FPS are locked to 10.
Microphone input is not supported.
Link to this function
new!(path, opts)
The same as new/1 but raises on error.
Link to this function
next_frame(reader)
@spec next_frame(t()) :: {:ok, Xav.Frame.t()} | {:error, :eof}
Reads next frame.
Frame is always decoded. Video frames are always in RGB format.