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
16#include <QtCore/private/qfunctions_win_p.h>
17
19
21{
22 Q_OBJECT
23 Q_PLUGIN_METADATA(IID QPlatformMediaPlugin_iid FILE "windows.json")
24
25public:
29
31 {
32 if (name == u"windows")
33 return new QWindowsMediaIntegration;
34 return nullptr;
35 }
36};
37
38QWindowsMediaIntegration::QWindowsMediaIntegration()
39 : QPlatformMediaIntegration(QLatin1String("windows"))
40{
41 qt_win_ensureComInitializedOnThisThread();
42 MFStartup(MF_VERSION);
43}
44
49
51{
52 return new QWindowsFormatInfo();
53}
54
56{
57 return new QWindowsVideoDevices(this);
58}
59
64
69
71{
72 return new MFPlayerControl(parent);
73}
74
76{
77 return new QWindowsCamera(camera);
78}
79
81{
82 return new QWindowsMediaEncoder(recorder);
83}
84
86{
87 return new QWindowsImageCapture(imageCapture);
88}
89
94
95QT_END_NAMESPACE
96
97#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
Combined button and popup list for selecting options.