White space: video_ring_buffers.{cc,h}
authorCarl Hetherington <cth@carlh.net>
Fri, 9 May 2025 23:50:18 +0000 (01:50 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 9 May 2025 23:50:18 +0000 (01:50 +0200)
src/lib/video_ring_buffers.cc
src/lib/video_ring_buffers.h

index 63c52ee068879c0b262268ca94589b8c80928781..5f355c1ab9daa3f6ebe631b22018a4882a3847fc 100644 (file)
@@ -37,54 +37,54 @@ using namespace dcpomatic;
 
 
 void
-VideoRingBuffers::put (shared_ptr<PlayerVideo> frame, DCPTime time)
+VideoRingBuffers::put(shared_ptr<PlayerVideo> frame, DCPTime time)
 {
-       boost::mutex::scoped_lock lm (_mutex);
-       _data.push_back (make_pair(frame, time));
+       boost::mutex::scoped_lock lm(_mutex);
+       _data.push_back(make_pair(frame, time));
 }
 
 
 pair<shared_ptr<PlayerVideo>, DCPTime>
-VideoRingBuffers::get ()
+VideoRingBuffers::get()
 {
-       boost::mutex::scoped_lock lm (_mutex);
-       if (_data.empty ()) {
+       boost::mutex::scoped_lock lm(_mutex);
+       if (_data.empty()) {
                return {};
        }
        auto const r = _data.front();
-       _data.pop_front ();
+       _data.pop_front();
        return r;
 }
 
 
 Frame
-VideoRingBuffers::size () const
+VideoRingBuffers::size() const
 {
-       boost::mutex::scoped_lock lm (_mutex);
-       return _data.size ();
+       boost::mutex::scoped_lock lm(_mutex);
+       return _data.size();
 }
 
 
 bool
-VideoRingBuffers::empty () const
+VideoRingBuffers::empty() const
 {
-       boost::mutex::scoped_lock lm (_mutex);
-       return _data.empty ();
+       boost::mutex::scoped_lock lm(_mutex);
+       return _data.empty();
 }
 
 
 void
-VideoRingBuffers::clear ()
+VideoRingBuffers::clear()
 {
-       boost::mutex::scoped_lock lm (_mutex);
-       _data.clear ();
+       boost::mutex::scoped_lock lm(_mutex);
+       _data.clear();
 }
 
 
 pair<size_t, string>
-VideoRingBuffers::memory_used () const
+VideoRingBuffers::memory_used() const
 {
-       boost::mutex::scoped_lock lm (_mutex);
+       boost::mutex::scoped_lock lm(_mutex);
        size_t m = 0;
        for (auto const& i: _data) {
                m += i.first->memory_used();
@@ -94,11 +94,11 @@ VideoRingBuffers::memory_used () const
 
 
 void
-VideoRingBuffers::reset_metadata (shared_ptr<const Film> film, dcp::Size player_video_container_size)
+VideoRingBuffers::reset_metadata(shared_ptr<const Film> film, dcp::Size player_video_container_size)
 {
-       boost::mutex::scoped_lock lm (_mutex);
+       boost::mutex::scoped_lock lm(_mutex);
        for (auto const& i: _data) {
-               i.first->reset_metadata (film, player_video_container_size);
+               i.first->reset_metadata(film, player_video_container_size);
        }
 }
 
index 1514e9bbd2e23e58a7c9b4989abca99e0706a6c6..1f372c15a8edbe126bfd0c0ee3cce6d820d46522 100644 (file)
@@ -36,21 +36,21 @@ class PlayerVideo;
 class VideoRingBuffers
 {
 public:
-       VideoRingBuffers () {}
+       VideoRingBuffers() {}
 
-       VideoRingBuffers (VideoRingBuffers const&) = delete;
-       VideoRingBuffers& operator= (VideoRingBuffers const&) = delete;
+       VideoRingBuffers(VideoRingBuffers const&) = delete;
+       VideoRingBuffers& operator=(VideoRingBuffers const&) = delete;
 
-       void put (std::shared_ptr<PlayerVideo> frame, dcpomatic::DCPTime time);
-       std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get ();
+       void put(std::shared_ptr<PlayerVideo> frame, dcpomatic::DCPTime time);
+       std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get();
 
-       void clear ();
-       Frame size () const;
-       bool empty () const;
+       void clear();
+       Frame size() const;
+       bool empty() const;
 
-       void reset_metadata (std::shared_ptr<const Film> film, dcp::Size player_video_container_size);
+       void reset_metadata(std::shared_ptr<const Film> film, dcp::Size player_video_container_size);
 
-       std::pair<size_t, std::string> memory_used () const;
+       std::pair<size_t, std::string> memory_used() const;
 
 private:
        mutable boost::mutex _mutex;