blob: 209eb6a57b4c0b17e634831cd254827af6cd6b5d (
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
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* libcamera Camera API tests
*/
#include <iostream>
#include "camera_test.h"
#include "test.h"
using namespace libcamera;
using namespace std;
namespace {
class ConfigurationDefault : public CameraTest, public Test
{
public:
ConfigurationDefault()
: CameraTest("platform/vimc.0 Sensor B")
{
}
protected:
int init() override
{
return status_;
}
int run() override
{
std::unique_ptr<CameraConfiguration> config;
/* Test asking for configuration for a video stream. */
config = camera_->generateConfiguration({ StreamRole::VideoRecording });
if (!config || config->size() != 1) {
cout <
#define PUBLIC_CAMERA_BUFFER_IMPLEMENTATION \
CameraBuffer::CameraBuffer(buffer_handle_t camera3Buffer, int flags) \
: Extensible(new Private(this, camera3Buffer, flags)) \
{ \
} \
CameraBuffer::~CameraBuffer() \
{ \
} \
bool CameraBuffer::isValid() const \
{ \
const Private *const d = LIBCAMERA_D_PTR(); \
return d->isValid(); \
} \
unsigned int CameraBuffer::numPlanes() const \
{ \
const Private *const d = LIBCAMERA_D_PTR(); \
return d->numPlanes(); \
} \
Span<const uint8_t> CameraBuffer::plane(unsigned int plane) const \
{ \
const Private *const d = LIBCAMERA_D_PTR(); \
return const_cast<Private *>(d)->plane(plane); \
} \
Span<uint8_t> CameraBuffer::plane(unsigned int plane) \
{ \
Private *const d = LIBCAMERA_D_PTR()
|