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
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
\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
{\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