Add VideoRingBuffers::reset_metadata().
authorCarl Hetherington <cth@carlh.net>
Tue, 1 Dec 2020 10:32:11 +0000 (11:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 1 Dec 2020 10:32:11 +0000 (11:32 +0100)
src/lib/video_ring_buffers.cc
src/lib/video_ring_buffers.h

index e0e1b052c3f6832edbc3e424f583223b4df3b584..24d904e7e48013b79618754c6761e62de781a2ff 100644 (file)
@@ -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);
+       }
+}
+
index ba1b2162f952218feccb8ee1c30b9c1d033d7a96..c7f789cb5d5efb96f68b982491b54296f884b427 100644 (file)
@@ -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.
 
 #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: