std::shared_ptr
[dcpomatic.git] / src / lib / encoder.h
index 79ad0ab4427b7cf6eb98c3fa7d797aade01be38b..78c1f99088b46aae6506c561912647938143ed01 100644 (file)
@@ -22,8 +22,8 @@
 #define DCPOMATIC_ENCODER_H
 
 #include "types.h"
-#include "player_subtitles.h"
-#include <boost/weak_ptr.hpp>
+#include "player_text.h"
+#include <boost/signals2.hpp>
 
 class Film;
 class Encoder;
@@ -36,25 +36,24 @@ class AudioBuffers;
 class Encoder : public boost::noncopyable
 {
 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 () {}
 
        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:
-       virtual void video (boost::shared_ptr<PlayerVideo>, DCPTime) = 0;
-       virtual void audio (boost::shared_ptr<AudioBuffers>, DCPTime) = 0;
-       virtual void subtitle (PlayerSubtitles, DCPTimePeriod) = 0;
-
-       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