15#include <QtCore/qcoreapplication.h>
16#include <QtCore/qapplicationstatic.h>
20#include <QtCore/private/qfactoryloader_p.h>
21#include <QtCore/private/qcoreapplication_p.h>
22#include <private/qplatformmediaformatinfo_p.h>
32 qWarning(
"No QtMultimedia backends found. Only QMediaDevices, QAudioDevice, QSoundEffect, QAudioSink, and QAudioSource are available.");
46#ifdef QT_DEFAULT_MEDIA_BACKEND
48 if (backends.contains(backend))
52#if defined(Q_OS_DARWIN) || defined(Q_OS_LINUX) || defined(Q_OS_WINDOWS) || defined(Q_OS_ANDROID)
55 if (backends.contains(FFmpegBackend))
59 if (backends.size() > 1 && backends[0] == FFmpegBackend)
71 qCCritical(qLcMediaPlugin()) <<
"Qt Multimedia requires a QCoreApplication instance";
75 if (backend.
isEmpty() && !backends.isEmpty())
76 backend = defaultBackend(backends);
78 qCDebug(qLcMediaPlugin) <<
"Loading media backend" << backend;
80 qLoadPlugin<QPlatformMediaIntegration, QPlatformMediaPlugin>(loader(), backend));
84 instance = std::make_unique<QFallbackIntegration>();
91 qCDebug(qLcMediaPlugin) <<
"Released media backend";
94 std::unique_ptr<QPlatformMediaIntegration> instance;
105 return s_instanceHolder->instance.get();
111 return devices ?
devices->videoDevices() : QList<QCameraDevice>{};
114QMaybe<std::unique_ptr<QPlatformAudioResampler>>
144 std::call_once(m_formatInfoOnceFlg, [
this]() {
148 return m_formatInfo.get();
164 std::call_once(m_videoDevicesOnceFlag,
168 return m_videoDevices.get();
173 std::call_once(m_capturableWindowsOnceFlag,
177 return m_capturableWindows.get();
182 std::call_once(m_mediaDevicesOnceFlag, [
this] {
185 return m_mediaDevices.get();
195 const auto keyMap = fl->keyMap();
201 qCDebug(qLcMediaPlugin) <<
"Available backends" <<
list;
207 return m_backendName;
222#include "moc_qplatformmediaintegration_p.cpp"
\qmltype AudioOutput \instantiates QAudioOutput
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVideoFrame class represents a frame of video data.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
#define Q_APPLICATION_STATIC(TYPE, NAME,...)
#define Q_LOGGING_CATEGORY(name,...)
#define qCCritical(category,...)
#define qCDebug(category,...)
GLdouble GLdouble GLdouble GLdouble q
#define QStringLiteral(str)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
static const struct @450 keyMap[]
bool contains(const AT &t) const noexcept