Loading...
Searching...
No Matches
DirectVideoOutputNode.hpp
Go to the documentation of this file.
1#pragma once
2
19#include <Gfx/Graph/OutputNode.hpp>
21
22#include <score_plugin_gfx_export.h>
23
24#include <atomic>
25#include <cstdint>
26#include <memory>
27
28namespace score::gfx
29{
30class RenderList;
31struct RenderState;
32namespace interop
33{
34class CpuStagedVideoOutput;
35class PacedFramePump;
36}
37
38class SCORE_PLUGIN_GFX_EXPORT DirectVideoOutputNode : public OutputNode
39{
40public:
41 explicit DirectVideoOutputNode(std::unique_ptr<DirectVideoOutputBackend> backend);
42 ~DirectVideoOutputNode() override;
43
44 // OutputNode interface
45 void setRenderer(std::shared_ptr<RenderList> r) override;
46 RenderList* renderer() const override;
47 OutputNodeRenderer* createRenderer(RenderList& r) const noexcept override;
48
49 void startRendering() override;
50 void render() override;
51 void stopRendering() override;
52 bool canRender() const override;
53 void onRendererChange() override;
54
55 void createOutput(OutputConfiguration conf) override;
56 void destroyOutput() override;
57 std::shared_ptr<RenderState> renderState() const override;
58 Configuration configuration() const noexcept override;
59
61 const char* activeStrategyName() const noexcept;
62
66 bool outputStrategyPinUnmet() const noexcept;
67
71 bool outputStrategyPinUnavailable() const noexcept;
72
76 std::function<bool()> genlockTickSource() const;
77
79 std::uint64_t pacingGoodXfers() const noexcept;
80 std::uint64_t pacingDrops() const noexcept;
81 std::uint64_t pacingUnderruns() const noexcept;
82
83protected:
84 std::unique_ptr<DirectVideoOutputBackend> m_backend;
85
86 std::shared_ptr<RenderState> m_renderState;
87 std::weak_ptr<RenderList> m_renderer;
88 QRhi* m_rhi{};
89 QRhiTexture* m_texture{};
90 QRhiTextureRenderTarget* m_renderTarget{};
91
92 std::unique_ptr<interop::CpuStagedVideoOutput> m_hostStaged;
93 std::unique_ptr<interop::VideoOutputStrategy> m_rdma;
94 std::unique_ptr<interop::PacedFramePump> m_pump;
95
99
100 std::atomic<bool> m_running{false};
101 GraphicsApi m_graphicsApi{};
102};
103
104} // namespace score::gfx
Vendor seam for professional capture-card OUTPUT (playout).
Runtime probe of which GPU interop mechanisms are available on this system.
Definition DirectVideoOutputNode.hpp:39
Base class for sink nodes (QWindow, spout, syphon, NDI output, ...)
Definition OutputNode.hpp:54
Definition OutputNode.hpp:36
List of nodes to be rendered to an output.
Definition RenderList.hpp:30
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
Definition OutputNode.hpp:15
Definition OutputNode.hpp:84
Definition GpuCapabilities.hpp:106