libcamera: stream_option: use format name to set cam/qcam format
Replace hex input for pixel formats with their format names, for input in cam and qcam. Hence, remove the todo. Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
6b32eebf86
commit
785d741861
@@ -19,7 +19,7 @@ StreamKeyValueParser::StreamKeyValueParser()
|
||||
ArgumentRequired);
|
||||
addOption("height", OptionInteger, "Height in pixels",
|
||||
ArgumentRequired);
|
||||
addOption("pixelformat", OptionInteger, "Pixel format",
|
||||
addOption("pixelformat", OptionString, "Pixel format name",
|
||||
ArgumentRequired);
|
||||
}
|
||||
|
||||
@@ -95,9 +95,8 @@ int StreamKeyValueParser::updateConfiguration(CameraConfiguration *config,
|
||||
cfg.size.height = opts["height"];
|
||||
}
|
||||
|
||||
/* \todo Translate 4CC string to pixelformat with modifier. */
|
||||
if (opts.isSet("pixelformat"))
|
||||
cfg.pixelFormat = PixelFormat(opts["pixelformat"]);
|
||||
cfg.pixelFormat = PixelFormat::fromString(opts["pixelformat"].toString());
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user