summaryrefslogtreecommitdiff
path: root/src/v4l2/v4l2_camera_file.cpp
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2020-06-22 18:42:07 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2020-06-25 23:41:19 +0900
commitedacd07c5e9a5080628e7cc4d057674f7f742ead (patch)
treedc9b1f11d0d0758e4622364f6353b4cda7627ee8 /src/v4l2/v4l2_camera_file.cpp
parentd37ec82515fda4ae014d904e6d50cd0ed0ada850 (diff)
v4l2: V4L2CameraProxy: Take V4L2CameraFile as argument for intercepted calls
Prepare for using the V4L2CameraFile as a container for file-specific information in the V4L2 compatibility layer by making it a required argument for all V4L2CameraProxy calls that are directed from V4L2CompatManager, which are intercepted via LD_PRELOAD. Change V4L2CameraFile accordingly. Also change V4L2CompatManager accordingly. Instead of keeping a map of file descriptors to V4L2CameraProxy instances, we keep a map of V4L2CameraFile instances to V4L2CameraProxy instances. When the proxy methods are called, feed the file as a parameter. The dup function is also modified, in that it is removed from V4L2CameraProxy, and is handled completely in V4L2CompatManager, as a map from file descriptors to V4L2CameraFile instances. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/v4l2/v4l2_camera_file.cpp')
-rw-r--r--src/v4l2/v4l2_camera_file.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/v4l2/v4l2_camera_file.cpp b/src/v4l2/v4l2_camera_file.cpp
index d3232ab2..a07679b5 100644
--- a/src/v4l2/v4l2_camera_file.cpp
+++ b/src/v4l2/v4l2_camera_file.cpp
@@ -17,10 +17,10 @@ V4L2CameraFile::V4L2CameraFile(int efd, bool nonBlocking, V4L2CameraProxy *proxy
: proxy_(proxy), nonBlocking_(nonBlocking), efd_(efd),
priority_(V4L2_PRIORITY_DEFAULT)
{
- proxy_->open(nonBlocking);
+ proxy_->open(this);
}
V4L2CameraFile::~V4L2CameraFile()
{
- proxy_->close();
+ proxy_->close(this);
}