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
17
19{
20 Q_OBJECT
21 Q_PLUGIN_METADATA(IID QPlatformMediaPlugin_iid FILE "windows.json")
22
23public:
27
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
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"
q23::expected< QPlatformVideoSink *, QString > createVideoSink(QVideoSink *sink) override
QPlatformMediaFormatInfo * createFormatInfo() override
q23::expected< QPlatformAudioDecoder *, QString > createAudioDecoder(QAudioDecoder *decoder) override
q23::expected< QPlatformCamera *, QString > createCamera(QCamera *camera) override
q23::expected< QPlatformImageCapture *, QString > createImageCapture(QImageCapture *imageCapture) override
QPlatformVideoDevices * createVideoDevices() override
q23::expected< QPlatformMediaRecorder *, QString > createRecorder(QMediaRecorder *recorder) override
q23::expected< QPlatformMediaPlayer *, QString > createPlayer(QMediaPlayer *parent) override
q23::expected< QPlatformMediaCaptureSession *, QString > createCaptureSession() override