mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 09:25:07 +03:00
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>
This commit is contained in:
parent
4bc262ecaa
commit
8c0bbcd3d3
8 changed files with 127 additions and 18 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue