Loading...
Searching...
No Matches
VideoOutputStrategy.hpp
Go to the documentation of this file.
1#pragma once
2
37#include <QString>
38
39#include <cstdint>
40
41class QRhi;
42class QRhiTexture;
43class QRhiCommandBuffer;
44
45namespace score::gfx
46{
47struct RenderState;
48}
49
50namespace score::gfx::interop
51{
52
59{
60 QRhi* rhi{};
61
66
70 QRhiTexture* sourceTexture{};
71
72 int width{};
73 int height{};
74
79 std::uint32_t frameByteSize{};
80
89};
90
97{
98 virtual ~VideoOutputStrategy() = default;
99
103 virtual const char* name() const noexcept = 0;
104
105 virtual bool init(const VideoOutputStrategyConfig& cfg) = 0;
106 virtual void release() = 0;
107
113 virtual void encodeFrame(QRhiCommandBuffer& cb) = 0;
114
119 virtual void* prepareNextFrame() = 0;
120};
121
122} // namespace score::gfx::interop
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Global state associated to a rendering context.
Definition RenderState.hpp:37
Generic config passed to VideoOutputStrategy::init. Vendor- specific bits (card handle,...
Definition VideoOutputStrategy.hpp:59
std::uint32_t frameByteSize
Definition VideoOutputStrategy.hpp:79
const score::gfx::RenderState * state
Definition VideoOutputStrategy.hpp:65
QString colorConversion
Definition VideoOutputStrategy.hpp:88
QRhiTexture * sourceTexture
Definition VideoOutputStrategy.hpp:70
Per-graphics-API strategy interface for vendor GPU-direct output. Each addon implements one impl per ...
Definition VideoOutputStrategy.hpp:97
virtual const char * name() const noexcept=0
virtual void encodeFrame(QRhiCommandBuffer &cb)=0