]> 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 d4abdfa526204955e90d243f4dbd97fa3ee2efc5..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
@@ -319,7 +320,7 @@ public:
 \r
                        std::shared_ptr<core::read_frame> frame;        \r
                        video_frame_buffer_.pop(frame);                                 \r
-                       schedule_next_video(make_safe(frame));  \r
+                       schedule_next_video(make_safe_ptr(frame));      \r
                }\r
                catch(...)\r
                {\r
@@ -352,7 +353,7 @@ public:
                        {\r
                                std::shared_ptr<core::read_frame> frame;\r
                                audio_frame_buffer_.pop(frame);\r
-                               schedule_next_audio(make_safe(frame));  \r
+                               schedule_next_audio(make_safe_ptr(frame));      \r
                        }\r
                }\r
                catch(...)\r