Qt 6.x
The Qt SDK
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:
26 {}
27
29 {
30 if (name == QLatin1String("windows"))
31 return new QWindowsMediaIntegration;
32 return nullptr;
33 }
34};
35
37{
38 CoInitialize(NULL);
39 MFStartup(MF_VERSION);
40
41 m_videoDevices = std::make_unique<QWindowsVideoDevices>(this);
42}
43
45{
46 delete m_formatInfo;
47
48 MFShutdown();
49 CoUninitialize();
50}
51
53{
54 if (!m_formatInfo)
56 return m_formatInfo;
57}
58
60{
61 return new QWindowsMediaCaptureService();
62}
63
65{
66 return new MFAudioDecoderControl(decoder);
67}
68
70{
71 return new MFPlayerControl(parent);
72}
73
75{
76 return new QWindowsCamera(camera);
77}
78
80{
82}
83
85{
87}
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
std::unique_ptr< QPlatformVideoDevices > m_videoDevices
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
The QVideoSink class represents a generic sink for video data.
Definition qvideosink.h:22
QMaybe< QPlatformCamera * > createCamera(QCamera *camera) override
QMaybe< QPlatformMediaRecorder * > createRecorder(QMediaRecorder *recorder) override
QPlatformMediaFormatInfo * formatInfo() override
QWindowsFormatInfo * m_formatInfo
QMaybe< QPlatformMediaCaptureSession * > createCaptureSession() 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
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent