|
3 | 3 | * @author wysaid (this@wysaid.org) |
4 | 4 | * @brief Some basic type definitions |
5 | 5 | * @date 2025-05 |
6 | | - * |
| 6 | + * |
7 | 7 | * @note For C language, use ccap_c.h instead of this header. |
8 | 8 | * |
9 | 9 | */ |
|
41 | 41 | #include <functional> |
42 | 42 | #include <memory> |
43 | 43 | #include <string> |
| 44 | +#include <string_view> |
44 | 45 | #include <vector> |
45 | 46 |
|
46 | 47 | // ccap is short for (C)amera(CAP)ture |
@@ -226,46 +227,46 @@ enum class PropertyName { |
226 | 227 | enum class ErrorCode { |
227 | 228 | /// No error occurred |
228 | 229 | None = 0, |
229 | | - |
| 230 | + |
230 | 231 | /// No camera device found or device discovery failed |
231 | 232 | NoDeviceFound = 0x1001, |
232 | | - |
| 233 | + |
233 | 234 | /// Invalid device name or device index |
234 | 235 | InvalidDevice = 0x1002, |
235 | | - |
| 236 | + |
236 | 237 | /// Camera device open failed |
237 | 238 | DeviceOpenFailed = 0x1003, |
238 | | - |
| 239 | + |
239 | 240 | /// Camera start failed |
240 | 241 | DeviceStartFailed = 0x1004, |
241 | | - |
| 242 | + |
242 | 243 | /// Camera stop failed |
243 | 244 | DeviceStopFailed = 0x1005, |
244 | | - |
| 245 | + |
245 | 246 | /// Initialization failed |
246 | 247 | InitializationFailed = 0x1006, |
247 | | - |
| 248 | + |
248 | 249 | /// Requested resolution is not supported |
249 | 250 | UnsupportedResolution = 0x2001, |
250 | | - |
| 251 | + |
251 | 252 | /// Requested pixel format is not supported |
252 | 253 | UnsupportedPixelFormat = 0x2002, |
253 | | - |
| 254 | + |
254 | 255 | /// Frame rate setting failed |
255 | 256 | FrameRateSetFailed = 0x2003, |
256 | | - |
| 257 | + |
257 | 258 | /// Property setting failed |
258 | 259 | PropertySetFailed = 0x2004, |
259 | | - |
| 260 | + |
260 | 261 | /// Frame capture timeout |
261 | 262 | FrameCaptureTimeout = 0x3001, |
262 | | - |
| 263 | + |
263 | 264 | /// Frame capture failed |
264 | 265 | FrameCaptureFailed = 0x3002, |
265 | | - |
| 266 | + |
266 | 267 | /// Memory allocation failed |
267 | 268 | MemoryAllocationFailed = 0x4001, |
268 | | - |
| 269 | + |
269 | 270 | /// Unknown or internal error |
270 | 271 | InternalError = 0x9999, |
271 | 272 | }; |
|
0 commit comments