Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qlibcamera_videodevices_p.h
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
#
ifndef
QLIBCAMERA_VIDEODEVICES_P_H
4
#
define
QLIBCAMERA_VIDEODEVICES_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#
include
<
QtMultimedia
/
private
/
qplatformvideodevices_p
.
h
>
18
19
#
include
<
memory
>
20
21
QT_BEGIN_NAMESPACE
22
23
class
QPlatformMediaIntegration;
24
25
namespace
QLibCamera
{
26
27
class
QLibCameraInstance
;
28
29
class
QLibCameraVideoDevices
:
public
QPlatformVideoDevices
30
{
31
Q_OBJECT
32
public
:
33
// Returns null only when libcamera::CameraManager::start() failed -- not when the camera
34
// list is currently empty. QPlatformMediaIntegration::videoDevices() memoizes its result
35
// under a std::once_flag, so bailing out on an empty list would make libcamera permanently
36
// unreachable for a camera plugged in after this call.
37
static
std
::
unique_ptr
<
QLibCameraVideoDevices
>
create
(
QPlatformMediaIntegration
*);
38
39
~
QLibCameraVideoDevices
()
override
;
40
41
protected
:
42
QList
<
QCameraDevice
>
findVideoInputs
()
const
override
;
43
44
private
:
45
explicit
QLibCameraVideoDevices(QPlatformMediaIntegration *,
46
std
::shared_ptr<
QLibCameraInstance
>);
47
48
// Set once in the constructor and never mutated -- safe to read from any thread, satisfying
49
// findVideoInputs()'s "callable from any thread" contract without needing a mutex of our
50
// own. libcamera::CameraManager::cameras()/get() are themselves documented thread-safe.
51
const
std
::shared_ptr<
QLibCameraInstance
> m_instance;
52
};
53
54
}
// namespace QLibCamera
55
56
QT_END_NAMESPACE
57
58
#
endif
// QLIBCAMERA_VIDEODEVICES_P_H
QLibCamera::QLibCameraInstance
Definition
qlibcamera_instance_p.h:32
QLibCamera::QLibCameraIntegration
Definition
qlibcamera_plugin.cpp:16
QLibCamera::QLibCameraIntegration::createVideoDevices
QPlatformVideoDevices * createVideoDevices(QPlatformMediaIntegration *parent) override
Definition
qlibcamera_plugin.cpp:20
QLibCamera::QLibCameraIntegration::QLibCameraIntegration
QLibCameraIntegration()
Definition
qlibcamera_plugin.cpp:18
QLibCamera::QLibCameraIntegration::createCamera
q23::expected< QPlatformCamera *, QString > createCamera(QCamera *camera) override
Definition
qlibcamera_plugin.cpp:26
QLibCamera::QLibCameraPlugin
Definition
qlibcamera_plugin.cpp:36
QLibCamera::QLibCameraVideoDevices
Definition
qlibcamera_videodevices_p.h:30
QLibCamera::QLibCameraVideoDevices::findVideoInputs
QList< QCameraDevice > findVideoInputs() const override
Definition
qlibcamera_videodevices.cpp:75
QLibCamera::QLibCameraVideoDevices::~QLibCameraVideoDevices
~QLibCameraVideoDevices() override
QLibCamera
Definition
qplatformlibcameraintegration.cpp:13
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtmultimedia
src
plugins
libcamera
qlibcamera_videodevices_p.h
Generated on
for Qt by
1.18.0