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
qohosvideooutput_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 QOHOSVIDEOOUTPUT_P_H
5#define QOHOSVIDEOOUTPUT_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 <QtCore/qobject.h>
19#include <QtCore/qpointer.h>
20#include <QtCore/qsize.h>
21
22#include <native_image/native_image.h>
23
24#include <memory>
25
26QT_BEGIN_NAMESPACE
27
28class QVideoFrame;
29class QVideoSink;
30class QOhosSurfaceImage;
32
34{
36public:
37 explicit QOhosVideoOutput(QVideoSink *sink, QObject *parent = nullptr);
39
42
43 void setVideoSize(const QSize &size);
44
45 QVideoSink *sink() const { return m_sink; }
46
49
50private slots:
51 void onNewFrame(const QVideoFrame &frame);
52 void onRhiChanged();
53
54private:
55 QPointer<QVideoSink> m_sink;
56 QSize m_videoSize;
57 std::shared_ptr<QOhosTextureThread> m_textureThread;
58 bool m_surfaceCreatedWithoutRhi{ false };
59};
60
61QT_END_NAMESPACE
62
63#endif // QOHOSVIDEOOUTPUT_P_H
void setVideoSize(const QSize &size)
OHNativeWindow * nativeWindow()
QVideoSink * sink() const
\inmodule QtGuiPrivate \inheaderfile rhi/qrhi.h
Definition qrhi.h:323
QOhosTextureVideoBuffer(std::unique_ptr< QRhiTexture > tex, const QSize &size, std::weak_ptr< QRhi > producerRhi, QPointer< QObject > producer, QPointer< QOpenGLContext > producerContext)
void unmap() override
Releases the memory mapped by the map() function.
QVideoFrameTexturesUPtr mapTextures(QRhi &rhi, QVideoFrameTexturesUPtr &) override
MapData map(QVideoFrame::MapMode mode) override
Maps the planes of a video buffer to memory.
QRhiTexture * texture(uint plane) const override
QOhosVideoFrameTextures(QRhi *rhi, QSize size, quint64 handle)
std::unique_ptr< QRhiTexture > copyExternalTexture(QSize size, const QMatrix4x4 &externalTexMatrix)
TextureCopy(QRhi *rhi, QRhiTexture *externalTex)
Combined button and popup list for selecting options.
std::unique_ptr< QRhiGraphicsPipeline > newGraphicsPipeline(QRhi *rhi, QRhiShaderResourceBindings *srb, QRhiRenderPassDescriptor *rpd, QShader vs, QShader fs)