mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-30 13:14:16 -04:00
Now that there is a "libcamera.cpp", move `libcamera_manager_acquire()` into that file since it is a common function used by all three factories.
30 lines
777 B
C++
30 lines
777 B
C++
/* Spa libcamera support */
|
|
/* SPDX-FileCopyrightText: Copyright © 2020 collabora */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <libcamera/camera_manager.h>
|
|
|
|
#include <spa/support/log.h>
|
|
|
|
extern "C" {
|
|
|
|
extern const struct spa_handle_factory spa_libcamera_source_factory;
|
|
extern const struct spa_handle_factory spa_libcamera_manager_factory;
|
|
extern const struct spa_handle_factory spa_libcamera_device_factory;
|
|
|
|
#undef SPA_LOG_TOPIC_DEFAULT
|
|
#define SPA_LOG_TOPIC_DEFAULT &libcamera_log_topic
|
|
extern struct spa_log_topic libcamera_log_topic;
|
|
|
|
}
|
|
|
|
static inline void libcamera_log_topic_init(struct spa_log *log)
|
|
{
|
|
spa_log_topic_init(log, &libcamera_log_topic);
|
|
}
|
|
|
|
std::shared_ptr<libcamera::CameraManager> libcamera_manager_acquire(int& res);
|