libcamera/test/v4l2_device/v4l2_device_test.h
Kieran Bingham 93ec63b867 test: v4l2_device: Use DeviceEnumerator to find a UVCVideo
Utilise the existing DeviceEnumerator system to identify a suitable
V4L2Device for testing.

Specifically target these tests at a uvcvideo driver based device as a known
supported target.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-02-06 06:49:25 +02:00

34 lines
664 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2018, Google Inc.
*
* vl42device_test.h - libcamera v4l2device test base class
*/
#ifndef __LIBCAMERA_V4L2_DEVICE_TEST_H_
#define __LIBCAMERA_V4L2_DEVICE_TEST_H_
#include <memory>
#include "test.h"
#include "device_enumerator.h"
#include "media_device.h"
#include "v4l2_device.h"
using namespace libcamera;
class V4L2DeviceTest : public Test
{
public:
V4L2DeviceTest() : dev_(nullptr) { };
protected:
int init();
void cleanup();
std::unique_ptr<DeviceEnumerator> enumerator_;
std::shared_ptr<MediaDevice> media_;
V4L2Device *dev_;
};
#endif /* __LIBCAMERA_V4L2_DEVICE_TEST_H_ */