summaryrefslogtreecommitdiff
path: root/src/android/mm/meson.build
blob: e3e0484c37209779b9428a3ba0f8b5052ff3b60b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# SPDX-License-Identifier: CC0-1.0

platform = get_option('android_platform')
if platform == 'generic'
    android_hal_sources += files(['generic_camera_buffer.cpp',
                                  'generic_frame_buffer_allocator.cpp'])
    android_deps += [libdl]

    libhardware = dependency('libhardware', required : false)
    if libhardware.found()
        android_deps += [libhardware]
    else
        android_hal_sources += files(['libhardware_stub.c'])
    endif
elif platform == 'cros'
    android_hal_sources += files(['cros_camera_buffer.cpp',
                                  'cros_frame_buffer_allocator.cpp'])
    android_deps += [dependency('libcros_camera')]
endif
<vector> #include <libcamera/formats.h> #include <libcamera/pixel_format.h> #include <libcamera/base/utils.h> #include "test.h" using namespace std; using namespace libcamera; class PixelFormatTest : public Test { protected: int run() { std::vector<std::pair<PixelFormat, const char *>> formatsMap{ { formats::R8, "R8" }, { formats::SRGGB10_CSI2P, "SRGGB10_CSI2P" }, { PixelFormat(0, 0), "<INVALID>" }, { PixelFormat(0x20203843), "<C8 >" } }; for (const auto &format : formatsMap) { if ((format.first).toString() != format.second) { cerr << "Failed to convert PixelFormat " << utils::hex(format.first.fourcc()) << " to string" << endl; return TestFail; } } if (PixelFormat().toString() != "<INVALID>") { cerr << "Failed to convert default PixelFormat to string" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(PixelFormatTest)