X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fflash%2Fproducer%2Fflash_producer.cpp;h=c14158d2b21ebc2dd83b4a9db5bfeb62c39b5da1;hb=refs%2Ftags%2F2.0.0.2;hp=67a556423fc72cae525bf742bed4f0ed157facf0;hpb=01d8a61541548cf535791be39d233799eefc4187;p=casparcg diff --git a/modules/flash/producer/flash_producer.cpp b/modules/flash/producer/flash_producer.cpp index 67a556423..c14158d2b 100644 --- a/modules/flash/producer/flash_producer.cpp +++ b/modules/flash/producer/flash_producer.cpp @@ -278,7 +278,7 @@ struct flash_producer : public core::frame_producer tbb::atomic fps_; - std::shared_ptr graph_; + safe_ptr graph_; tbb::concurrent_bounded_queue> frame_buffer_; @@ -303,9 +303,10 @@ public: fps_ = 0; - graph_ = diagnostics::create_graph(narrow(print())); graph_->set_color("output-buffer-count", diagnostics::color(1.0f, 1.0f, 0.0f)); graph_->set_color("underflow", diagnostics::color(0.6f, 0.3f, 0.9f)); + graph_->set_text(print()); + diagnostics::register_graph(graph_); frame_buffer_.set_capacity(frame_factory_->get_video_format_desc().fps > 30.0 ? 2 : 1); @@ -419,7 +420,7 @@ public: graph_->set_value("output-buffer-count", static_cast(frame_buffer_.size())/static_cast(frame_buffer_.capacity())); fps_.fetch_and_store(static_cast(context_->fps()*100.0)); - graph_->update_text(narrow(print())); + graph_->set_text(narrow(print())); render(renderer); }