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:
parent
24ca846a27
commit
34d986d1ec
2 changed files with 12 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue