summaryrefslogtreecommitdiff
path: root/src/cam/main.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-04-05 02:52:59 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-04-09 16:59:19 +0200
commitb0c730e330281f38ac51cb64d9581ed278759048 (patch)
treedd7398671330775d1ca302fe7871222a435eba6a /src/cam/main.cpp
parent9a7dc3ce7f4253578a0f7c0d58417425c8155cb3 (diff)
libcamera: Switch to CameraConfiguration
Implement the camera configuration thru out the library, tests, cam and qcam tools. 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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index d45ffd37..99ce564a 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -78,10 +78,10 @@ static int parseOptions(int argc, char *argv[])
return 0;
}
-static int prepareCameraConfig(std::map<Stream *, StreamConfiguration> *config)
+static int prepareCameraConfig(CameraConfiguration *config)
{
*config = camera->streamConfiguration({ Stream::VideoRecording() });
- Stream *stream = config->begin()->first;
+ Stream *stream = config->front();
if (options.isSet(OptFormat)) {
KeyValueParser::Options format = options[OptFormat];
@@ -135,7 +135,7 @@ static void requestComplete(Request *request, const std::map<Stream *, Buffer *>
static int capture()
{
- std::map<Stream *, StreamConfiguration> config;
+ CameraConfiguration config;
std::vector<Request *> requests;
int ret;
@@ -151,7 +151,7 @@ static int capture()
return ret;
}
- Stream *stream = config.begin()->first;
+ Stream *stream = config.front();
ret = camera->allocateBuffers();
if (ret) {