summaryrefslogtreecommitdiff
path: root/src/v4l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2')
-rw-r--r--src/v4l2/v4l2_camera.cpp3
-rw-r--r--src/v4l2/v4l2_camera_proxy.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index 44cb4e7c..e7018b56 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -10,7 +10,6 @@
#include <errno.h>
#include "log.h"
-#include "utils.h"
using namespace libcamera;
@@ -81,7 +80,7 @@ void V4L2Camera::requestComplete(Request *request)
bufferLock_.lock();
FrameBuffer *buffer = request->buffers().begin()->second;
std::unique_ptr<Buffer> metadata =
- utils::make_unique<Buffer>(request->cookie(), buffer->metadata());
+ std::make_unique<Buffer>(request->cookie(), buffer->metadata());
completedBuffers_.push_back(std::move(metadata));
bufferLock_.unlock();
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index 28e58722..3013a3d1 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -32,7 +32,7 @@ LOG_DECLARE_CATEGORY(V4L2Compat);
V4L2CameraProxy::V4L2CameraProxy(unsigned int index,
std::shared_ptr<Camera> camera)
: refcount_(0), index_(index), bufferCount_(0), currentBuf_(0),
- vcam_(utils::make_unique<V4L2Camera>(camera))
+ vcam_(std::make_unique<V4L2Camera>(camera))
{
querycap(camera);
}
lass="hl opt">[0]); return 1; } in_fd = open(argv[1], O_RDONLY); if (in_fd == -1) { fprintf(stderr, "Failed to open input file '%s': %s\n", argv[1], strerror(errno)); return 1; } out_fd = open(argv[2], O_WRONLY | O_TRUNC | O_CREAT, 0644); if (out_fd == -1) { fprintf(stderr, "Failed to open output file '%s': %s\n", argv[2], strerror(errno)); return 1; } while (1) { uint8_t in_data[32]; uint8_t out_data[50]; unsigned int i; ret = read(in_fd, in_data, 32); if (ret == -1) { fprintf(stderr, "Failed to read input data: %s\n", strerror(errno)); goto done; } if (ret < 32) { if (ret != 0) fprintf(stderr, "%u bytes of stray data at end of input\n", ret); break; } for (i = 0; i < 25; ++i) { unsigned int index = (i * 10) / 8; unsigned int lsb_shift = (i * 10) % 8; unsigned int msb_shift = 8 - lsb_shift; uint16_t pixel; pixel = ((in_data[index+1] << msb_shift) & 0x3ff) | ((in_data[index+0] >> lsb_shift) & 0x3ff); out_data[i*2+0] = (pixel >> 0) & 0xff; out_data[i*2+1] = (pixel >> 8) & 0xff; } ret = write(out_fd, out_data, 50); if (ret == -1) {