X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fencoder.h;h=19c1120b360f789fd8af1ef76ccf85a97e494337;hp=27fa0745f928b36ace4196d737ec0bede71fdf8d;hb=da44da6f31f97d39ca91c35955e573e76371f2c2;hpb=9cb73fbc0fa4643612f01665bc6d9fc430656f32 diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 27fa0745f..19c1120b3 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2017 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,14 +18,16 @@ */ + #ifndef DCPOMATIC_ENCODER_H #define DCPOMATIC_ENCODER_H + +#include "player_text.h" #include "types.h" -#include "player_caption.h" -#include #include + class Film; class Encoder; class Player; @@ -33,25 +35,35 @@ 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 film, boost::weak_ptr job); + Encoder (std::shared_ptr film, std::weak_ptr 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 current_rate () const { + return {}; + } + /** @return the number of frames that are done */ virtual Frame frames_done () const = 0; virtual bool finishing () const = 0; protected: - boost::shared_ptr _film; - boost::weak_ptr _job; - boost::shared_ptr _player; + std::shared_ptr _film; + std::weak_ptr _job; + std::shared_ptr _player; }; + #endif