diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-10-25 13:05:16 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-28 17:04:20 +0200 |
commit | 448716d8f75185795d9b01164440d0753850a80a (patch) | |
tree | be19233b0fa0e29b607e52dd62ea10d255dde36a /test | |
parent | 2a8bf04227811b29bc94b942e78f1567afd8874b (diff) |
libcamera: Switch PixelFormat to DRM FourCC values
Use DRM FourCC values for the newly defined PixelFormat.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/camera/buffer_import.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index 9cac19d8..bbc5a25c 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -155,7 +155,16 @@ public: } bool done() const { return done_; } - const V4L2DeviceFormat &format() const { return format_; } + + PixelFormat format() const + { + return video_->toPixelFormat(format_.fourcc); + } + + const Size &size() const + { + return format_.size; + } Signal<uint64_t, int> requestReady; @@ -314,11 +323,9 @@ protected: return TestFail; } - const V4L2DeviceFormat &format = sink_.format(); - StreamConfiguration &cfg = config->at(0); - cfg.size = format.size; - cfg.pixelFormat = format.fourcc; + cfg.size = sink_.size(); + cfg.pixelFormat = sink_.format(); cfg.bufferCount = CAMERA_BUFFER_COUNT; cfg.memoryType = ExternalMemory; |