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.cpp
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
#
include
"qmediaframeinput_p.h"
5
6
QT_BEGIN_NAMESPACE
7
8
void
QMediaFrameInputPrivate::setCaptureSession(QMediaCaptureSession *session)
9
{
10
if
(session == m_captureSession)
11
return
;
12
13
auto
prevSession = std::exchange(m_captureSession, session);
14
updateCaptureSessionConnections(prevSession, session);
15
updateCanSendMediaFrame();
16
}
17
18
void
QMediaFrameInputPrivate::updateCanSendMediaFrame()
19
{
20
const
bool
canSendMediaFrame = m_captureSession && checkIfCanSendMediaFrame();
21
if
(m_canSendMediaFrame != canSendMediaFrame) {
22
m_canSendMediaFrame = canSendMediaFrame;
23
if
(m_canSendMediaFrame)
24
emitReadyToSendMediaFrame();
25
}
26
}
27
28
void
QMediaFrameInputPrivate::postponeCheckReadyToSend()
29
{
30
if
(m_canSendMediaFrame && !m_postponeReadyToSendCheckRun) {
31
m_postponeReadyToSendCheckRun =
true
;
32
QMetaObject::invokeMethod(
33
q_ptr,
34
[
this
]() {
35
m_postponeReadyToSendCheckRun =
false
;
36
if
(m_canSendMediaFrame)
37
emitReadyToSendMediaFrame();
38
},
39
Qt::QueuedConnection);
40
}
41
}
42
43
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtmultimedia
src
multimedia
qmediaframeinput.cpp
Generated on
for Qt by
1.18.0