diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-26 23:45:04 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-03-03 00:59:04 +0200 |
commit | fb8c63d69cbb7a4a32b6b9c81a92af1baf6c78fa (patch) | |
tree | d81132d1da5fca3410394b616c756bd5eed9380f /src/libcamera/pipeline/simple/converter.h | |
parent | 4502635b721ae5d8c36ab98a04879ae73da51ca3 (diff) |
libcamera: pipeline: simple: converter: Replace open() with isValid()
Simplify the SimpleConverter interface by opening the M2M device in the
constructor. The explicit call to open() is replaced by a check through
a new isValid() function, and the unused close() function is removed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Phi-Bang Nguyen <pnguyen@baylibre.com>
Reviewed-by: Kieran Bingham <kieran.bingham@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 d9ace52d..6e3df553 100644 --- a/src/libcamera/pipeline/simple/converter.h +++ b/src/libcamera/pipeline/simple/converter.h @@ -30,8 +30,7 @@ class SimpleConverter public: SimpleConverter(MediaDevice *media); - int open(); - void close(); + bool isValid() const { return m2m_ != nullptr; } std::vector<PixelFormat> formats(PixelFormat input); SizeRange sizes(const Size &input); |