X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fconsumer%2Fport.cpp;h=c168c846573c2f8e0ad51f96ea73ad13e61b82ff;hb=b0a6986ce56a18a56e67be266d6d253af7cdcbb5;hp=9ed7aae68a8415f355fa43b0a4be846574d32002;hpb=3d107888724a3b3dd1bbadcccd3ccfb3d94b3cb2;p=casparcg diff --git a/core/consumer/port.cpp b/core/consumer/port.cpp index 9ed7aae68..c168c8465 100644 --- a/core/consumer/port.cpp +++ b/core/consumer/port.cpp @@ -10,18 +10,19 @@ namespace caspar { namespace core { struct port::impl { - monitor::subject monitor_subject_; + spl::shared_ptr monitor_subject_; std::shared_ptr consumer_; int index_; int channel_index_; public: impl(int index, int channel_index, spl::shared_ptr consumer) - : monitor_subject_("/port" + boost::lexical_cast(index)) + : monitor_subject_(spl::make_shared( + "/port" + boost::lexical_cast(index))) , consumer_(std::move(consumer)) , index_(index) , channel_index_(channel_index) { - consumer_->monitor_output().link_target(&monitor_subject_); + consumer_->monitor_output().attach_parent(monitor_subject_); } void video_format_desc(const struct video_format_desc& format_desc) @@ -31,7 +32,7 @@ public: boost::unique_future send(const_frame frame) { - monitor_subject_ << monitor::message("/type") % consumer_->name(); + *monitor_subject_ << monitor::message("/type") % consumer_->name(); return consumer_->send(std::move(frame)); } std::wstring print() const @@ -65,7 +66,7 @@ port::port(port&& other) : impl_(std::move(other.impl_)){} port::~port(){} port& port::operator=(port&& other){impl_ = std::move(other.impl_); return *this;} boost::unique_future port::send(const_frame frame){return impl_->send(std::move(frame));} -monitor::source& port::monitor_output() {return impl_->monitor_subject_;} +monitor::subject& port::monitor_output() {return *impl_->monitor_subject_;} void port::video_format_desc(const struct video_format_desc& format_desc){impl_->video_format_desc(format_desc);} int port::buffer_depth() const{return impl_->buffer_depth();} std::wstring port::print() const{ return impl_->print();}