pub struct CameraConfiguration { /* private fields */ }Expand description
Camera configuration.
Contains StreamConfigurationRef for each stream used by the camera.
Implementations§
Source§impl CameraConfiguration
impl CameraConfiguration
Sourcepub fn get(&self, index: usize) -> Option<Immutable<StreamConfigurationRef<'_>>>
pub fn get(&self, index: usize) -> Option<Immutable<StreamConfigurationRef<'_>>>
Returns immutable StreamConfigurationRef for the camera stream.
§Parameters
index- Camera stream index.
Sourcepub fn get_mut(&mut self, index: usize) -> Option<StreamConfigurationRef<'_>>
pub fn get_mut(&mut self, index: usize) -> Option<StreamConfigurationRef<'_>>
Returns mutable StreamConfigurationRef for the camera stream.
§Parameters
index- Camera stream index.
Sourcepub fn add_configuration(&mut self) -> Option<StreamConfigurationRef<'_>>
pub fn add_configuration(&mut self) -> Option<StreamConfigurationRef<'_>>
Append a new stream configuration for a given role.
Sourcepub fn add_configuration_like(
&mut self,
template: &StreamConfigurationRef<'_>,
) -> Option<StreamConfigurationRef<'_>>
pub fn add_configuration_like( &mut self, template: &StreamConfigurationRef<'_>, ) -> Option<StreamConfigurationRef<'_>>
Append a new stream configuration by cloning an existing configuration.
This mirrors libcamera’s addConfiguration(const StreamConfiguration&) and produces
a valid entry instead of an empty placeholder, allowing multi-stream configurations
to validate successfully.
Sourcepub fn add_configurations_like<'a>(
&mut self,
templates: &[&StreamConfigurationRef<'a>],
) -> Vec<StreamConfigurationRef<'_>>
pub fn add_configurations_like<'a>( &mut self, templates: &[&StreamConfigurationRef<'a>], ) -> Vec<StreamConfigurationRef<'_>>
Append multiple stream configurations by cloning existing templates.
Returns the newly appended configurations (in order) for further adjustment.
pub fn set_sensor_configuration(&mut self, mode: SensorConfiguration)
Sourcepub fn validate(&mut self) -> CameraConfigurationStatus
pub fn validate(&mut self) -> CameraConfigurationStatus
Validates camera configuration.
Sourcepub fn orientation(&self) -> Orientation
pub fn orientation(&self) -> Orientation
Returns the desired orientation of the captured image.
Sourcepub fn set_orientation(&mut self, orientation: Orientation)
pub fn set_orientation(&mut self, orientation: Orientation)
Sets the desired orientation of the captured image.
Sourcepub fn sensor_configuration(&self) -> Option<SensorConfiguration>
pub fn sensor_configuration(&self) -> Option<SensorConfiguration>
Returns the sensor configuration if one is set by the application or pipeline.
Sourcepub fn validate_and_log(&mut self) -> CameraConfigurationStatus
pub fn validate_and_log(&mut self) -> CameraConfigurationStatus
Re-validate and print stride/frame_size adjustments for each stream (helper for debugging).
Sourcepub fn to_string_repr(&self) -> String
pub fn to_string_repr(&self) -> String
Return the libcamera textual representation of this configuration.