libcamera: don't set camera configuration in LibCamera::start()

There is no need to set and validate the configuration when the camera
is started, since this was already made when the camera was opened.

The configuration only needs to be set again if the port format changes
due a SPA_PARAM_Format parameter.
This commit is contained in:
Javier Martinez Canillas 2021-09-21 14:44:15 +02:00
parent 2d69f775de
commit a7a6f19815
No known key found for this signature in database
GPG key ID: C751E590D63F3D69
2 changed files with 4 additions and 4 deletions

View file

@ -481,6 +481,10 @@ static int spa_libcamera_set_format(struct impl *this, struct spa_video_info *fo
libcamera_set_streamcfg_width(dev->camera, size->width);
libcamera_set_streamcfg_height(dev->camera, size->height);
if(!libcamera_set_config(dev->camera)) {
return -EINVAL;
}
/* start the camera now with the configured params */
libcamera_start_capture(dev->camera);

View file

@ -486,10 +486,6 @@ extern "C" {
}
int LibCamera::start() {
if(!this->set_config()) {
return -1;
}
this->streamName_.clear();
for (unsigned int index = 0; index < this->config_->size(); ++index) {
StreamConfiguration &cfg = this->config_->at(index);