2 #include <Gfx/GfxDevice.hpp>
3 #include <Gfx/GfxExecContext.hpp>
4 #include <ossia/gfx/texture_parameter.hpp>
5 #include <ossia/network/base/device.hpp>
6 #include <ossia/network/base/protocol.hpp>
21 : protocol_base{flags{}}
25 bool pull(ossia::net::parameter_base&)
override {
return false; }
26 bool push(
const ossia::net::parameter_base&,
const ossia::value& v)
override
30 bool push_raw(
const ossia::net::full_parameter_data&)
override {
return false; }
31 bool observe(ossia::net::parameter_base&,
bool)
override {
return false; }
32 bool update(ossia::net::node_base& node_base)
override {
return false; }
34 void start_execution()
override { }
35 void stop_execution()
override { }
48 : ossia::gfx::texture_parameter{n}
52 node_id = context->ui->register_node(std::unique_ptr<score::gfx::Node>{gfx_n});
55 void pull_texture(ossia::gfx::port_index idx)
override
57 context->setEdge(port_index{this->node_id, 0}, idx);
61 context->ui->send_message(std::move(m));
70 ossia::net::device_base& m_device;
71 node_base* m_parent{};
72 std::unique_ptr<simple_texture_input_parameter> m_parameter;
80 std::make_unique<simple_texture_input_parameter>(gfx_n, context, *
this)}
82 m_name = std::move(name);
87 return m_parameter.get();
91 ossia::net::device_base& get_device()
const override {
return m_device; }
92 ossia::net::node_base* get_parent()
const override {
return m_parent; }
93 ossia::net::node_base& set_name(std::string)
override {
return *
this; }
94 ossia::net::parameter_base* create_parameter(ossia::val_type)
override
96 return m_parameter.get();
98 bool remove_parameter()
override {
return false; }
100 std::unique_ptr<ossia::net::node_base> make_child(
const std::string& name)
override
104 void removing_child(ossia::net::node_base& node_base)
override { }
114 std::unique_ptr<ossia::net::protocol_base> proto, std::string name)
115 : ossia::net::device_base{std::move(proto)}
116 , root{gfx_n, context, *
this, name}
125 :
public ossia::net::protocol_base
128 std::shared_ptr<::Video::ExternalInput> camera;
134 bool pull(ossia::net::parameter_base&)
override;
135 bool push(
const ossia::net::parameter_base&,
const ossia::value& v)
override;
136 bool push_raw(
const ossia::net::full_parameter_data&)
override;
137 bool observe(ossia::net::parameter_base&,
bool)
override;
138 bool update(ossia::net::node_base& node_base)
override;
140 void start_execution()
override;
141 void stop_execution()
override;
147 :
public ossia::gfx::texture_parameter
153 std::shared_ptr<::Video::ExternalInput> camera;
159 void pull_texture(ossia::gfx::port_index idx)
override;
167 ossia::net::device_base& m_device;
168 node_base* m_parent{};
169 std::unique_ptr<video_texture_input_parameter> m_parameter;
178 ossia::net::device_base& get_device()
const override;
179 ossia::net::node_base* get_parent()
const override;
180 ossia::net::node_base& set_name(std::string)
override;
181 ossia::net::parameter_base* create_parameter(ossia::val_type)
override;
182 bool remove_parameter()
override;
184 std::unique_ptr<ossia::net::node_base> make_child(
const std::string& name)
override;
185 void removing_child(ossia::net::node_base& node_base)
override;
194 std::unique_ptr<ossia::net::protocol_base> proto, std::string name)
195 : ossia::net::device_base{std::move(proto)}
Definition: GfxExecContext.hpp:16
Definition: GfxInputDevice.hpp:108
Definition: GfxInputDevice.hpp:69
Definition: GfxInputDevice.hpp:39
Definition: GfxInputDevice.hpp:18
Definition: GfxInputDevice.hpp:189
Definition: GfxInputDevice.hpp:166
Definition: GfxInputDevice.hpp:148
Definition: GfxInputDevice.hpp:126
Model for rendering a camera feed.
Definition: VideoNode.hpp:120
Root data model for visual nodes.
Definition: score-plugin-gfx/Gfx/Graph/Node.hpp:60
Binds the rendering pipeline to ossia processes.
Definition: CameraDevice.cpp:28
Graphics rendering pipeline for ossia score.
Definition: Filter/PreviewWidget.hpp:12
Definition: score-plugin-gfx/Gfx/Graph/Node.hpp:51