X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fvideo_ring_buffers.h;h=f3e521553168f938448b9a7436fad604b0d1ce59;hp=c7f789cb5d5efb96f68b982491b54296f884b427;hb=HEAD;hpb=090cd7dabd2f975e493a9bbd22754ee578d6a1b2 diff --git a/src/lib/video_ring_buffers.h b/src/lib/video_ring_buffers.h index c7f789cb5..1514e9bbd 100644 --- a/src/lib/video_ring_buffers.h +++ b/src/lib/video_ring_buffers.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2016-2020 Carl Hetherington + Copyright (C) 2016-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,12 +18,14 @@ */ + +#ifndef DCPOMATIC_VIDEO_RING_BUFFERS_H +#define DCPOMATIC_VIDEO_RING_BUFFERS_H + + #include "dcpomatic_time.h" #include "player_video.h" -#include "types.h" -#include #include -#include #include @@ -31,21 +33,29 @@ class Film; class PlayerVideo; -class VideoRingBuffers : public boost::noncopyable +class VideoRingBuffers { public: - void put (boost::shared_ptr frame, dcpomatic::DCPTime time); - std::pair, dcpomatic::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 (boost::shared_ptr film, dcp::Size player_video_container_size); + void reset_metadata (std::shared_ptr film, dcp::Size player_video_container_size); std::pair memory_used () const; private: mutable boost::mutex _mutex; - std::list, dcpomatic::DCPTime> > _data; + std::list, dcpomatic::DCPTime>> _data; }; + + +#endif