Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlibcamera_plugin.cpp
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
7
8#include <QtMultimedia/private/qplatformlibcameraintegration_p.h>
9#include <QtMultimedia/private/qplatformlibcameraplugin_p.h>
10
12
13namespace QLibCamera {
14
16{
17public:
19
20 QPlatformVideoDevices *createVideoDevices(QPlatformMediaIntegration *parent) override
21 {
22 std::unique_ptr<QLibCameraVideoDevices> devices = QLibCameraVideoDevices::create(parent);
23 return devices.release();
24 }
25
26 q23::expected<QPlatformCamera *, QString> createCamera(QCamera *camera) override
27 {
28 return new QLibCameraCamera(camera, m_instance);
29 }
30
31private:
32 std::shared_ptr<QLibCameraInstance> m_instance;
33};
34
36{
37 Q_OBJECT
38 Q_PLUGIN_METADATA(IID QPlatformLibCameraPlugin_iid FILE "libcamera.json")
39
40public:
45};
46
47} // namespace QLibCamera
48
49QT_END_NAMESPACE
50
51#include "qlibcamera_plugin.moc"
QPlatformVideoDevices * createVideoDevices(QPlatformMediaIntegration *parent) override
q23::expected< QPlatformCamera *, QString > createCamera(QCamera *camera) override
Combined button and popup list for selecting options.