]> git.sesse.net Git - casparcg/blobdiff - modules/decklink/consumer/decklink_consumer.cpp
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / modules / decklink / consumer / decklink_consumer.cpp
index dcfbde7f3afcf5dde5bcbe44f6d99e5574b275b8..e9c4227b1d765410eb93760e3cfdb7ee1cfbcbff 100644 (file)
@@ -156,7 +156,7 @@ struct decklink_consumer : public IDeckLinkVideoOutputCallback, public IDeckLink
        tbb::concurrent_bounded_queue<std::shared_ptr<core::read_frame>> video_frame_buffer_;\r
        tbb::concurrent_bounded_queue<std::shared_ptr<core::read_frame>> audio_frame_buffer_;\r
        \r
-       std::shared_ptr<diagnostics::graph> graph_;\r
+       safe_ptr<diagnostics::graph> graph_;\r
        boost::timer tick_timer_;\r
 \r
 public:\r
@@ -179,12 +179,13 @@ public:
                video_frame_buffer_.set_capacity(1);\r
                audio_frame_buffer_.set_capacity(1);\r
 \r
-               graph_ = diagnostics::create_graph(narrow(print()));\r
                graph_->add_guide("tick-time", 0.5);\r
                graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f));   \r
                graph_->set_color("late-frame", diagnostics::color(0.6f, 0.3f, 0.3f));\r
                graph_->set_color("dropped-frame", diagnostics::color(0.3f, 0.6f, 0.3f));\r
                graph_->set_color("flushed-frame", diagnostics::color(0.4f, 0.3f, 0.8f));\r
+               graph_->set_text(print());\r
+               diagnostics::register_graph(graph_);\r
                \r
                enable_video(get_display_mode(output_, format_desc_.format, bmdFormat8BitBGRA, bmdVideoOutputFlagDefault));\r
                                \r