# SPDX-License-Identifier: CC0-1.0 # Tests are listed in order of complexity. # They are not alphabetically sorted. camera_tests = [ ['configuration_default', 'configuration_default.cpp'], ['configuration_set', 'configuration_set.cpp'], ['buffer_import', 'buffer_import.cpp'], ['statemachine', 'statemachine.cpp'], ['capture', 'capture.cpp'], ['camera_reconfigure', 'camera_reconfigure.cpp'], ] foreach t : camera_tests exe = executable(t[0], t[1], dependencies : libcamera_private, link_with : test_libraries, include_directories : test_includes_internal) test(t[0], exe, suite : 'camera', is_parallel : false) endforeach ' name='id' value='d6d0a675bfe27420d14394ef6b0da5247ea63d87'/> libcamera pipeline handler for VIVIDgit repository hosting on libcamera.org
summaryrefslogtreecommitdiff
path: root/test/camera-sensor.cpp
blob: d3dcb51056f110fa842653ce43d433662732962f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2019, Google Inc.
 *
 * camera-sensor.cpp - Camera sensor tests
 */

#include <algorithm>
#include <iostream>

#include <linux/media-bus-format.h>

#include <libcamera/base/utils.h>

#include "libcamera/internal/camera_sensor.h"
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/media_device.h"
#include "libcamera/internal/v4l2_subdevice.h"

#include "test.h"

using namespace std;
using namespace libcamera;

class CameraSensorTest : public Test
{
protected:
	int init()
	{
		enumerator_ = DeviceEnumerator::create();
		if (!enumerator_) {