mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 01:15:06 +03:00
cam: fix return type of configureStreams()
The only caller of configureStreams() stores its return value as an int and not bool. This is confusing and also prevents the (possibly) different error codes returned by Camera::configureStreams() to be propagated inside the cam tool. Fix this by changing the return type to int and propagate the return value from the camera. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
0cd7602e9c
commit
2090f8fdd8
1 changed files with 2 additions and 5 deletions
|
@ -78,7 +78,7 @@ static int parseOptions(int argc, char *argv[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool configureStreams(Camera *camera, std::vector<Stream *> &streams)
|
||||
static int configureStreams(Camera *camera, std::vector<Stream *> &streams)
|
||||
{
|
||||
KeyValueParser::Options format = options[OptFormat];
|
||||
Stream *id = streams.front();
|
||||
|
@ -98,10 +98,7 @@ static bool configureStreams(Camera *camera, std::vector<Stream *> &streams)
|
|||
config[id].pixelFormat = format["pixelformat"];
|
||||
}
|
||||
|
||||
if (camera->configureStreams(config))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return camera->configureStreams(config);
|
||||
}
|
||||
|
||||
static void requestComplete(Request *request, const std::map<Stream *, Buffer *> &buffers)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue