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
qdmabufvulkanimporter_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 QDMABUFVULKANIMPORTER_P_H
4#define QDMABUFVULKANIMPORTER_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
18
19#include <QtMultimedia/qvideoframeformat.h>
20#include <QtMultimedia/private/qdmabufimportfailure_p.h>
21#include <QtMultimedia/private/qmultimedia_drm_support_p.h>
22#include <QtMultimedia/private/qtmultimediaglobal_p.h>
23
24#include <QtGui/rhi/qrhi.h>
25#include <QtGui/qvulkaninstance.h> // defines VK_NO_PROTOTYPES before pulling in vulkan.h
26
27#include <QtCore/qspan.h>
28#include <QtCore/private/qexpected_p.h>
29
30#include <array>
31#include <memory>
32#include <optional>
33
34static_assert(QT_CONFIG(linux_dmabuf_vulkan));
35
36QT_BEGIN_NAMESPACE
37
38class QRhi;
39
40namespace QtMultimediaPrivate {
41
72
73class Q_MULTIMEDIA_EXPORT VulkanDmaBufTextureHandles final : public QVideoFrameTexturesHandles
74{
75public:
81
83 int nPlanes, std::array<Plane, 4> planes,
84 std::shared_ptr<void> parentKeepAlive = {});
85
87
89
90private:
91 const std::shared_ptr<void> m_parentKeepAlive; // keep the backend alive
93 const VkDevice m_device;
94 const int m_nPlanes;
95 const std::array<Plane, 4> m_planes;
96};
97
98// Same recoverable/unrecoverable failure semantics as importDmaBufTextures (the EGL importer).
103
104} // namespace QtMultimediaPrivate
105
106QT_END_NAMESPACE
107
108#endif // QDMABUFVULKANIMPORTER_P_H
q23::expected< QVideoFrameTexturesHandlesUPtr, FailureSeverity > importDmaBufTexturesVulkan(QRhi &rhi, const DmaBufVulkanContext &vulkanContext, QSpan< const DmaBufPlane > planes, QVideoFrameFormat::PixelFormat qtFormat, QSize frameSize, std::shared_ptr< void > parentKeepAlive)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)