Struct RpicamConfig
#[non_exhaustive]pub struct RpicamConfig {
pub size: Size,
pub framerate: u32,
pub bitrate: Rate,
pub keyframe_interval: u32,
}Expand description
How to run the Raspberry Pi camera.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.size: SizeThe capture size.
The raw path rounds the width up to a multiple of 64, so libcamera does not pad the rows.
framerate: u32Frames per second.
bitrate: RateThe hardware encoder’s target bitrate, for the encoded path.
keyframe_interval: u32The keyframe interval in frames, for the encoded path.
A subscriber cannot start decoding before the next keyframe, so this sets join latency more than bitrate.
Implementations§
§impl RpicamConfig
impl RpicamConfig
pub fn new(size: Size, framerate: u32) -> RpicamConfig
pub fn new(size: Size, framerate: u32) -> RpicamConfig
Creates a config for size at framerate.
The encoded path defaults to 500 kbit/s with a keyframe every second.
pub fn with_bitrate(self, bitrate: Rate) -> RpicamConfig
pub fn with_bitrate(self, bitrate: Rate) -> RpicamConfig
Returns this config with bitrate as the hardware encoder’s target.
pub fn with_keyframe_interval(self, frames: u32) -> RpicamConfig
pub fn with_keyframe_interval(self, frames: u32) -> RpicamConfig
Returns this config with a keyframe every frames frames.
Trait Implementations§
§impl Clone for RpicamConfig
impl Clone for RpicamConfig
§fn clone(&self) -> RpicamConfig
fn clone(&self) -> RpicamConfig
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 moreAuto Trait Implementations§
impl Freeze for RpicamConfig
impl RefUnwindSafe for RpicamConfig
impl Send for RpicamConfig
impl Sync for RpicamConfig
impl Unpin for RpicamConfig
impl UnsafeUnpin for RpicamConfig
impl UnwindSafe for RpicamConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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