\r
class command_context\r
{\r
- bool clock_loaded_ = false;\r
- spl::shared_ptr<core::video_channel> channel_;\r
- spl::shared_ptr<core::cg_producer_registry> cg_registry_;\r
+ bool clock_loaded_ = false;\r
+ std::vector<spl::shared_ptr<core::video_channel>> channels_;\r
+ spl::shared_ptr<core::video_channel> channel_;\r
+ spl::shared_ptr<core::cg_producer_registry> cg_registry_;\r
+ spl::shared_ptr<const core::frame_producer_registry> producer_registry_;\r
public:\r
command_context(\r
+ const std::vector<spl::shared_ptr<core::video_channel>>& channels,\r
const spl::shared_ptr<core::video_channel>& channel,\r
- const spl::shared_ptr<core::cg_producer_registry>& cg_registry)\r
- : channel_(channel)\r
+ const spl::shared_ptr<core::cg_producer_registry>& cg_registry,\r
+ const spl::shared_ptr<const core::frame_producer_registry>& producer_registry)\r
+ : channels_(channels)\r
+ , channel_(channel)\r
, cg_registry_(cg_registry)\r
+ , producer_registry_(producer_registry)\r
{\r
}\r
\r
{\r
if (!clock_loaded_) \r
{\r
- cg_registry_->get_or_create_proxy(channel_, core::cg_proxy::DEFAULT_LAYER, L"hawrysklocka/clock")->add(\r
- 0, L"hawrysklocka/clock", true, L"", data);\r
+ core::frame_producer_dependencies dependencies(channel_->frame_factory(), channels_, channel_->video_format_desc(), producer_registry_);\r
+ cg_registry_->get_or_create_proxy(channel_, dependencies, core::cg_proxy::DEFAULT_LAYER, L"hawrysklocka/clock")->add(\r
+ 0, L"hawrysklocka/clock", true, L"", data);\r
clock_loaded_ = true;\r
}\r
else\r
cg_registry_->get_proxy(channel_, core::cg_proxy::DEFAULT_LAYER)->update(0, data);\r
}\r
\r
- CASPAR_LOG(debug) << L"CLK: Clockdata sent: " << data;\r
+ CASPAR_LOG(info) << L"CLK: Clockdata sent: " << data;\r
}\r
\r
void reset()\r
}\r
\r
void add_command_handlers(\r
- clk_command_processor& processor, \r
+ clk_command_processor& processor,\r
+ const std::vector<spl::shared_ptr<core::video_channel>>& channels,\r
const spl::shared_ptr<core::video_channel>& channel,\r
- const spl::shared_ptr<core::cg_producer_registry>& cg_registry)\r
+ const spl::shared_ptr<core::cg_producer_registry>& cg_registry,\r
+ const spl::shared_ptr<const core::frame_producer_registry>& producer_registry)\r
{\r
- auto context = spl::make_shared<command_context>(channel, cg_registry);\r
+ auto context = spl::make_shared<command_context>(channels, channel, cg_registry, producer_registry);\r
\r
processor\r
.add_handler(L"DUR", \r