pub struct DemuxFrame<'a> {
pub frame_num: u32,
pub x_offset: u32,
pub y_offset: u32,
pub width: u32,
pub height: u32,
pub duration_ms: u32,
pub dispose: DisposeMethod,
pub blend: BlendMethod,
pub has_alpha: bool,
pub is_lossy: bool,
pub bitstream: &'a [u8],
pub alpha_data: Option<&'a [u8]>,
}Expand description
Metadata for a single frame extracted by the demuxer.
The bitstream field contains the raw VP8 or VP8L data (not including
any RIFF container framing). For lossy frames with separate alpha, the
alpha_data field contains the raw ALPH chunk payload.
Fields§
§frame_num: u321-based frame number.
x_offset: u32Horizontal offset of the frame on the canvas (always even).
y_offset: u32Vertical offset of the frame on the canvas (always even).
width: u32Frame width in pixels.
height: u32Frame height in pixels.
duration_ms: u32Frame duration in milliseconds.
dispose: DisposeMethodHow the frame area is disposed after rendering.
blend: BlendMethodHow the frame is blended onto the canvas.
has_alpha: boolWhether the frame contains alpha data.
is_lossy: boolWhether the frame uses lossy (VP8) encoding. false means lossless (VP8L).
bitstream: &'a [u8]Raw VP8 or VP8L bitstream data for this frame.
alpha_data: Option<&'a [u8]>Raw ALPH chunk payload, if present (lossy frames with separate alpha).
Trait Implementations§
Source§impl<'a> Clone for DemuxFrame<'a>
impl<'a> Clone for DemuxFrame<'a>
Source§fn clone(&self) -> DemuxFrame<'a>
fn clone(&self) -> DemuxFrame<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more