pub trait VideoSource: Send {
// Required methods
fn metadata(&self) -> &VideoMetadata;
fn decoder_info(&self) -> DecoderInfo;
fn next_frame(&self) -> Option<VideoFrame>;
fn is_video_file(path: &Path) -> bool;
}Expand description
Trait for video sources - allows different format implementations.
Required Methods§
Sourcefn metadata(&self) -> &VideoMetadata
fn metadata(&self) -> &VideoMetadata
Get video metadata.
Sourcefn decoder_info(&self) -> DecoderInfo
fn decoder_info(&self) -> DecoderInfo
Get decoder information.
Sourcefn next_frame(&self) -> Option<VideoFrame>
fn next_frame(&self) -> Option<VideoFrame>
Get the next decoded frame (non-blocking).
Sourcefn is_video_file(path: &Path) -> bool
fn is_video_file(path: &Path) -> bool
Check if this is a video file.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".