diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-09 13:13:38 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-14 15:46:04 +0200 |
commit | 3129fcae43ce139cb1e158cb5255428afb8952ec (patch) | |
tree | 84e902862aa325a95a40f7241b63e11add6bee0c /src/libcamera/pipeline/simple/converter.h | |
parent | 1c2b54a0173f5ad6d792617246439ec1823bab5a (diff) |
libcamera: pipeline: Manage resources with std::unique_ptr<>
Replace manual resource destruction with std::unique_ptr<> where
applicable. This removes the need for several destructors.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/simple/converter.h')
-rw-r--r-- | src/libcamera/pipeline/simple/converter.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h index 78296680..a3c4d899 100644 --- a/src/libcamera/pipeline/simple/converter.h +++ b/src/libcamera/pipeline/simple/converter.h @@ -29,7 +29,6 @@ class SimpleConverter { public: SimpleConverter(MediaDevice *media); - ~SimpleConverter(); int open(); void close(); @@ -56,7 +55,7 @@ private: void captureBufferReady(FrameBuffer *buffer); void outputBufferReady(FrameBuffer *buffer); - V4L2M2MDevice *m2m_; + std::unique_ptr<V4L2M2MDevice> m2m_; std::queue<FrameBuffer *> captureDoneQueue_; std::queue<FrameBuffer *> outputDoneQueue_; |