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>
30 lines
517 B
C++
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__ */
|