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
qmediaframeinput_p.h
Go to the documentation of this file.
1
// Copyright (C) 2024 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
QMEDIAFRAMEINPUT_P_H
5
#
define
QMEDIAFRAMEINPUT_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
/
qmediacapturesession
.
h
>
19
#
include
<
QtCore
/
private
/
qobject_p
.
h
>
20
21
QT_BEGIN_NAMESPACE
22
23
class
QMediaFrameInputPrivate :
public
QObjectPrivate
24
{
25
public
:
26
void
setCaptureSession(QMediaCaptureSession *session);
27
28
QMediaCaptureSession *captureSession()
const
{
return
m_captureSession; }
29
30
protected
:
31
template
<
typename
Sender>
32
bool
sendMediaFrame(Sender &&sender)
33
{
34
if
(!m_canSendMediaFrame)
35
return
false
;
36
37
sender();
38
postponeCheckReadyToSend();
39
return
true
;
40
}
41
42
template
<
typename
Sender,
typename
Signal>
43
void
addUpdateSignal(Sender sender, Signal signal)
44
{
45
connect(sender, signal,
this
, &QMediaFrameInputPrivate::updateCanSendMediaFrame);
46
}
47
48
template
<
typename
Sender,
typename
Signal>
49
void
removeUpdateSignal(Sender sender, Signal signal)
50
{
51
disconnect(sender, signal,
this
, &QMediaFrameInputPrivate::updateCanSendMediaFrame);
52
}
53
54
void
updateCanSendMediaFrame();
55
56
private
:
57
void
postponeCheckReadyToSend();
58
59
virtual
bool
checkIfCanSendMediaFrame()
const
= 0;
60
61
virtual
void
emitReadyToSendMediaFrame() = 0;
62
63
virtual
void
updateCaptureSessionConnections(QMediaCaptureSession *prevSession,
64
QMediaCaptureSession *currentSession) = 0;
65
66
private
:
67
QMediaCaptureSession *m_captureSession =
nullptr
;
68
bool
m_canSendMediaFrame =
false
;
69
bool
m_postponeReadyToSendCheckRun =
false
;
70
};
71
72
QT_END_NAMESPACE
73
74
#
endif
// QMEDIAFRAMEINPUT_P_H
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
multimedia
qmediaframeinput_p.h
Generated on
for Qt by
1.18.0