Skip to main content

Module playback

Module playback 

Source
Expand description

Real-time playback types for ff-preview.

This module exposes the primary public API for single-file video/audio playback. All unsafe FFmpeg calls are isolated in playback_inner.

Sub-moduleContents
clockPlaybackClock, internal MasterClock
sinkFrameSink trait, RgbaFrame, RgbaSink
decode_bufferDecodeBuffer, FrameResult, SeekEvent
playerPreviewPlayer
async_player[AsyncPreviewPlayer] (tokio feature)
playback_innerUnsafe FFmpeg calls (SwsRgbaConverter, PCM extraction)

Structs§

DecodeBuffer
Pre-decodes frames from a video file into a ring buffer on a background thread.
DecodeBufferBuilder
Builder for DecodeBuffer.
PlaybackClock
A monotonic clock that tracks elapsed playback time.
PreviewPlayer
Drives real-time playback of a single media file.
RgbaFrame
A decoded video frame as contiguous RGBA bytes.
RgbaSink
Reference FrameSink implementation that stores the latest frame in a shared Arc<Mutex<Option<RgbaFrame>>>.

Enums§

FrameResult
The result of a DecodeBuffer::pop_frame call.
SeekEvent
An event emitted by DecodeBuffer after a seek_async completes.

Traits§

FrameSink
A sink that receives decoded video frames as contiguous RGBA bytes.