Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowsintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 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#include <private/qwindowsaudiodevices_p.h>
6#include <qwindowsformatinfo_p.h>
7#include <qwindowsmediacapture_p.h>
8#include <qwindowsimagecapture_p.h>
9#include <qwindowscamera_p.h>
10#include <qwindowsmediaencoder_p.h>
11#include <mfplayercontrol_p.h>
12#include <mfaudiodecodercontrol_p.h>
13#include <mfevrvideowindowcontrol_p.h>
14#include <private/qplatformmediaplugin_p.h>
15
16QT_BEGIN_NAMESPACE
17
18class QWindowsMediaPlugin : public QPlatformMediaPlugin
19{
20 Q_OBJECT
21 Q_PLUGIN_METADATA(IID QPlatformMediaPlugin_iid FILE "windows.json")
22
23public:
24 QWindowsMediaPlugin()
25 : QPlatformMediaPlugin()
26 {}
27
28 QPlatformMediaIntegration* create(const QString &name) override
29 {
30 if (name == u"windows")
31 return new QWindowsMediaIntegration;
32 return nullptr;
33 }
34};
35
36QWindowsMediaIntegration::QWindowsMediaIntegration()
37 : QPlatformMediaIntegration(QLatin1String("windows"))
38{
39 MFStartup(MF_VERSION);
40}
41
46
48{
49 return new QWindowsFormatInfo();
50}
51
53{
54 return new QWindowsVideoDevices(this);
55}
56
61
63{
64 return new MFAudioDecoderControl(decoder);
65}
66
68{
69 return new MFPlayerControl(parent);
70}
71
73{
74 return new QWindowsCamera(camera);
75}
76
78{
79 return new QWindowsMediaEncoder(recorder);
80}
81
83{
84 return new QWindowsImageCapture(imageCapture);
85}
86
91
92QT_END_NAMESPACE
93
94#include "qwindowsintegration.moc"
QPlatformMediaFormatInfo * createFormatInfo() override
QMaybe< QPlatformCamera * > createCamera(QCamera *camera) override
QMaybe< QPlatformMediaRecorder * > createRecorder(QMediaRecorder *recorder) override
QMaybe< QPlatformMediaCaptureSession * > createCaptureSession() override
QPlatformVideoDevices * createVideoDevices() override
QMaybe< QPlatformMediaPlayer * > createPlayer(QMediaPlayer *parent) override
QMaybe< QPlatformImageCapture * > createImageCapture(QImageCapture *imageCapture) override
QMaybe< QPlatformVideoSink * > createVideoSink(QVideoSink *sink) override
QMaybe< QPlatformAudioDecoder * > createAudioDecoder(QAudioDecoder *decoder) override