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
qgstdmabufvideobuffer_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
4#ifndef QGSTDMABUFVIDEOBUFFER_P_H
5#define QGSTDMABUFVIDEOBUFFER_P_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 <QtMultimedia/private/qdmabufvideobuffer_p.h>
19#include <QtCore/qsize.h>
20#include <QtCore/qspan.h>
21
22#include <common/qgst_p.h>
23#include <common/qgstbufferprovider_p.h>
24
25#include <gst/video/video.h>
26
27#include <memory>
28
29QT_BEGIN_NAMESPACE
30
31class QGstDmaBufVideoBuffer final : public QtMultimediaPrivate::QDmaBufVideoBuffer,
32 public QGstBufferProvider
33{
34public:
35 static std::unique_ptr<QGstDmaBufVideoBuffer> create(QGstBufferHandle buffer,
36 const QGstVideoInfo &videoInfo,
37 const QVideoFrameFormat &frameFormat);
38 ~QGstDmaBufVideoBuffer() override;
39
40 GstBuffer *gstBuffer() const override { return m_buffer.get(); }
41
42private:
43 QGstDmaBufVideoBuffer(QSpan<const QtMultimediaPrivate::DmaBufPlane> planes,
44 QtMultimediaPrivate::DmaBufImportMode importMode, QGstBufferHandle buffer,
45 QVideoFrameFormat::PixelFormat format, QSize size);
46
47 const QGstBufferHandle m_buffer;
48};
49
50QT_END_NAMESPACE
51
52#endif
typedefQT_BEGIN_NAMESPACE struct _GstBuffer GstBuffer
static std::optional< DRMFormat > fourccFromGstVideoFormat(const GstVideoFormat format, int plane, bool singleEGLImage)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)