From 4689b165720e0540bb6619323d03d7349934b20c Mon Sep 17 00:00:00 2001 From: Hirokazu Honda Date: Tue, 5 Oct 2021 16:31:12 +0900 Subject: v4l2: Remove using namespace in header files "using namespace" in a header file propagates the namespace to the files including the header file. So it should be avoided. This removes "using namespace" in header files in v4l2. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/v4l2/v4l2_camera_proxy.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/v4l2/v4l2_camera_proxy.h') diff --git a/src/v4l2/v4l2_camera_proxy.h b/src/v4l2/v4l2_camera_proxy.h index f1a8b61c..56a45bb7 100644 --- a/src/v4l2/v4l2_camera_proxy.h +++ b/src/v4l2/v4l2_camera_proxy.h @@ -19,14 +19,12 @@ #include "v4l2_camera.h" -using namespace libcamera; - class V4L2CameraFile; class V4L2CameraProxy { public: - V4L2CameraProxy(unsigned int index, std::shared_ptr camera); + V4L2CameraProxy(unsigned int index, std::shared_ptr camera); int open(V4L2CameraFile *file); void close(V4L2CameraFile *file); @@ -38,8 +36,8 @@ public: private: bool validateBufferType(uint32_t type); bool validateMemoryType(uint32_t memory); - void setFmtFromConfig(const StreamConfiguration &streamConfig); - void querycap(std::shared_ptr camera); + void setFmtFromConfig(const libcamera::StreamConfiguration &streamConfig); + void querycap(std::shared_ptr camera); int tryFormat(struct v4l2_format *arg); enum v4l2_priority maxPriority(); void updateBuffers(); @@ -59,7 +57,8 @@ private: 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, MutexLocker *locker); + int vidioc_dqbuf(V4L2CameraFile *file, struct v4l2_buffer *arg, + libcamera::MutexLocker *locker); int vidioc_streamon(V4L2CameraFile *file, int *arg); int vidioc_streamoff(V4L2CameraFile *file, int *arg); @@ -72,7 +71,7 @@ private: unsigned int refcount_; unsigned int index_; - StreamConfiguration streamConfig_; + libcamera::StreamConfiguration streamConfig_; unsigned int bufferCount_; unsigned int currentBuf_; unsigned int sizeimage_; @@ -99,7 +98,7 @@ private: V4L2CameraFile *owner_; /* This mutex is to serialize access to the proxy. */ - Mutex proxyMutex_; + libcamera::Mutex proxyMutex_; }; #endif /* __V4L2_CAMERA_PROXY_H__ */ -- cgit v1.2.1