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
qwindowsmediafoundation_p.h
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
4#ifndef QWINDOWSMEDIAFOUNDATION_H
5#define QWINDOWSMEDIAFOUNDATION_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtmultimediaglobal_p.h>
19#include <QtCore/private/qsystemlibrary_p.h>
20
21#include <mfapi.h>
22#include <mfidl.h>
23#include <mfreadwrite.h>
24
26
28{
29 Q_DISABLE_COPY_MOVE(QWindowsMediaFoundation)
30
31public:
32 static QWindowsMediaFoundation *instance();
33
35 ~QWindowsMediaFoundation();
36
37 bool valid() const;
38
39 decltype(&::MFStartup) mfStartup = nullptr;
40 decltype(&::MFShutdown) mfShutdown = nullptr;
41 decltype(&::MFCreateMediaType) mfCreateMediaType = nullptr;
43 decltype(&::MFCreateSample) mfCreateSample = nullptr;
44 decltype(&::MFCreateAttributes) mfCreateAttributes = nullptr;
49
50private:
51 QSystemLibrary m_mfplat{ QStringLiteral("Mfplat.dll") };
52 QSystemLibrary m_mf{ QStringLiteral("Mf.dll") };
53 QSystemLibrary m_mfreadwrite{ QStringLiteral("Mfreadwrite.dll") };
54 bool m_valid = false;
55};
56
57class Q_MULTIMEDIA_EXPORT QMFRuntimeInit
58{
59 Q_DISABLE_COPY_MOVE(QMFRuntimeInit)
60
61public:
62 QMFRuntimeInit();
63 explicit QMFRuntimeInit(QWindowsMediaFoundation *wmf);
64 ~QMFRuntimeInit();
65
66private:
67 QWindowsMediaFoundation *const m_wmf;
68 const HRESULT m_initResult;
69};
70
71QT_END_NAMESPACE
72
73#endif // QWINDOWSMEDIAFOUNDATION_H
decltype(&::MFEnumDeviceSources) mfEnumDeviceSources
decltype(&::MFCreateAttributes) mfCreateAttributes
decltype(&::MFGetStrideForBitmapInfoHeader) mfGetStrideForBitmapInfoHeader
decltype(&::MFCreateMediaType) mfCreateMediaType
decltype(&::MFCreateSourceReaderFromMediaSource) mfCreateSourceReaderFromMediaSource
decltype(&::MFCreateDeviceSource) mfCreateDeviceSource
decltype(&::MFCreateMemoryBuffer) mfCreateMemoryBuffer
decltype(&::MFStartup) mfStartup
decltype(&::MFCreateSample) mfCreateSample
decltype(&::MFShutdown) mfShutdown
Combined button and popup list for selecting options.
Q_GLOBAL_STATIC(QWindowsMediaFoundation, s_wmf)
bool setProcAddress(QSystemLibrary &lib, T &f, const char name[])
static HRESULT startupMediaFoundation(QWindowsMediaFoundation *wmf)