diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-01 11:32:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-01 11:32:11 +0100 |
| commit | 090cd7dabd2f975e493a9bbd22754ee578d6a1b2 (patch) | |
| tree | 1d1e3165157d70102aef5ed8eee60292f4fd0c55 /src/lib | |
| parent | 66b2dc980b68100c139d6cadfdcffa68b1a16069 (diff) | |
Add VideoRingBuffers::reset_metadata().
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/video_ring_buffers.cc | 13 | ||||
| -rw-r--r-- | src/lib/video_ring_buffers.h | 7 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/video_ring_buffers.cc b/src/lib/video_ring_buffers.cc index e0e1b052c..24d904e7e 100644 --- a/src/lib/video_ring_buffers.cc +++ b/src/lib/video_ring_buffers.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016-2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2016-2020 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -84,3 +84,14 @@ VideoRingBuffers::memory_used () const } return make_pair(m, String::compose("%1 frames", _data.size())); } + + +void +VideoRingBuffers::reset_metadata (shared_ptr<const Film> film, dcp::Size player_video_container_size) +{ + boost::mutex::scoped_lock lm (_mutex); + for (list<pair<shared_ptr<PlayerVideo>, DCPTime> >::const_iterator i = _data.begin(); i != _data.end(); ++i) { + i->first->reset_metadata (film, player_video_container_size); + } +} + diff --git a/src/lib/video_ring_buffers.h b/src/lib/video_ring_buffers.h index ba1b2162f..c7f789cb5 100644 --- a/src/lib/video_ring_buffers.h +++ b/src/lib/video_ring_buffers.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2016-2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2016-2020 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -26,8 +26,11 @@ #include <boost/shared_ptr.hpp> #include <utility> + +class Film; class PlayerVideo; + class VideoRingBuffers : public boost::noncopyable { public: @@ -38,6 +41,8 @@ public: Frame size () const; bool empty () const; + void reset_metadata (boost::shared_ptr<const Film> film, dcp::Size player_video_container_size); + std::pair<size_t, std::string> memory_used () const; private: |
