summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera_proxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/v4l2/v4l2_camera_proxy.h')
-rw-r--r--src/v4l2/v4l2_camera_proxy.h31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h
index 27d3e507..b2197ef8 100644
--- a/src/v4l2/v4l2_camera_proxy.h
+++ b/src/v4l2/v4l2_camera_proxy.h
@@ -21,20 +21,20 @@
using namespace libcamera;
+class V4L2CameraFile;
+
class V4L2CameraProxy
{
public:
V4L2CameraProxy(unsigned int index, std::shared_ptr<Camera> camera);
- int open(bool nonBlocking);
- void dup();
- void close();
+ int open(V4L2CameraFile *file);
+ void close(V4L2CameraFile *file);
void *mmap(void *addr, size_t length, int prot, int flags, off64_t offset);
int munmap(void *addr, size_t length);
- int ioctl(unsigned long request, void *arg);
-
void bind(int fd);
+ int ioctl(V4L2CameraFile *file, unsigned long request, void *arg);
private:
bool validateBufferType(uint32_t type);
@@ -47,16 +47,16 @@ private:
int freeBuffers();
int vidioc_querycap(struct v4l2_capability *arg);
- int vidioc_enum_fmt(struct v4l2_fmtdesc *arg);
- int vidioc_g_fmt(struct v4l2_format *arg);
- int vidioc_s_fmt(struct v4l2_format *arg);
- int vidioc_try_fmt(struct v4l2_format *arg);
- int vidioc_reqbufs(struct v4l2_requestbuffers *arg);
- int vidioc_querybuf(struct v4l2_buffer *arg);
- int vidioc_qbuf(struct v4l2_buffer *arg);
- int vidioc_dqbuf(struct v4l2_buffer *arg);
- int vidioc_streamon(int *arg);
- int vidioc_streamoff(int *arg);
+ int vidioc_enum_fmt(V4L2CameraFile *file, struct v4l2_fmtdesc *arg);
+ int vidioc_g_fmt(V4L2CameraFile *file, struct v4l2_format *arg);
+ int vidioc_s_fmt(V4L2CameraFile *file, struct v4l2_format *arg);
+ int vidioc_try_fmt(V4L2CameraFile *file, struct v4l2_format *arg);
+ int vidioc_reqbufs(V4L2CameraFile *file, struct v4l2_requestbuffers *arg);
+ int vidioc_querybuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
+ int vidioc_qbuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
+ int vidioc_dqbuf(V4L2CameraFile *file, struct v4l2_buffer *arg);
+ int vidioc_streamon(V4L2CameraFile *file, int *arg);
+ int vidioc_streamoff(V4L2CameraFile *file, int *arg);
static unsigned int bplMultiplier(uint32_t format);
static unsigned int imageSize(uint32_t format, unsigned int width,
@@ -67,7 +67,6 @@ private:
unsigned int refcount_;
unsigned int index_;
- bool nonBlocking_;
struct v4l2_format curV4L2Format_;
StreamConfiguration streamConfig_;