boost::filesystem2::remove(boost::filesystem2::wpath(env::media_folder() + widen(filename))); // Delete the file if it exists\r
\r
graph_->set_color("frame-time", diagnostics::color(0.1f, 1.0f, 0.1f));\r
+ graph_->set_color("dropped-frame", diagnostics::color(0.3f, 0.6f, 0.3f));\r
graph_->set_text(print());\r
diagnostics::register_graph(graph_);\r
\r
\r
void send(const safe_ptr<core::read_frame>& frame)\r
{\r
- encode_executor_.begin_invoke([=]\r
+ bool queued = encode_executor_.try_begin_invoke([=]\r
{ \r
boost::timer frame_timer;\r
\r
\r
graph_->set_value("frame-time", frame_timer.elapsed()*format_desc_.fps*0.5); \r
});\r
+\r
+ if (!queued)\r
+ graph_->set_tag("dropped-frame");\r
+\r
+ // TODO: adjust PTS accordingly to make dropped frames contribute\r
+ // to the total playing time\r
}\r
};\r
\r