X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fencoder.h;h=19c1120b360f789fd8af1ef76ccf85a97e494337;hb=ff639b3cf30afcc097bfd21d39c8d15f466cadd6;hp=f4116c50c5888172dc3191e79562979fa7178054;hpb=ae95d9cab28e414245e15ddeae20e96735594a8b;p=dcpomatic.git diff --git a/src/lib/encoder.h b/src/lib/encoder.h index f4116c50c..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 "types.h" + #include "player_text.h" -#include +#include "types.h" #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