From 322334dae7dfc9564a4128edd6d925c638bbcdea Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 27 Jan 2023 15:43:13 +0000 Subject: libcamera: pipeline: build: Add pipeline_data_dir variable Add a pipeline_data_dir variable to the meson build files. This variable points to the location of pipeline handler specific configuration files on the filesystem. Signed-off-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/meson.build | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build index 30dc5b97..f14869f3 100644 --- a/src/libcamera/pipeline/meson.build +++ b/src/libcamera/pipeline/meson.build @@ -1,5 +1,8 @@ # SPDX-License-Identifier: CC0-1.0 +# Location of pipeline specific configuration files +pipeline_data_dir = libcamera_datadir / 'pipeline' + foreach pipeline : pipelines subdir(pipeline) endforeach -- cgit v1.2.1 ption> Laurent Pinchart's clone of libcameragit repository hosting on libcamera.org
summaryrefslogtreecommitdiff
blob: abf3a5d681bf17507511b23744638e525eb5d258 (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2020, Google Inc.
 *
 * span.cpp - Span tests
 */

/*
 * Include first to ensure the header is self-contained, as there's no span.cpp
 * in libcamera.
 */
#include <libcamera/base/span.h>

#include <array>
#include <iostream>
#include <vector>

#include "test.h"

using namespace std;
using namespace libcamera;

class SpanTest : public Test
{
protected:
	int run()
	{
		int i[4]{ 1, 2, 3, 4 };
		std::array<int, 4> a{ 1, 2, 3, 4 };
		const std::array<int, 4> ca{ 1, 2, 3, 4 };
		std::vector<int> v{ 1, 2, 3, 4 };
		const std::vector<int> cv{ 1, 2, 3, 4 };

		/*
		 * Compile-test construction and usage of spans with static
		 * extent. Commented-out tests are expected not to compile, or
		 * to generate undefined behaviour.
		 */

		Span<int, 0>{};
		/* Span<int, 4>{}; */

		Span<int, 4>{ &i[0], 4 };
		Span<int, 4>{ &i[0], &i[3] };

		Span<int, 4>{ i };
		/* Span<float, 4>{ i }; */
		/* Span<int, 2>{ i }; */

		Span<int, 4>{ a };
		Span<const int, 4>{ a };
		/* Span<float, 4>{ a }; */
		/* Span<int, 2>{ a }; */

		Span<const int, 4>{ ca };
		/* Span<const int, 2>{ ca }; */
		/* Span<const float, 4>{ ca }; */
		/* Span<int, 4>{ ca }; */

		Span<int, 4>{ v };
		Span<const int, 4>{ v };
		/* Span<float, 4>{ v }; */

		Span<const int, 4>{ v };
		/* Span<int, 4>{ v }; */
		/* Span<const float, 4>{ v }; */

		Span<int, 4> staticSpan{ i };
		Span<int, 4>{ staticSpan };
		Span<const int, 4>{ staticSpan };
		/* Span<const int, 2>{ staticSpan }; */

		staticSpan = Span<int, 4>{ v };

		if (*staticSpan.begin() != 1) {
			std::cout << "Span<static_extent>::begin() failed" << std::endl;
			return TestFail;
		}
		if (*staticSpan.cbegin() != 1) {
			std::cout << "Span<static_extent>::cbegin() failed" << std::endl;
			return TestFail;
		}
		staticSpan.end();
		staticSpan.cend();
		if (*staticSpan.rbegin() != 4) {
			std::cout << "Span<static_extent>::rbegin() failed" << std::endl;
			return TestFail;
		}
		if (*staticSpan.crbegin() != 4) {
			std::cout << "Span<static_extent>::crbegin() failed" << std::endl;
			return TestFail;
		}
		staticSpan.rend();
		staticSpan.crend();

		staticSpan.front();
		staticSpan.back();
		staticSpan[0];
		staticSpan.data();

		staticSpan.size();
		staticSpan.size_bytes();

		staticSpan.empty();