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) override;
40 using TextureConverterBackend::createTextureHandles;
41
42 static void SetupDecoderTextures(AVCodecContext *s);
43
44 static bool isSupported(AVFrame &, QRhi &);
45
46protected:
47 explicit D3D11TextureConverter(QRhi *rhi);
48
49private:
50 using QWindowsD3D11RhiTextureImporter = QtMultimediaPrivate::QWindowsD3D11RhiTextureImporter;
51 using QWindowsD3D11VideoProcessor = QtMultimediaPrivate::QWindowsD3D11VideoProcessor;
52 QWindowsD3D11RhiTextureImporter m_importer;
53 QWindowsD3D11VideoProcessor m_videoProcessor;
54};
55
56AVFrameUPtr copyFromHwPoolD3D11(AVFrameUPtr src);
57
58} // namespace QFFmpeg
59
60QT_END_NAMESPACE
61
62#endif
63
64#endif
lock_guard & operator=(const lock_guard &)=delete
lock_guard(const lock_guard &)=delete
lock_guard(const AVD3D11VADeviceContext &ctx)
AVFrameUPtr copyFromHwPoolD3D11(AVFrameUPtr src)