From 8c0bbcd3d3751a716eb8bf03e703aa6fdbe1bd3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Sun, 15 Mar 2020 18:22:46 +0100 Subject: libcamera: PixelFormat: Turn into a class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create a class to represent a pixel format. This is done to add support for modifiers for the formats. So far no modifiers are added by any pipeline handler, all plumbing to deal with them is however in place. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- src/cam/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cam') diff --git a/src/cam/main.cpp b/src/cam/main.cpp index af516f1c..f73e77f3 100644 --- a/src/cam/main.cpp +++ b/src/cam/main.cpp @@ -253,7 +253,7 @@ int CamApp::prepareConfig() /* TODO: Translate 4CC string to ID. */ if (opt.isSet("pixelformat")) - cfg.pixelFormat = opt["pixelformat"]; + cfg.pixelFormat = PixelFormat(opt["pixelformat"]); } } @@ -304,8 +304,8 @@ int CamApp::infoConfiguration() const StreamFormats &formats = cfg.formats(); for (PixelFormat pixelformat : formats.pixelformats()) { - std::cout << " * Pixelformat: 0x" << std::hex - << std::setw(8) << pixelformat << " " + std::cout << " * Pixelformat: " + << pixelformat.toString() << " " << formats.range(pixelformat).toString() << std::endl; -- cgit v1.2.1