Fix libcamera
compilation
This commit is contained in:
@ -1,10 +1,5 @@
|
||||
#include "libcamera.hh"
|
||||
|
||||
extern "C" {
|
||||
#include "device/buffer.h"
|
||||
#include <stdlib.h>
|
||||
};
|
||||
|
||||
int libcamera_buffer_open(buffer_t *buf)
|
||||
{
|
||||
buf->libcamera = new buffer_libcamera_t{};
|
||||
|
@ -1,10 +1,5 @@
|
||||
#include "libcamera.hh"
|
||||
|
||||
extern "C" {
|
||||
#include "device/buffer_list.h"
|
||||
#include <stdlib.h>
|
||||
};
|
||||
|
||||
int libcamera_buffer_list_open(buffer_list_t *buf_list, unsigned width, unsigned height, unsigned format, unsigned bytesperline)
|
||||
{
|
||||
buf_list->libcamera = new buffer_list_libcamera_t{};
|
||||
|
@ -1,13 +1,15 @@
|
||||
#include "libcamera.hh"
|
||||
|
||||
extern "C" {
|
||||
#include "device/device.h"
|
||||
#include <stdlib.h>
|
||||
};
|
||||
|
||||
int libcamera_device_open(device_t *dev)
|
||||
{
|
||||
dev->libcamera = new device_libcamera_t{};
|
||||
|
||||
auto camera_manager = std::make_unique<libcamera::CameraManager>();
|
||||
int ret = camera_manager->start();
|
||||
if (ret < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
#include "libcamera.hh"
|
||||
|
||||
extern "C" {
|
||||
#include "device/device.h"
|
||||
};
|
||||
|
||||
device_hw_t libcamera_device_hw = {
|
||||
.device_open = libcamera_device_open,
|
||||
.device_close = libcamera_device_close,
|
||||
|
@ -5,8 +5,16 @@ extern "C" {
|
||||
#include <linux/v4l2-subdev.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "device/device.h"
|
||||
#include "device/buffer_list.h"
|
||||
#include "device/buffer.h"
|
||||
};
|
||||
|
||||
#include <optional>
|
||||
#include <memory>
|
||||
|
||||
#include <libcamera/controls.h>
|
||||
#include <libcamera/control_ids.h>
|
||||
#include <libcamera/property_ids.h>
|
||||
|
Reference in New Issue
Block a user