diff options
author | Kaaira Gupta <kgupta@es.iitr.ac.in> | 2020-07-27 21:51:43 +0530 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2020-08-03 11:48:47 +0100 |
commit | 785d7418619454c26631e5c1ac516abbc4f33f35 (patch) | |
tree | c77e3894ec7e274984f6ba2a55aab52283423737 /src/cam | |
parent | 6b32eebf861f9553853a71f1775253459654e56d (diff) |
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>
Diffstat (limited to 'src/cam')
-rw-r--r-- | src/cam/stream_options.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp index bd12c8fd..4168e5d2 100644 --- a/src/cam/stream_options.cpp +++ b/src/cam/stream_options.cpp @@ -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; |