libcamera/test/camera/camera_test.h
Laurent Pinchart 5ce4bb62e7 test: camera: Use the CameraManager from the CameraTest base class
Make the camera manager a protected field of the CameraTest class, and
use it instead of CameraManager::instance() in the camera tests. This
prepares for the removal of CameraManager::instance().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-08-19 19:06:50 +03:00

30 lines
517 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* camera_test.h - libcamera camera test base class
*/
#ifndef __LIBCAMERA_CAMERA_TEST_H__
#define __LIBCAMERA_CAMERA_TEST_H__
#include <libcamera/libcamera.h>
#include "test.h"
using namespace libcamera;
class CameraTest : public Test
{
public:
CameraTest()
: cm_(nullptr) {}
protected:
int init();
void cleanup();
CameraManager *cm_;
std::shared_ptr<Camera> camera_;
};
#endif /* __LIBCAMERA_CAMERA_TEST_H__ */