remove(consumer->index());\r
}\r
\r
- void set_video_format_desc(const video_format_desc& format_desc)\r
+ void video_format_desc(const core::video_format_desc& format_desc)\r
{\r
executor_.invoke([&]\r
{\r
- boost::timer frame_timer;\r
+ if(format_desc_ == format_desc)\r
+ return;\r
\r
auto it = consumers_.begin();\r
while(it != consumers_.end())\r
\r
format_desc_ = format_desc;\r
frames_.clear();\r
-\r
- graph_->set_value("consume-time", frame_timer.elapsed()*format_desc.fps*0.5);\r
});\r
}\r
\r
return boost::range::count_if(consumers_ | boost::adaptors::map_values, [](const spl::shared_ptr<frame_consumer>& x){return x->has_synchronization_clock();}) > 0;\r
}\r
\r
- void operator()(spl::shared_ptr<const data_frame> input_frame, const video_format_desc& format_desc)\r
+ void operator()(spl::shared_ptr<const data_frame> input_frame, const core::video_format_desc& format_desc)\r
{\r
+ video_format_desc(format_desc);\r
+\r
executor_.invoke([=]\r
{ \r
+ boost::timer frame_timer;\r
+\r
if(!has_synchronization_clock())\r
sync_timer_.tick(1.0/format_desc_.fps);\r
\r
- if(format_desc_ != format_desc)\r
- set_video_format_desc(format_desc);\r
-\r
if(input_frame->image_data().size() != format_desc_.size)\r
{\r
sync_timer_.tick(1.0/format_desc_.fps);\r
consumers_.erase(it++);\r
}\r
}\r
+\r
+ graph_->set_value("consume-time", frame_timer.elapsed()*format_desc.fps*0.5);\r
});\r
}\r
\r
virtual ~frame_factory(){}\r
\r
virtual spl::shared_ptr<struct write_frame> create_frame(const void* video_stream_tag, const struct pixel_format_desc& desc) = 0; \r
- virtual struct video_format_desc get_video_format_desc() const = 0; // nothrow\r
+ virtual struct video_format_desc video_format_desc() const = 0; // nothrow\r
};\r
\r
}}
\ No newline at end of file
virtual std::wstring name() const override {return producer_->name();}\r
virtual boost::property_tree::wptree info() const override {return producer_->info();}\r
virtual boost::unique_future<std::wstring> call(const std::wstring& str) override {return producer_->call(str);}\r
- virtual spl::shared_ptr<frame_producer> get_following_producer() const override {return producer_->get_following_producer();}\r
- virtual void set_leading_producer(const spl::shared_ptr<frame_producer>& producer) override {return producer_->set_leading_producer(producer);}\r
+ virtual spl::shared_ptr<frame_producer> following_producer() const override {return producer_->following_producer();}\r
+ virtual void leading_producer(const spl::shared_ptr<frame_producer>& producer) override {return producer_->leading_producer(producer);}\r
virtual uint32_t nb_frames() const override {return producer_->nb_frames();}\r
virtual void subscribe(const monitor::observable::observer_ptr& o) {return producer_->subscribe(o);}\r
virtual void unsubscribe(const monitor::observable::observer_ptr& o) {return producer_->unsubscribe(o);}\r
if(frame == draw_frame::eof())\r
{\r
CASPAR_LOG(info) << producer_->print() << " End Of File.";\r
- auto following = producer_->get_following_producer();\r
+ auto following = producer_->following_producer();\r
if(following != frame_producer::empty())\r
{\r
- following->set_leading_producer(spl::make_shared_ptr(producer_));\r
+ following->leading_producer(spl::make_shared_ptr(producer_));\r
\r
producer_->unsubscribe(event_subject_);\r
producer_ = std::move(following);\r
\r
virtual boost::unique_future<std::wstring> call(const std::wstring&);\r
\r
- virtual spl::shared_ptr<frame_producer> get_following_producer() const {return frame_producer::empty();} // nothrow\r
- virtual void set_leading_producer(const spl::shared_ptr<frame_producer>&) {} // nothrow\r
+ virtual spl::shared_ptr<frame_producer> following_producer() const {return frame_producer::empty();} // nothrow\r
+ virtual void leading_producer(const spl::shared_ptr<frame_producer>&) {} // nothrow\r
\r
virtual uint32_t nb_frames() const {return std::numeric_limits<uint32_t>::max();}\r
\r
- virtual spl::shared_ptr<class draw_frame> receive(int flags) = 0;\r
+ virtual spl::shared_ptr<class draw_frame> receive(int fBlags) = 0;\r
virtual spl::shared_ptr<class draw_frame> last_frame() const = 0;\r
-\r
-\r
+ \r
static const spl::shared_ptr<frame_producer>& empty(); // nothrow\r
\r
// monitor::observable\r
{ \r
if(background_ != frame_producer::empty())\r
{\r
- background_->set_leading_producer(foreground_);\r
+ background_->leading_producer(foreground_);\r
\r
background_->unsubscribe(background_event_subject_);\r
foreground_->unsubscribe(foreground_event_subject_);\r
\r
// frame_producer\r
\r
- virtual spl::shared_ptr<frame_producer> get_following_producer() const override\r
+ virtual spl::shared_ptr<frame_producer> following_producer() const override\r
{\r
return dest_producer_;\r
}\r
\r
- virtual void set_leading_producer(const spl::shared_ptr<frame_producer>& producer) override\r
+ virtual void leading_producer(const spl::shared_ptr<frame_producer>& producer) override\r
{\r
source_producer_ = producer;\r
}\r
\r
virtual uint32_t nb_frames() const override\r
{\r
- return get_following_producer()->nb_frames();\r
+ return following_producer()->nb_frames();\r
}\r
\r
virtual std::wstring print() const override\r
const int index_;\r
\r
mutable tbb::spin_mutex format_desc_mutex_;\r
- video_format_desc format_desc_;\r
+ core::video_format_desc format_desc_;\r
\r
const spl::shared_ptr<diagnostics::graph> graph_;\r
\r
- const spl::shared_ptr<caspar::core::output> output_;\r
- const spl::shared_ptr<caspar::core::mixer> mixer_;\r
- const spl::shared_ptr<caspar::core::stage> stage_; \r
+ caspar::core::output output_;\r
+ caspar::core::mixer mixer_;\r
+ caspar::core::stage stage_; \r
\r
executor executor_;\r
public:\r
- impl(int index, const video_format_desc& format_desc, spl::shared_ptr<image_mixer> image_mixer) \r
+ impl(int index, const core::video_format_desc& format_desc, spl::shared_ptr<image_mixer> image_mixer) \r
: event_subject_(new monitor::subject(monitor::path() % "channel" % index))\r
, index_(index)\r
, format_desc_(format_desc)\r
- , output_(new caspar::core::output(graph_, format_desc, index))\r
- , mixer_(new caspar::core::mixer(graph_, std::move(image_mixer)))\r
- , stage_(new caspar::core::stage(graph_)) \r
+ , output_(graph_, format_desc, index)\r
+ , mixer_(graph_, std::move(image_mixer))\r
+ , stage_(graph_)\r
, executor_(L"video_channel")\r
{\r
graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f)); \r
graph_->set_text(print());\r
diagnostics::register_graph(graph_);\r
\r
- stage_->subscribe(event_subject_);\r
+ stage_.subscribe(event_subject_);\r
\r
executor_.begin_invoke([=]{tick();});\r
\r
\r
virtual spl::shared_ptr<write_frame> create_frame(const void* tag, const core::pixel_format_desc& desc) override\r
{ \r
- return mixer_->create_frame(tag, desc);\r
+ return mixer_.create_frame(tag, desc);\r
}\r
\r
- virtual core::video_format_desc get_video_format_desc() const override\r
+ virtual core::video_format_desc video_format_desc() const\r
{\r
return lock(format_desc_mutex_, [&]\r
{\r
}\r
\r
// video_channel\r
+ \r
+ void video_format_desc(const core::video_format_desc& format_desc)\r
+ {\r
+ lock(format_desc_mutex_, [&]\r
+ {\r
+ format_desc_ = format_desc;\r
+ });\r
+ }\r
\r
void tick()\r
{\r
try\r
{\r
- auto format_desc = get_video_format_desc();\r
+ auto format_desc = video_format_desc();\r
\r
boost::timer frame_timer;\r
\r
// Produce\r
\r
- auto stage_frames = (*stage_)(format_desc);\r
+ auto stage_frames = stage_(format_desc);\r
\r
// Mix\r
\r
- auto mixed_frame = (*mixer_)(std::move(stage_frames), format_desc);\r
+ auto mixed_frame = mixer_(std::move(stage_frames), format_desc);\r
\r
// Consume\r
\r
frame_subject_ << mixed_frame;\r
\r
- (*output_)(std::move(mixed_frame), format_desc);\r
+ output_(std::move(mixed_frame), format_desc);\r
\r
graph_->set_value("tick-time", frame_timer.elapsed()*format_desc.fps*0.5);\r
\r
\r
executor_.begin_invoke([=]{tick();});\r
}\r
-\r
- void set_video_format_desc(const video_format_desc& format_desc)\r
- {\r
- lock(format_desc_mutex_, [&]\r
- {\r
- format_desc_ = format_desc;\r
- });\r
- }\r
- \r
+ \r
std::wstring print() const\r
{\r
- return L"video_channel[" + boost::lexical_cast<std::wstring>(index_) + L"|" + get_video_format_desc().name + L"]";\r
+ return L"video_channel[" + boost::lexical_cast<std::wstring>(index_) + L"|" + video_format_desc().name + L"]";\r
}\r
\r
boost::property_tree::wptree info() const\r
{\r
boost::property_tree::wptree info;\r
\r
- auto stage_info = stage_->info();\r
- auto mixer_info = mixer_->info();\r
- auto output_info = output_->info();\r
+ auto stage_info = stage_.info();\r
+ auto mixer_info = mixer_.info();\r
+ auto output_info = output_.info();\r
\r
info.add(L"video-mode", format_desc_.name);\r
info.add_child(L"stage", stage_info.get());\r
}\r
};\r
\r
-video_channel::video_channel(int index, const video_format_desc& format_desc, spl::shared_ptr<image_mixer> image_mixer) : impl_(new impl(index, format_desc, image_mixer)){}\r
-spl::shared_ptr<stage> video_channel::stage() { return impl_->stage_;} \r
-spl::shared_ptr<mixer> video_channel::mixer() { return impl_->mixer_;} \r
+video_channel::video_channel(int index, const core::video_format_desc& format_desc, spl::shared_ptr<image_mixer> image_mixer) : impl_(new impl(index, format_desc, image_mixer)){}\r
+const stage& video_channel::stage() const { return impl_->stage_;} \r
+stage& video_channel::stage() { return impl_->stage_;} \r
+const mixer& video_channel::mixer() const{ return impl_->mixer_;} \r
+mixer& video_channel::mixer() { return impl_->mixer_;} \r
+const output& video_channel::output() const { return impl_->output_;} \r
+output& video_channel::output() { return impl_->output_;} \r
spl::shared_ptr<frame_factory> video_channel::frame_factory() { return impl_;} \r
-spl::shared_ptr<output> video_channel::output() { return impl_->output_;} \r
-video_format_desc video_channel::get_video_format_desc() const{return impl_->format_desc_;}\r
-void video_channel::set_video_format_desc(const video_format_desc& format_desc){impl_->set_video_format_desc(format_desc);}\r
+core::video_format_desc video_channel::video_format_desc() const{return impl_->video_format_desc();}\r
+void core::video_channel::video_format_desc(const core::video_format_desc& format_desc){impl_->video_format_desc(format_desc);}\r
boost::property_tree::wptree video_channel::info() const{return impl_->info();}\r
-void video_channel::subscribe(const frame_observer::observer_ptr& o) {impl_->frame_subject_.subscribe(o);}\r
-void video_channel::unsubscribe(const frame_observer::observer_ptr& o) {impl_->frame_subject_.unsubscribe(o);} \r
+void video_channel::subscribe(const frame_observable::observer_ptr& o) {impl_->frame_subject_.subscribe(o);}\r
+void video_channel::unsubscribe(const frame_observable::observer_ptr& o) {impl_->frame_subject_.unsubscribe(o);} \r
void video_channel::subscribe(const monitor::observable::observer_ptr& o) {impl_->event_subject_->subscribe(o);}\r
void video_channel::unsubscribe(const monitor::observable::observer_ptr& o) {impl_->event_subject_->unsubscribe(o);}\r
\r
#include <boost/property_tree/ptree_fwd.hpp>\r
\r
FORWARD3(caspar, core, ogl, class accelerator);\r
+FORWARD2(caspar, core, class stage);\r
+FORWARD2(caspar, core, class mixer);\r
+FORWARD2(caspar, core, class output);\r
+FORWARD2(caspar, core, struct image_mixer);\r
+FORWARD2(caspar, core, struct video_format_desc);\r
+FORWARD2(caspar, core, struct frame_factory);\r
\r
namespace caspar { namespace core {\r
\r
-typedef reactive::observable<spl::shared_ptr<const struct data_frame>> frame_observer;\r
+typedef reactive::observable<spl::shared_ptr<const struct data_frame>> frame_observable;\r
\r
-class video_channel sealed : public frame_observer\r
+class video_channel sealed : public frame_observable\r
, public monitor::observable\r
{\r
video_channel(const video_channel&);\r
video_channel& operator=(const video_channel&);\r
public:\r
- explicit video_channel(int index, const struct video_format_desc& format_desc, spl::shared_ptr<struct image_mixer> image_mixer);\r
-\r
- spl::shared_ptr<class stage> stage();\r
- spl::shared_ptr<class mixer> mixer();\r
- spl::shared_ptr<class output> output();\r
- spl::shared_ptr<struct frame_factory> frame_factory();\r
+ explicit video_channel(int index, const video_format_desc& format_desc, spl::shared_ptr<image_mixer> image_mixer);\r
\r
- struct video_format_desc get_video_format_desc() const;\r
- void set_video_format_desc(const struct video_format_desc& format_desc);\r
+ const core::stage& stage() const;\r
+ core::stage& stage();\r
+ const core::mixer& mixer() const;\r
+ core::mixer& mixer();\r
+ const core::output& output() const;\r
+ core::output& output();\r
+ \r
+ core::video_format_desc video_format_desc() const;\r
+ void video_format_desc(const core::video_format_desc& format_desc);\r
\r
+ spl::shared_ptr<core::frame_factory> frame_factory();\r
+\r
boost::property_tree::wptree info() const;\r
\r
// observable<spl::shared_ptr<const struct data_frame>>\r
\r
- virtual void subscribe(const frame_observer::observer_ptr& o) override;\r
- virtual void unsubscribe(const frame_observer::observer_ptr& o) override;\r
+ virtual void subscribe(const frame_observable::observer_ptr& o) override;\r
+ virtual void unsubscribe(const frame_observable::observer_ptr& o) override;\r
\r
// monitor::observable\r
\r
boost::replace_all(filter_str, L"DEINTERLACE_BOB", L"YADIF=1:-1");\r
\r
if(format_desc.format == core::video_format::invalid)\r
- format_desc = frame_factory->get_video_format_desc();\r
+ format_desc = frame_factory->video_format_desc();\r
\r
return core::wrap_producer(spl::make_shared<decklink_producer_proxy>(frame_factory, format_desc, device_index, filter_str, length));\r
}\r
explicit ffmpeg_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename, const std::wstring& filter, bool loop, uint32_t start, uint32_t length) \r
: filename_(filename)\r
, frame_factory_(frame_factory) \r
- , format_desc_(frame_factory->get_video_format_desc())\r
+ , format_desc_(frame_factory->video_format_desc())\r
, input_(graph_, filename_, loop, start, length)\r
, fps_(read_fps(*input_.context(), format_desc_.fps))\r
, start_(start)\r
\r
try\r
{\r
- audio_decoder_.reset(new audio_decoder(input_.context(), frame_factory->get_video_format_desc()));\r
+ audio_decoder_.reset(new audio_decoder(input_.context(), frame_factory->video_format_desc()));\r
CASPAR_LOG(info) << print() << L" " << audio_decoder_->print();\r
}\r
catch(averror_stream_not_found&)\r
impl(double in_fps, const spl::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filter_str)\r
: display_mode_(display_mode::invalid)\r
, in_fps_(in_fps)\r
- , format_desc_(frame_factory->get_video_format_desc())\r
+ , format_desc_(frame_factory->video_format_desc())\r
, auto_transcode_(env::properties().get(L"configuration.auto-transcode", true))\r
, auto_deinterlace_(env::properties().get(L"configuration.auto-deinterlace", true))\r
, audio_cadence_(format_desc_.audio_cadence)\r
\r
if(decoded_frame->height == 480) // NTSC DV\r
{\r
- write->get_frame_transform().fill_translation[1] += 2.0/static_cast<double>(frame_factory->get_video_format_desc().height);\r
- write->get_frame_transform().fill_scale[1] = 1.0 - 6.0*1.0/static_cast<double>(frame_factory->get_video_format_desc().height);\r
+ write->get_frame_transform().fill_translation[1] += 2.0/static_cast<double>(frame_factory->video_format_desc().height);\r
+ write->get_frame_transform().fill_scale[1] = 1.0 - 6.0*1.0/static_cast<double>(frame_factory->video_format_desc().height);\r
}\r
\r
// Fix field-order if needed\r
- if(get_mode(*decoded_frame) == core::field_mode::lower && frame_factory->get_video_format_desc().field_mode == core::field_mode::upper)\r
- write->get_frame_transform().fill_translation[1] += 1.0/static_cast<double>(frame_factory->get_video_format_desc().height);\r
- else if(get_mode(*decoded_frame) == core::field_mode::upper && frame_factory->get_video_format_desc().field_mode == core::field_mode::lower)\r
- write->get_frame_transform().fill_translation[1] -= 1.0/static_cast<double>(frame_factory->get_video_format_desc().height);\r
+ if(get_mode(*decoded_frame) == core::field_mode::lower && frame_factory->video_format_desc().field_mode == core::field_mode::upper)\r
+ write->get_frame_transform().fill_translation[1] += 1.0/static_cast<double>(frame_factory->video_format_desc().height);\r
+ else if(get_mode(*decoded_frame) == core::field_mode::upper && frame_factory->video_format_desc().field_mode == core::field_mode::lower)\r
+ write->get_frame_transform().fill_translation[1] -= 1.0/static_cast<double>(frame_factory->video_format_desc().height);\r
\r
return spl::make_shared_ptr(write);\r
}\r
\r
cg_proxy create_cg_proxy(const spl::shared_ptr<core::video_channel>& video_channel, int render_layer)\r
{ \r
- auto flash_producer = video_channel->stage()->foreground(render_layer).get();\r
+ auto flash_producer = video_channel->stage().foreground(render_layer).get();\r
\r
try\r
{\r
if(flash_producer->print().find(L"flash[") == std::string::npos) // UGLY hack\r
{\r
flash_producer = flash::create_producer(video_channel->frame_factory(), boost::assign::list_of<std::wstring>()); \r
- video_channel->stage()->load(render_layer, flash_producer); \r
- video_channel->stage()->play(render_layer);\r
+ video_channel->stage().load(render_layer, flash_producer); \r
+ video_channel->stage().play(render_layer);\r
}\r
}\r
catch(...)\r
flash_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename, int width, int height) \r
: filename_(filename) \r
, frame_factory_(frame_factory)\r
- , width_(width > 0 ? width : frame_factory->get_video_format_desc().width)\r
- , height_(height > 0 ? height : frame_factory->get_video_format_desc().height)\r
- , buffer_size_(env::properties().get(L"configuration.flash.buffer-depth", frame_factory_->get_video_format_desc().fps > 30.0 ? 4 : 2))\r
+ , width_(width > 0 ? width : frame_factory->video_format_desc().width)\r
+ , height_(height > 0 ? height : frame_factory->video_format_desc().height)\r
+ , buffer_size_(env::properties().get(L"configuration.flash.buffer-depth", frame_factory_->video_format_desc().fps > 30.0 ? 4 : 2))\r
, last_frame_(core::draw_frame::empty())\r
, executor_(L"flash_producer")\r
{ \r
\r
if(frame_buffer_.empty())\r
{\r
- auto format_desc = frame_factory_->get_video_format_desc();\r
+ auto format_desc = frame_factory_->video_format_desc();\r
\r
tick();\r
auto frame = render();\r
\r
spl::shared_ptr<core::frame_producer> create_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const std::vector<std::wstring>& params)\r
{\r
- auto template_host = get_template_host(frame_factory->get_video_format_desc());\r
+ auto template_host = get_template_host(frame_factory->video_format_desc());\r
\r
auto filename = env::template_folder() + L"\\" + template_host.filename;\r
\r
explicit image_scroll_producer(const spl::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filename, int speed) \r
: filename_(filename)\r
, delta_(0)\r
- , format_desc_(frame_factory->get_video_format_desc())\r
+ , format_desc_(frame_factory->video_format_desc())\r
, speed_(speed)\r
, last_frame_(core::draw_frame::empty())\r
{\r
\r
frame_number_++;\r
\r
- bool double_speed = std::abs(frame_factory_->get_video_format_desc().fps / 2.0 - read_frame->get_frame_rate()) < 0.01; \r
- bool half_speed = std::abs(read_frame->get_frame_rate() / 2.0 - frame_factory_->get_video_format_desc().fps) < 0.01;\r
+ bool double_speed = std::abs(frame_factory_->video_format_desc().fps / 2.0 - read_frame->get_frame_rate()) < 0.01; \r
+ bool half_speed = std::abs(read_frame->get_frame_rate() / 2.0 - frame_factory_->video_format_desc().fps) < 0.01;\r
\r
if(half_speed && frame_number_ % 2 == 0) // Skip frame\r
return receive(0);\r
\r
void AMCPCommand::Clear() \r
{\r
- pChannel_->stage()->clear();\r
+ pChannel_->stage().clear();\r
pClientInfo_.reset();\r
channelIndex_ = 0;\r
_parameters.clear();\r
params.push_back(L"Channel Grid Window");\r
auto screen = create_consumer(params);\r
\r
- self->output()->add(screen);\r
+ self->output().add(screen);\r
\r
BOOST_FOREACH(auto channel, GetChannels())\r
{\r
if(channel != self)\r
{\r
auto producer = reroute::create_producer(self->frame_factory(), *channel); \r
- self->stage()->load(index, producer, false);\r
- self->stage()->play(index);\r
+ self->stage().load(index, producer, false);\r
+ self->stage().play(index);\r
index++;\r
}\r
}\r
transform.clip_scale[1] = delta; \r
return transform;\r
};\r
- self->stage()->apply_transform(index, transform);\r
+ self->stage().apply_transform(index, transform);\r
}\r
}\r
\r
std::wstring param;\r
for(auto it = std::begin(_parameters2)+1; it != std::end(_parameters2); ++it, param += L" ")\r
param += *it;\r
- result = (what == L"F" ? GetChannel()->stage()->foreground(GetLayerIndex()) : GetChannel()->stage()->background(GetLayerIndex())).get()->call(boost::trim_copy(param));\r
+ result = (what == L"F" ? GetChannel()->stage().foreground(GetLayerIndex()) : GetChannel()->stage().background(GetLayerIndex())).get()->call(boost::trim_copy(param));\r
}\r
else\r
{\r
std::wstring param;\r
for(auto it = std::begin(_parameters2); it != std::end(_parameters2); ++it, param += L" ")\r
param += *it;\r
- result = GetChannel()->stage()->foreground(GetLayerIndex()).get()->call(boost::trim_copy(param));\r
+ result = GetChannel()->stage().foreground(GetLayerIndex()).get()->call(boost::trim_copy(param));\r
}\r
\r
if(!result.timed_wait(boost::posix_time::seconds(2)))\r
{\r
auto blend_str = _parameters.at(1); \r
int layer = GetLayerIndex();\r
- GetChannel()->mixer()->set_blend_mode(GetLayerIndex(), get_blend_mode(blend_str)); \r
+ GetChannel()->mixer().set_blend_mode(GetLayerIndex(), get_blend_mode(blend_str)); \r
}\r
else if(_parameters[0] == L"BRIGHTNESS")\r
{\r
{\r
int layer = GetLayerIndex(std::numeric_limits<int>::max());\r
if(layer == std::numeric_limits<int>::max())\r
- GetChannel()->stage()->clear_transforms();\r
+ GetChannel()->stage().clear_transforms();\r
else\r
- GetChannel()->stage()->clear_transforms(layer);\r
+ GetChannel()->stage().clear_transforms(layer);\r
}\r
else if(_parameters[0] == L"COMMIT")\r
{\r
defer_tranforms.insert(defer_tranforms.end(), transforms.begin(), transforms.end());\r
}\r
else\r
- GetChannel()->stage()->apply_transforms(transforms);\r
+ GetChannel()->stage().apply_transforms(transforms);\r
\r
SetReplyString(TEXT("202 MIXER OK\r\n"));\r
\r
int l1 = GetLayerIndex();\r
int l2 = boost::lexical_cast<int>(strs.at(1));\r
\r
- ch1->stage()->swap_layer(l1, l2, *ch2->stage());\r
+ ch1->stage().swap_layer(l1, l2, ch2->stage());\r
}\r
else\r
{\r
auto ch1 = GetChannel();\r
auto ch2 = GetChannels().at(boost::lexical_cast<int>(_parameters[0])-1);\r
- ch1->stage()->swap_layers(*ch2->stage());\r
+ ch1->stage().swap_layers(ch2->stage());\r
}\r
\r
SetReplyString(TEXT("202 SWAP OK\r\n"));\r
try\r
{\r
auto consumer = create_consumer(_parameters);\r
- GetChannel()->output()->add(GetLayerIndex(consumer->index()), consumer);\r
+ GetChannel()->output().add(GetLayerIndex(consumer->index()), consumer);\r
\r
SetReplyString(TEXT("202 ADD OK\r\n"));\r
\r
if(index == std::numeric_limits<int>::min())\r
index = create_consumer(_parameters)->index();\r
\r
- GetChannel()->output()->remove(index);\r
+ GetChannel()->output().remove(index);\r
\r
SetReplyString(TEXT("202 REMOVE OK\r\n"));\r
\r
{\r
_parameters[0] = _parameters[0];\r
auto pFP = create_producer(GetChannel()->frame_factory(), _parameters); \r
- GetChannel()->stage()->load(GetLayerIndex(), pFP, true);\r
+ GetChannel()->stage().load(GetLayerIndex(), pFP, true);\r
\r
SetReplyString(TEXT("202 LOAD OK\r\n"));\r
\r
\r
bool auto_play = std::find(_parameters.begin(), _parameters.end(), L"AUTO") != _parameters.end();\r
\r
- auto pFP2 = create_transition_producer(GetChannel()->get_video_format_desc().field_mode, pFP, transitionInfo);\r
+ auto pFP2 = create_transition_producer(GetChannel()->video_format_desc().field_mode, pFP, transitionInfo);\r
if(auto_play)\r
- GetChannel()->stage()->load(GetLayerIndex(), pFP2, transitionInfo.duration); // TODO: LOOP\r
+ GetChannel()->stage().load(GetLayerIndex(), pFP2, transitionInfo.duration); // TODO: LOOP\r
else\r
- GetChannel()->stage()->load(GetLayerIndex(), pFP2); // TODO: LOOP\r
+ GetChannel()->stage().load(GetLayerIndex(), pFP2); // TODO: LOOP\r
\r
SetReplyString(TEXT("202 LOADBG OK\r\n"));\r
\r
{\r
try\r
{\r
- GetChannel()->stage()->pause(GetLayerIndex());\r
+ GetChannel()->stage().pause(GetLayerIndex());\r
SetReplyString(TEXT("202 PAUSE OK\r\n"));\r
return true;\r
}\r
throw std::exception();\r
}\r
\r
- GetChannel()->stage()->play(GetLayerIndex());\r
+ GetChannel()->stage().play(GetLayerIndex());\r
\r
SetReplyString(TEXT("202 PLAY OK\r\n"));\r
return true;\r
{\r
try\r
{\r
- GetChannel()->stage()->stop(GetLayerIndex());\r
+ GetChannel()->stage().stop(GetLayerIndex());\r
SetReplyString(TEXT("202 STOP OK\r\n"));\r
return true;\r
}\r
{\r
int index = GetLayerIndex(std::numeric_limits<int>::min());\r
if(index != std::numeric_limits<int>::min())\r
- GetChannel()->stage()->clear(index);\r
+ GetChannel()->stage().clear(index);\r
else\r
- GetChannel()->stage()->clear();\r
+ GetChannel()->stage().clear();\r
\r
SetReplyString(TEXT("202 CLEAR OK\r\n"));\r
\r
\r
bool PrintCommand::DoExecute()\r
{\r
- GetChannel()->output()->add(create_consumer(boost::assign::list_of(L"IMAGE")));\r
+ GetChannel()->output().add(create_consumer(boost::assign::list_of(L"IMAGE")));\r
\r
SetReplyString(TEXT("202 PRINT OK\r\n"));\r
\r
\r
bool CGCommand::DoExecuteClear() \r
{\r
- GetChannel()->stage()->clear(GetLayerIndex(flash::cg_proxy::DEFAULT_LAYER));\r
+ GetChannel()->stage().clear(GetLayerIndex(flash::cg_proxy::DEFAULT_LAYER));\r
SetReplyString(TEXT("202 CG OK\r\n"));\r
return true;\r
}\r
\r
void GenerateChannelInfo(int index, const spl::shared_ptr<core::video_channel>& pChannel, std::wstringstream& replyString)\r
{\r
- replyString << index+1 << TEXT(" ") << pChannel->get_video_format_desc().name << TEXT(" PLAYING") << TEXT("\r\n");\r
+ replyString << index+1 << TEXT(" ") << pChannel->video_format_desc().name << TEXT(" PLAYING") << TEXT("\r\n");\r
}\r
\r
bool InfoCommand::DoExecute()\r
if(_parameters.size() >= 2)\r
{\r
if(_parameters[1] == L"B")\r
- info.add_child(L"producer", channels_.at(channel)->stage()->background(layer).get()->info());\r
+ info.add_child(L"producer", channels_.at(channel)->stage().background(layer).get()->info());\r
else\r
- info.add_child(L"producer", channels_.at(channel)->stage()->foreground(layer).get()->info());\r
+ info.add_child(L"producer", channels_.at(channel)->stage().foreground(layer).get()->info());\r
}\r
else\r
{\r
- info.add_child(L"layer", channels_.at(channel)->stage()->info(layer).get())\r
+ info.add_child(L"layer", channels_.at(channel)->stage().info(layer).get())\r
.add(L"index", layer);\r
}\r
}\r
auto format_desc = core::video_format_desc(value);\r
if(format_desc.format != core::video_format::invalid)\r
{\r
- GetChannel()->set_video_format_desc(format_desc);\r
+ GetChannel()->video_format_desc(format_desc);\r
SetReplyString(TEXT("202 SET MODE OK\r\n"));\r
}\r
else\r
std::wstring value = parameters[3];\r
std::transform(value.begin(), value.end(), value.begin(), toupper);\r
\r
- this->pCIIStrategy_->GetChannel()->set_video_format_desc(core::video_format_desc(value));\r
+ this->pCIIStrategy_->GetChannel()->video_format_desc(core::video_format_desc(value));\r
}\r
}\r
\r
else if(state_ == 1)\r
flash::create_cg_proxy(pCIIStrategy_->GetChannel()).stop(layer_, 0);\r
else if(state_ == 2)\r
- pCIIStrategy_->GetChannel()->stage()->clear(flash::cg_proxy::DEFAULT_LAYER);\r
+ pCIIStrategy_->GetChannel()->stage().clear(flash::cg_proxy::DEFAULT_LAYER);\r
else if(state_ == 3)\r
flash::create_cg_proxy(pCIIStrategy_->GetChannel()).play(layer_);\r
}\r
{\r
try\r
{\r
- pChannel_->stage()->load(0, GetPreparedTemplate(titleName));\r
- pChannel_->stage()->play(0);\r
+ pChannel_->stage().load(0, GetPreparedTemplate(titleName));\r
+ pChannel_->stage().play(0);\r
\r
CASPAR_LOG(info) << L"Displayed title " << titleName ;\r
}\r
transition.duration = 12;\r
\r
auto pFP = create_producer(GetChannel()->frame_factory(), filename);\r
- auto pTransition = create_transition_producer(GetChannel()->get_video_format_desc().field_mode, pFP, transition);\r
+ auto pTransition = create_transition_producer(GetChannel()->video_format_desc().field_mode, pFP, transition);\r
\r
try\r
{\r
- pChannel_->stage()->load(0, pTransition);\r
+ pChannel_->stage().load(0, pTransition);\r
}\r
catch(...)\r
{\r
return;\r
}\r
\r
- pChannel_->stage()->play(0);\r
+ pChannel_->stage().play(0);\r
\r
CASPAR_LOG(info) << L"Displayed " << filename;\r
}\r
\r
if(currentCommand_.command_ == CLKCommand::CLKReset) \r
{\r
- pChannel_->stage()->clear(flash::cg_proxy::DEFAULT_LAYER);\r
+ pChannel_->stage().clear(flash::cg_proxy::DEFAULT_LAYER);\r
bClockLoaded_ = false;\r
\r
CASPAR_LOG(info) << L"CLK: Recieved and executed reset-command";\r
<data-path>D:\casparcg\_data\</data-path>\r
<template-path>D:\casparcg\_templates\</template-path>\r
</paths>\r
- <accelerator>cpu</accelerator>\r
- <blend-modes>true</blend-modes>\r
<log-level>trace</log-level>\r
<channels>\r
<channel>\r
- <video-mode>PAL</video-mode>\r
+ <video-mode>720p5000</video-mode>\r
<consumers>\r
<screen>\r
<auto-deinterlace>false</auto-deinterlace>\r
{\r
auto name = xml_consumer.first;\r
if(name == L"screen")\r
- channel->output()->add(caspar::screen::create_consumer(xml_consumer.second)); \r
+ channel->output().add(caspar::screen::create_consumer(xml_consumer.second)); \r
else if(name == L"bluefish") \r
- channel->output()->add(bluefish::create_consumer(xml_consumer.second)); \r
+ channel->output().add(bluefish::create_consumer(xml_consumer.second)); \r
else if(name == L"decklink") \r
- channel->output()->add(decklink::create_consumer(xml_consumer.second)); \r
+ channel->output().add(decklink::create_consumer(xml_consumer.second)); \r
else if(name == L"file") \r
- channel->output()->add(ffmpeg::create_consumer(xml_consumer.second)); \r
+ channel->output().add(ffmpeg::create_consumer(xml_consumer.second)); \r
else if(name == L"system-audio")\r
- channel->output()->add(oal::create_consumer()); \r
+ channel->output().add(oal::create_consumer()); \r
else if(name != L"<xmlcomment>")\r
CASPAR_LOG(warning) << "Invalid consumer: " << name; \r
}\r