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
qpipewire_camera_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
4
#
ifndef
QPIPEWIRE_CAMERA_P_H
5
#
define
QPIPEWIRE_CAMERA_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtMultimedia
/
private
/
qplatformcamera_p
.
h
>
19
#
include
<
QtMultimedia
/
private
/
qtmultimediaglobal_p
.
h
>
20
#
include
<
QtMultimedia
/
qcameradevice
.
h
>
21
22
#
include
<
chrono
>
23
#
include
<
memory
>
24
#
include
<
optional
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QtPipeWire
{
29
30
class
QPipeWireVideoStream;
31
32
class
Q_MULTIMEDIA_EXPORT
QPipeWireCamera
:
public
QPlatformCamera
33
{
34
Q_OBJECT
35
36
public
:
37
explicit
QPipeWireCamera
(
QCamera
*
camera
);
38
~
QPipeWireCamera
()
override
;
39
40
bool
isActive
()
const
override
;
41
void
setActive
(
bool
active
)
override
;
42
43
void
setCamera
(
const
QCameraDevice
&
camera
)
override
;
44
bool
setCameraFormat
(
const
QCameraFormat
&
format
)
override
;
45
46
QVideoFrameFormat
frameFormat
()
const
override
;
47
48
private
:
49
bool
startStream
();
50
void
stopStream
();
51
52
// Returns true if the resolved format changed.
53
bool
resolveCameraFormat
(
const
QCameraFormat
&
format
);
54
55
bool
m_active
=
false
;
56
QCameraDevice
m_cameraDevice
;
57
std
::
unique_ptr
<
QPipeWireVideoStream
>
m_stream
;
58
// Written on the PipeWire thread; read only after stopStream() has synchronized with it.
59
std
::
optional
<
std
::
chrono
::
microseconds
>
m_lastFrameStart
;
60
};
61
62
}
// namespace QtPipeWire
63
64
QT_END_NAMESPACE
65
66
#
endif
// QPIPEWIRE_CAMERA_P_H
QtPipeWire::QPipeWireCamera
Definition
qpipewire_camera_p.h:33
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtPipeWire
Definition
qpipewire_async_support.cpp:10
QtPipeWire::Q_STATIC_LOGGING_CATEGORY
Q_STATIC_LOGGING_CATEGORY(lcPipewireAudioSink, "qt.multimedia.pipewire.audiosink")
qtmultimedia
src
multimedia
pipewire
qpipewire_camera_p.h
Generated on
for Qt by
1.18.0