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
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/qwindowsmediadevices_p.h>
9#include <qwindowscamera_p.h>
11#include <mfplayercontrol_p.h>
14#include <private/qplatformmediaplugin_p.h>
15
17
19{
22
23public:
27
29 {
30 if (name == u"windows")
31 return new QWindowsMediaIntegration;
32 return nullptr;
33 }
34};
35
38{
39 CoInitialize(NULL);
40 MFStartup(MF_VERSION);
41}
42
44{
45 MFShutdown();
46 CoUninitialize();
47}
48
53
58
59QMaybe<QPlatformMediaCaptureSession *> QWindowsMediaIntegration::createCaptureSession()
60{
61 return new QWindowsMediaCaptureService();
62}
63
64QMaybe<QPlatformAudioDecoder *> QWindowsMediaIntegration::createAudioDecoder(QAudioDecoder *decoder)
65{
66 return new MFAudioDecoderControl(decoder);
67}
68
69QMaybe<QPlatformMediaPlayer *> QWindowsMediaIntegration::createPlayer(QMediaPlayer *parent)
70{
71 return new MFPlayerControl(parent);
72}
73
75{
76 return new QWindowsCamera(camera);
77}
78
80{
82}
83
88
90{
91 return new MFEvrVideoWindowControl(sink);
92}
93
95
96#include "qwindowsintegration.moc"
The QAudioDecoder class implements decoding audio.
The QCamera class provides interface for system camera devices.
Definition qcamera.h:28
\inmodule QtMultimedia
The QMediaPlayer class allows the playing of a media files.
\inmodule QtMultimedia
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
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
QPlatformMediaIntegration * create(const QString &name) override
QMediaRecorder * recorder
Definition camera.cpp:20
QCamera * camera
Definition camera.cpp:19
QImageCapture * imageCapture
Definition camera.cpp:21
Combined button and popup list for selecting options.
GLuint name
GLsizei GLenum GLboolean sink
#define QPlatformMediaPlugin_iid
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)