pub trait VideoAdapter {
type CodecId: Copy + Eq + Debug;
type PixelFormat: Clone + Eq + Debug;
type PacketExtra;
type FrameExtra;
}Expand description
Backend vocabulary for compressed/decoded video.
Required Associated Types§
Sourcetype CodecId: Copy + Eq + Debug
type CodecId: Copy + Eq + Debug
Codec identifier (e.g. backend-specific newtype around
FFmpeg AVCodecID, WebCodecs codec string, etc.).
Sourcetype PixelFormat: Clone + Eq + Debug
type PixelFormat: Clone + Eq + Debug
Pixel format identifier (e.g. backend-specific newtype around
FFmpeg AVPixelFormat, WebCodecs VideoPixelFormat, RAW
VideoPixelType, BRAW BlackmagicRawResourceFormat).
Clone, not Copy, for the same reason
AudioAdapter::ChannelLayout is: mediaframe 0.3’s
PixelFormat carries an owned Other(SmolStr) arm at the
alloc tier, and that is the identifier the FFmpeg and
WebCodecs adapters bind here.
Sourcetype PacketExtra
type PacketExtra
Backend-specific extras carried on every VideoPacket (e.g.
FFmpeg side-data, WebCodecs metadata).
Sourcetype FrameExtra
type FrameExtra
Backend-specific extras carried on every VideoFrame (e.g.
HDR mastering display, RAW sensor metadata, picture type).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".