X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_ring_buffers.h;h=47fda01f7fd7b9c503a84d6cffc7c2dde60b15a3;hb=6cac49dc50dae6b173135df101d532f20031ca70;hp=f728247fe8aa5213ec4fd72a1b2729922cbff0ce;hpb=4f9cb03792e85cbb5b4d554ab8ec0a3275fa7524;p=dcpomatic.git diff --git a/src/lib/video_ring_buffers.h b/src/lib/video_ring_buffers.h index f728247fe..47fda01f7 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 + Copyright (C) 2016-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,28 +18,38 @@ */ + #include "dcpomatic_time.h" #include "player_video.h" #include "types.h" -#include #include -#include #include + +class Film; class PlayerVideo; -class VideoRingBuffers : public boost::noncopyable + +class VideoRingBuffers { public: - void put (boost::shared_ptr frame, DCPTime time); - std::pair, DCPTime> get (); + VideoRingBuffers () {} + + VideoRingBuffers (VideoRingBuffers const&) = delete; + VideoRingBuffers& operator= (VideoRingBuffers const&) = delete; + + void put (std::shared_ptr frame, dcpomatic::DCPTime time); + std::pair, dcpomatic::DCPTime> get (); void clear (); Frame size () const; + bool empty () const; + + void reset_metadata (std::shared_ptr film, dcp::Size player_video_container_size); - boost::optional latest () const; + std::pair memory_used () const; private: mutable boost::mutex _mutex; - std::list, DCPTime> > _data; + std::list, dcpomatic::DCPTime>> _data; };