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
qffmpeghwaccel_d3d11_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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#ifndef QFFMPEGHWACCEL_D3D11_P_H
4#define QFFMPEGHWACCEL_D3D11_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtFFmpegMediaPluginImpl/private/qffmpeghwaccel_p.h>
18#include <QtMultimedia/private/qwindowsd3d11rhitextureimporter_p.h>
19#include <QtMultimedia/private/qwindowsd3d11videoprocessor_p.h>
20#include <QtCore/private/qcomptr_p.h>
21
22#include <d3d11.h>
23#include <d3d11_1.h>
24
25#ifdef Q_OS_WINDOWS
26
27QT_BEGIN_NAMESPACE
28
29class QRhi;
30
31namespace QFFmpeg {
32
33class D3D11TextureConverter : public TextureConverterBackend
34{
35public:
36 static std::shared_ptr<D3D11TextureConverter> create(QRhi *rhi);
37
38 QVideoFrameTexturesHandlesUPtr
39 createTextureHandles(AVFrame *frame, QVideoFrameTexturesHandlesUPtr oldHandles) override;
40
41 static void SetupDecoderTextures(AVCodecContext *s);
42
43 static bool isSupported(AVFrame &, QRhi &);
44
45protected:
46 explicit D3D11TextureConverter(QRhi *rhi);
47
48private:
49 using QWindowsD3D11RhiTextureImporter = QtMultimediaPrivate::QWindowsD3D11RhiTextureImporter;
50 using QWindowsD3D11VideoProcessor = QtMultimediaPrivate::QWindowsD3D11VideoProcessor;
51 QWindowsD3D11RhiTextureImporter m_importer;
52 QWindowsD3D11VideoProcessor m_videoProcessor;
53};
54
55AVFrameUPtr copyFromHwPoolD3D11(AVFrameUPtr src);
56
57} // namespace QFFmpeg
58
59QT_END_NAMESPACE
60
61#endif
62
63#endif
lock_guard & operator=(const lock_guard &)=delete
lock_guard(const lock_guard &)=delete
lock_guard(const AVD3D11VADeviceContext &ctx)
AVFrameUPtr copyFromHwPoolD3D11(AVFrameUPtr src)