libcamera: work on rewrite

Use manager to hotplug devices
Use StreamConfig to enumerate formats
This commit is contained in:
Wim Taymans 2021-11-02 17:24:19 +01:00
parent b0e3e43c42
commit b2c38a2b3b
11 changed files with 1545 additions and 1212 deletions

View file

@ -27,9 +27,7 @@
#include <spa/support/plugin.h>
#include <spa/support/log.h>
extern const struct spa_handle_factory spa_libcamera_source_factory;
extern const struct spa_handle_factory spa_libcamera_client_factory;
extern const struct spa_handle_factory spa_libcamera_device_factory;
#include "libcamera.h"
struct spa_log_topic log_topic = SPA_LOG_TOPIC(0, "spa.libcamera");
struct spa_log_topic *libcamera_log_topic = &log_topic;
@ -43,13 +41,13 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory,
switch (*index) {
case 0:
*factory = &spa_libcamera_source_factory;
*factory = &spa_libcamera_manager_factory;
break;
case 1:
*factory = &spa_libcamera_client_factory;
*factory = &spa_libcamera_device_factory;
break;
case 2:
*factory = &spa_libcamera_device_factory;
*factory = &spa_libcamera_source_factory;
break;
default:
return 0;