cam: Store camera session pointer in CamApp class

Move the local CameraSession variable from the CamApp::run() function to
a member variable of the CamApp class, created in CamApp::init(). This
is a first step towards moving code to the CameraSession class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2021-07-05 18:48:38 +03:00
parent 24ca846a27
commit 34d986d1ec
2 changed files with 12 additions and 9 deletions

View file

@ -34,11 +34,6 @@ int CameraSession::start(const OptionsParser::Options &options)
captureLimit_ = options[OptCapture].toInteger();
printMetadata_ = options.isSet(OptMetadata);
if (!camera_) {
std::cout << "Can't capture without a camera" << std::endl;
return -ENODEV;
}
ret = camera_->configure(config_);
if (ret < 0) {
std::cout << "Failed to configure camera" << std::endl;