Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
5
7
9{
10 if (session == m_captureSession)
11 return;
12
13 auto prevSession = std::exchange(m_captureSession, session);
14 updateCaptureSessionConnections(prevSession, session);
16}
17
19{
20 const bool canSendMediaFrame = m_captureSession && checkIfCanSendMediaFrame();
21 if (m_canSendMediaFrame != canSendMediaFrame) {
22 m_canSendMediaFrame = canSendMediaFrame;
23 if (m_canSendMediaFrame)
25 }
26}
27
28void QMediaFrameInputPrivate::postponeCheckReadyToSend()
29{
30 if (m_canSendMediaFrame && !m_postponeReadyToSendCheckRun) {
31 m_postponeReadyToSendCheckRun = true;
33 q_ptr,
34 [this]() {
35 m_postponeReadyToSendCheckRun = false;
36 if (m_canSendMediaFrame)
38 },
40 }
41}
42
The QMediaCaptureSession class allows capturing of audio and video content.
virtual void updateCaptureSessionConnections(QMediaCaptureSession *prevSession, QMediaCaptureSession *currentSession)=0
virtual bool checkIfCanSendMediaFrame() const =0
virtual void emitReadyToSendMediaFrame()=0
void setCaptureSession(QMediaCaptureSession *session)
QObject * q_ptr
Definition qobject.h:72
Combined button and popup list for selecting options.
@ QueuedConnection
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
\threadsafe This is an overloaded member function, provided for convenience. It differs from the abov...