mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Adding a timestamp to Session instanciation
Used to compute runtime of a session
This commit is contained in:
@@ -59,6 +59,7 @@ Session::Session() : active_(true), filename_(""), failedSource_(nullptr), fadin
|
||||
config_[View::TEXTURE]->translation_ = Settings::application.views[View::TEXTURE].default_translation;
|
||||
|
||||
snapshots_.xmlDoc_ = new tinyxml2::XMLDocument;
|
||||
start_time_ = gst_util_get_timestamp ();
|
||||
}
|
||||
|
||||
|
||||
@@ -87,6 +88,11 @@ Session::~Session()
|
||||
delete snapshots_.xmlDoc_;
|
||||
}
|
||||
|
||||
uint64_t Session::runtime() const
|
||||
{
|
||||
return gst_util_get_timestamp () - start_time_;
|
||||
}
|
||||
|
||||
void Session::setActive (bool on)
|
||||
{
|
||||
if (active_ != on) {
|
||||
|
||||
Reference in New Issue
Block a user