summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-18 03:21:06 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-21 16:20:46 +0300
commit6f09680b256025923cedd50b5fd1a878af2dffd4 (patch)
tree840b340840347c50fc279f54a397f5d8dd608fc2 /src/ipa/raspberrypi/controller
parent93802f600cf4c3bf15c9d044b980927615e800f4 (diff)
qcam: Replace MappedBuffer with Span<uint8_t>
The MappedBuffer structure is a custom container that binds a data pointer with a length. This is exactly what Span is. Use it instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/raspberrypi/controller')
0 files changed, 0 insertions, 0 deletions
f='#n60'>60 61
# SPDX-License-Identifier: CC0-1.0

qcam_sources = files([
    '../cam/options.cpp',
    '../cam/stream_options.cpp',
    'format_converter.cpp',
    'main.cpp',
    'main_window.cpp',
    'viewfinder.cpp',
])

qcam_moc_headers = files([
    'main_window.h',
    'viewfinder.h',
])

qcam_resources = files([
    'assets/feathericons/feathericons.qrc',
])

qt5 = import('qt5')
qt5_dep = dependency('qt5',
                     method : 'pkg-config',
                     modules : ['Core', 'Gui', 'Widgets'],
                     required : get_option('qcam'))

if qt5_dep.found()
    qcam_deps = [
        libcamera_dep,
        qt5_dep,
    ]

    qt5_cpp_args = [ '-DQT_NO_KEYWORDS' ]

    tiff_dep = dependency('libtiff-4', required : false)
    if tiff_dep.found()
        qt5_cpp_args += [ '-DHAVE_TIFF' ]
        qcam_deps += [ tiff_dep ]
        qcam_sources += files([
            'dng_writer.cpp',
        ])
    endif

    # gcc 9 introduced a deprecated-copy warning that is triggered by Qt until
    # Qt 5.13. clang 10 introduced the same warning, but detects more issues
    # that are not fixed in Qt yet. Disable the warning manually in both cases.
    if ((cc.get_id() == 'gcc' and cc.version().version_compare('>=9.0') and
         qt5_dep.version().version_compare('<5.13')) or
        (cc.get_id() == 'clang' and cc.version().version_compare('>=10.0')))
        qt5_cpp_args += [ '-Wno-deprecated-copy' ]
    endif

    resources = qt5.preprocess(moc_headers: qcam_moc_headers,
                               qresources : qcam_resources,
                               dependencies: qt5_dep)

    qcam  = executable('qcam', qcam_sources, resources,
                       install : true,
                       dependencies : qcam_deps,
                       cpp_args : qt5_cpp_args)
endif