diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-03-15 18:22:46 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-03-18 18:02:40 +0100 |
commit | 8c0bbcd3d3751a716eb8bf03e703aa6fdbe1bd3f (patch) | |
tree | 579d0822f08b07770329800b07a219aad6723803 /src/cam/main.cpp | |
parent | 4bc262ecaa736b956cf8878d8f3459c9caf7c37e (diff) |
libcamera: PixelFormat: Turn into a class
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 <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/cam/main.cpp')
-rw-r--r-- | src/cam/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |