libcamera: disconnect camera in spa_libcamera_stream_off()

The camera is connected in the spa_libcamera_stream_on() function but the
disconnect happen in LibCamera::stop(). It makes more sense to have this
two operations separated as it's done for the connection and start, since
the camera then can be stopped/started without needing to do a reconnect.

Move the camera disconnect to spa_libcamera_stream_off() for the reason
mentioned above but also to make the code more consistent and symmetric.
This commit is contained in:
Javier Martinez Canillas 2021-09-21 14:44:20 +02:00
parent ce9f75abaa
commit 439dc8eb2a
No known key found for this signature in database
GPG key ID: C751E590D63F3D69
2 changed files with 4 additions and 2 deletions

View file

@ -518,8 +518,6 @@ extern "C" {
}
void LibCamera::stop() {
this->disconnect();
StreamConfiguration &cfg = this->config_->at(0);
Stream *stream = cfg.stream();
uint32_t nbuffers = this->allocator_->buffers(stream).size();