mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: libcamera: remove unnecessary have_config member
An extra flag is not needed because the `config` pointer can be checked to determine if a configuration has already been retrieved.
This commit is contained in:
parent
9374c15c3d
commit
02f2d6b48d
2 changed files with 1 additions and 3 deletions
|
|
@ -171,7 +171,6 @@ typedef struct impl {
|
|||
|
||||
void requestComplete(libcamera::Request *request);
|
||||
|
||||
unsigned int have_config;
|
||||
std::unique_ptr<CameraConfiguration> config;
|
||||
|
||||
struct spa_source source = {};
|
||||
|
|
|
|||
|
|
@ -69,13 +69,12 @@ int spa_libcamera_close(struct impl *impl)
|
|||
|
||||
static void spa_libcamera_get_config(struct impl *impl)
|
||||
{
|
||||
if (impl->have_config)
|
||||
if (impl->config)
|
||||
return;
|
||||
|
||||
StreamRoles roles;
|
||||
roles.push_back(VideoRecording);
|
||||
impl->config = impl->camera->generateConfiguration(roles);
|
||||
impl->have_config = true;
|
||||
}
|
||||
|
||||
static int spa_libcamera_buffer_recycle(struct impl *impl, struct port *port, uint32_t buffer_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue