pub struct Mode {
pub id: ModeId,
pub format: MediaFormat,
pub intervals: SmallVec<[Interval; 4]>,
pub interval_stepwise: Option<IntervalStepwise>,
}Expand description
Descriptor for a single capture mode (format + intervals).
§Example
use styx_capture::prelude::*;
let res = Resolution::new(320, 240).unwrap();
let format = MediaFormat::new(FourCc::new(*b"RG24"), res, ColorSpace::Srgb);
let mode = Mode {
id: ModeId { format, interval: None },
format,
intervals: smallvec::smallvec![],
interval_stepwise: None,
};
assert_eq!(mode.format.code.to_string(), "RG24");Fields§
§id: ModeIdIdentifier (format + optional interval) for this mode.
format: MediaFormatMedia format associated with the mode.
intervals: SmallVec<[Interval; 4]>Supported frame intervals.
interval_stepwise: Option<IntervalStepwise>Optional stepwise interval range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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