android: camera_device: Make CameraStream configuration nicer
Loop over the CameraStream instances and use their interface to perform CameraStream configuration. Modify CameraStream::configure() to configure the android stream buffer count and to retrieve the StreamConfiguration by index instead of receiving it as a parameter. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
fc1fcb5bc9
commit
6c8837da5e
3 changed files with 14 additions and 14 deletions
|
@ -38,10 +38,15 @@ Stream *CameraStream::stream() const
|
|||
return configuration().stream();
|
||||
}
|
||||
|
||||
int CameraStream::configure(const libcamera::StreamConfiguration &cfg)
|
||||
int CameraStream::configure()
|
||||
{
|
||||
if (encoder_)
|
||||
return encoder_->configure(cfg);
|
||||
if (encoder_) {
|
||||
int ret = encoder_->configure(configuration());
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
camera3Stream_->max_buffers = configuration().bufferCount;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue