Use dcp::file_to_string().
[dcpomatic.git] / src / lib / encoder.h
index 792029a9164f0ea4ce30054af0496501e113ea49..19c1120b360f789fd8af1ef76ccf85a97e494337 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #ifndef DCPOMATIC_ENCODER_H
 #define DCPOMATIC_ENCODER_H
 
-#include "types.h"
+
 #include "player_text.h"
-#include <boost/weak_ptr.hpp>
+#include "types.h"
 #include <boost/signals2.hpp>
 
+
 class Film;
 class Encoder;
 class Player;
@@ -33,18 +35,24 @@ 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 boost::optional<float> current_rate () const {
-               return boost::optional<float>();
+               return {};
        }
 
        /** @return the number of frames that are done */
@@ -52,9 +60,10 @@ public:
        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