summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera_proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2/v4l2_camera_proxy.cpp')
-rw-r--r--src/v4l2/v4l2_camera_proxy.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp
index 5158eac4..28e58722 100644
--- a/src/v4l2/v4l2_camera_proxy.cpp
+++ b/src/v4l2/v4l2_camera_proxy.cpp
@@ -187,17 +187,18 @@ void V4L2CameraProxy::querycap(std::shared_ptr<Camera> camera)
void V4L2CameraProxy::updateBuffers()
{
- std::vector<V4L2FrameMetadata> completedBuffers = vcam_->completedBuffers();
- for (V4L2FrameMetadata &fmd : completedBuffers) {
- struct v4l2_buffer &buf = buffers_[fmd.index()];
+ std::vector<V4L2Camera::Buffer> completedBuffers = vcam_->completedBuffers();
+ for (const V4L2Camera::Buffer &buffer : completedBuffers) {
+ const FrameMetadata &fmd = buffer.data;
+ struct v4l2_buffer &buf = buffers_[buffer.index];
- switch (fmd.status()) {
+ switch (fmd.status) {
case FrameMetadata::FrameSuccess:
- buf.bytesused = fmd.bytesused();
+ buf.bytesused = fmd.planes[0].bytesused;
buf.field = V4L2_FIELD_NONE;
- buf.timestamp.tv_sec = fmd.timestamp() / 1000000000;
- buf.timestamp.tv_usec = fmd.timestamp() % 1000000;
- buf.sequence = fmd.sequence();
+ buf.timestamp.tv_sec = fmd.timestamp / 1000000000;
+ buf.timestamp.tv_usec = fmd.timestamp % 1000000;
+ buf.sequence = fmd.sequence;
buf.flags |= V4L2_BUF_FLAG_DONE;
break;