Trait v4l::video::traits::Output

source ·
pub trait Output {
    // Required methods
    fn enum_frameintervals(
        &self,
        fourcc: FourCC,
        width: u32,
        height: u32
    ) -> Result<Vec<FrameInterval>>;
    fn enum_framesizes(&self, fourcc: FourCC) -> Result<Vec<FrameSize>>;
    fn enum_formats(&self) -> Result<Vec<FormatDescription>>;
    fn format(&self) -> Result<Format>;
    fn set_format(&self, fmt: &Format) -> Result<Format>;
    fn params(&self) -> Result<OutputParameters>;
    fn set_params(&self, params: &OutputParameters) -> Result<OutputParameters>;
}
Expand description

Output device protocol

Required Methods§

source

fn enum_frameintervals( &self, fourcc: FourCC, width: u32, height: u32 ) -> Result<Vec<FrameInterval>>

Returns a vector of all frame intervals that the device supports for the given pixel format and frame size

source

fn enum_framesizes(&self, fourcc: FourCC) -> Result<Vec<FrameSize>>

Returns a vector of valid framesizes that the device supports for the given pixel format

source

fn enum_formats(&self) -> Result<Vec<FormatDescription>>

Returns a vector of valid formats for this device

The “emulated” field describes formats filled in by libv4lconvert. There may be a conversion related performance penalty when using them.

source

fn format(&self) -> Result<Format>

Returns the format currently in use

source

fn set_format(&self, fmt: &Format) -> Result<Format>

Modifies the capture format and returns the actual format

The driver tries to match the format parameters on a best effort basis. Thus, if the combination of format properties cannot be achieved, the closest possible settings are used and reported back.

Arguments
  • fmt - Desired format
source

fn params(&self) -> Result<OutputParameters>

Returns the parameters currently in use

source

fn set_params(&self, params: &OutputParameters) -> Result<OutputParameters>

Modifies the output parameters and returns the actual parameters

Arguments
  • params - Desired parameters

Implementors§