Assorted C++11/formatting cleanups.
[dcpomatic.git] / src / lib / encoder.h
index f4116c50c5888172dc3191e79562979fa7178054..1403e75b2d4f7691d6da67c69d7472b24e96d94a 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "types.h"
 #include "player_text.h"
-#include <boost/weak_ptr.hpp>
 #include <boost/signals2.hpp>
 
 class Film;
@@ -33,25 +32,33 @@ class Job;
 class PlayerVideo;
 class AudioBuffers;
 
-/** @class Encoder */
-class Encoder : public boost::noncopyable
+/** @class Encoder
+ *  @brief Parent class for something that can encode a film into some format
+ */
+class Encoder
 {
 public:
-       Encoder (boost::shared_ptr<const Film> film, boost::weak_ptr<Job> job);
+       Encoder (std::shared_ptr<const Film> film, std::weak_ptr<Job> job);
        virtual ~Encoder () {}
 
+       Encoder (Encoder const&) = delete;
+       Encoder& operator= (Encoder const&) = delete;
+
        virtual void go () = 0;
 
        /** @return the current frame rate over the last short while */
-       virtual float current_rate () const = 0;
+       virtual boost::optional<float> current_rate () const {
+               return boost::optional<float>();
+       }
+
        /** @return the number of frames that are done */
        virtual Frame frames_done () const = 0;
        virtual bool finishing () const = 0;
 
 protected:
-       boost::shared_ptr<const Film> _film;
-       boost::weak_ptr<Job> _job;
-       boost::shared_ptr<Player> _player;
+       std::shared_ptr<const Film> _film;
+       std::weak_ptr<Job> _job;
+       std::shared_ptr<Player> _player;
 };
 
 #endif