diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-11-29 20:38:10 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-12-04 23:05:07 +0200 |
commit | 560f5cf998646ddc54a20dc1c7326012834d3204 (patch) | |
tree | b0b4da6084cdf2c10b359b986ad27e33baa6bdfb /src/libcamera/v4l2_videodevice.cpp | |
parent | 5c85e7024027c90b1b054782e510691b8b9c7419 (diff) |
libcamera: base: shared_fd: Rename fd() to get()
For consistency with UniqueFD, rename the fd() function to get().
Renaming UniqueFD::get() to fd() would have been another option, but was
rejected to keep as close as possible to the std::shared_ptr<> and
std::unique_ptr<> APIs.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Diffstat (limited to 'src/libcamera/v4l2_videodevice.cpp')
-rw-r--r-- | src/libcamera/v4l2_videodevice.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 0d214d9e..b4b89e27 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -282,7 +282,7 @@ bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const return false; for (unsigned int i = 0; i < planes.size(); i++) - if (planes_[i].fd != planes[i].fd.fd() || + if (planes_[i].fd != planes[i].fd.get() || planes_[i].length != planes[i].length) return false; return true; @@ -1517,9 +1517,9 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer) if (buf.memory == V4L2_MEMORY_DMABUF) { if (multiPlanar) { for (unsigned int p = 0; p < numV4l2Planes; ++p) - v4l2Planes[p].m.fd = planes[p].fd.fd(); + v4l2Planes[p].m.fd = planes[p].fd.get(); } else { - buf.m.fd = planes[0].fd.fd(); + buf.m.fd = planes[0].fd.get(); } } |