Allow to disable libcamera

This commit is contained in:
Kamil Trzcinski
2022-04-11 10:55:54 +02:00
parent aa0f7276bf
commit 9eeee04560
5 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#include "libcamera.hh"
#ifdef USE_LIBCAMERA
device_hw_t libcamera_device_hw = {
.device_open = libcamera_device_open,
.device_close = libcamera_device_close,
@ -23,3 +24,10 @@ extern "C" device_t *device_libcamera_open(const char *name, const char *path)
{
return device_open(name, path, &libcamera_device_hw);
}
#else // USE_LIBCAMERA
extern "C" device_t *device_libcamera_open(const char *name, const char *path)
{
E_LOG_INFO(NULL, "libcamera is not supported");
return NULL;
}
#endif // USE_LIBCAMERA