diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-11-30 21:17:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-11-30 21:17:22 +0100 |
| commit | b62cc4a8ced62d0d23da5a66494236be2822be79 (patch) | |
| tree | f3fe5f9c364fb4a22b682c243c075ba19e76ec22 /src/lib/event_history.cc | |
| parent | 7c839a2530c910f062f3da8a02b7c70603c1f31b (diff) | |
Don't say we're encoding at 0fps when we're waiting for the timing history to stablise.
Diffstat (limited to 'src/lib/event_history.cc')
| -rw-r--r-- | src/lib/event_history.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/event_history.cc b/src/lib/event_history.cc index eb3438aab..efe80b243 100644 --- a/src/lib/event_history.cc +++ b/src/lib/event_history.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2017-2019 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -22,18 +22,20 @@ #include "util.h" #include <boost/thread/mutex.hpp> +using boost::optional; + EventHistory::EventHistory (int size) : _size (size) { } -float +optional<float> EventHistory::rate () const { boost::mutex::scoped_lock lock (_mutex); if (int (_history.size()) < _size) { - return 0; + return optional<float>(); } struct timeval now; |
