summaryrefslogtreecommitdiff
path: root/src/v4l2
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2')
-rw-r--r--src/v4l2/v4l2_camera.cpp8
-rw-r--r--src/v4l2/v4l2_camera.h4
-rw-r--r--src/v4l2/v4l2_camera_proxy.cpp4
3 files changed, 9 insertions, 7 deletions
diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp
index b6e0bb76..e4a03c41 100644
--- a/src/v4l2/v4l2_camera.cpp
+++ b/src/v4l2/v4l2_camera.cpp
@@ -17,9 +17,11 @@ using namespace libcamera;
LOG_DECLARE_CATEGORY(V4L2Compat);
V4L2FrameMetadata::V4L2FrameMetadata(Buffer *buffer)
- : index_(buffer->index()), bytesused_(buffer->bytesused()),
- timestamp_(buffer->timestamp()), sequence_(buffer->sequence()),
- status_(buffer->status())
+ : index_(buffer->index()),
+ bytesused_(buffer->metadata().planes[0].bytesused),
+ timestamp_(buffer->metadata().timestamp),
+ sequence_(buffer->metadata().sequence),
+ status_(buffer->metadata().status)
{
}
diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h
index f760316c..06eab0e1 100644
--- a/src/v4l2/v4l2_camera.h
+++ b/src/v4l2/v4l2_camera.h
@@ -31,7 +31,7 @@ public:
uint64_t timestamp() const { return timestamp_; }
unsigned int sequence() const { return sequence_; }
- Buffer::Status status() const { return status_; }
+ FrameMetadata::Status status() const { return status_; }
private:
int index_;
@@ -40,7 +40,7 @@ private:
uint64_t timestamp_;
unsigned int sequence_;
- Buffer::Status status_;
+ FrameMetadata::Status status_;
};
class V4L2Camera : public Object
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index a84405a3..5158eac4 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -192,7 +192,7 @@ void V4L2CameraProxy::updateBuffers()
struct v4l2_buffer &buf = buffers_[fmd.index()];
switch (fmd.status()) {
- case Buffer::Status::BufferSuccess:
+ case FrameMetadata::FrameSuccess:
buf.bytesused = fmd.bytesused();
buf.field = V4L2_FIELD_NONE;
buf.timestamp.tv_sec = fmd.timestamp() / 1000000000;
@@ -201,7 +201,7 @@ void V4L2CameraProxy::updateBuffers()
buf.flags |= V4L2_BUF_FLAG_DONE;
break;
- case Buffer::Status::BufferError:
+ case FrameMetadata::FrameError:
buf.flags |= V4L2_BUF_FLAG_ERROR;
break;
default: