#[repr(C)]pub struct VideoConfig {
pub source: VideoSource,
pub timestamp: f32,
pub autoplay: bool,
pub looping: bool,
pub output_format: RawImageFormat,
}Expand description
Requested video-playback configuration.
Fields§
§source: VideoSourceWhere to load the video from (URL / file path / in-memory bytes).
timestamp: f32Seek / scrub position in seconds. Changing it across a relayout makes the widget’s merge callback tell the decode worker to seek (scrubbing timeline) — the decoder survives relayout like the map’s tile cache.
autoplay: boolStart playing automatically on mount.
looping: boolRestart from the beginning when the stream ends.
output_format: RawImageFormatTexture format the decoder delivers. BGRA8 is the portable default;
Nv12 (a later RawImageFormat addition) is the zero-copy path.
Implementations§
Source§impl VideoConfig
impl VideoConfig
Sourcepub fn new(source: VideoSource) -> Self
pub fn new(source: VideoSource) -> Self
A default config playing source (autoplay on, no loop, BGRA8, t=0).
Trait Implementations§
Source§impl Clone for VideoConfig
impl Clone for VideoConfig
Source§fn clone(&self) -> VideoConfig
fn clone(&self) -> VideoConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VideoConfig
impl Debug for VideoConfig
Source§impl Default for VideoConfig
impl Default for VideoConfig
Source§impl PartialEq for VideoConfig
impl PartialEq for VideoConfig
impl StructuralPartialEq for VideoConfig
Auto Trait Implementations§
impl Freeze for VideoConfig
impl RefUnwindSafe for VideoConfig
impl Send for VideoConfig
impl Sync for VideoConfig
impl Unpin for VideoConfig
impl UnsafeUnpin for VideoConfig
impl UnwindSafe for VideoConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more