diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-03-08 00:11:50 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-04-19 23:04:32 +0100 |
| commit | 90c782a16c26fa8bfded51cad2bc7bbc14d8f986 (patch) | |
| tree | b5057fffa855312fa6c82f8c27a077c021d9afaf /src/lib/video_ring_buffers.cc | |
| parent | 4f9cb03792e85cbb5b4d554ab8ec0a3275fa7524 (diff) | |
Seemingly basically working butler for video.
Diffstat (limited to 'src/lib/video_ring_buffers.cc')
| -rw-r--r-- | src/lib/video_ring_buffers.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/video_ring_buffers.cc b/src/lib/video_ring_buffers.cc index 254285456..e81605732 100644 --- a/src/lib/video_ring_buffers.cc +++ b/src/lib/video_ring_buffers.cc @@ -60,6 +60,13 @@ VideoRingBuffers::size () const return _data.size (); } +bool +VideoRingBuffers::empty () const +{ + boost::mutex::scoped_lock lm (_mutex); + return _data.empty (); +} + void VideoRingBuffers::clear () { @@ -68,12 +75,12 @@ VideoRingBuffers::clear () } optional<DCPTime> -VideoRingBuffers::latest () const +VideoRingBuffers::earliest () const { boost::mutex::scoped_lock lm (_mutex); if (_data.empty ()) { return optional<DCPTime> (); } - return _data.back().second; + return _data.front().second; } |
