return head_;\r
}\r
\r
+ bool is_empty() const\r
+ {\r
+ return ax_->IsEmpty();\r
+ }\r
+\r
double fps() const\r
{\r
return ax_->GetFPS(); \r
graph_->set_value("output-buffer-count", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity()));\r
\r
auto frame = core::basic_frame::late();\r
- if(!frame_buffer_.try_pop(frame))\r
+ if(!frame_buffer_.try_pop(frame) && context_)\r
graph_->add_tag("underflow");\r
\r
return frame;\r
frame_buffer_.push(frame);\r
}\r
\r
+ if(context_->is_empty())\r
+ {\r
+ context_.reset(nullptr);\r
+ return;\r
+ }\r
+\r
graph_->set_value("output-buffer-count", static_cast<float>(frame_buffer_.size())/static_cast<float>(frame_buffer_.capacity())); \r
fps_.fetch_and_store(static_cast<int>(context_->fps()*100.0)); \r
graph_->update_text(narrow(print()));\r