mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-15 12:22:47 +00:00
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:
parent
2d69f775de
commit
a7a6f19815
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue