X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fencoder.h;h=19c1120b360f789fd8af1ef76ccf85a97e494337;hp=792029a9164f0ea4ce30054af0496501e113ea49;hb=HEAD;hpb=2cdf3d9f461b12d0925cc54368105bbd177bbbb3 diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 792029a91..9b67720d3 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.h" #include "player_text.h" -#include #include + 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 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 boost::optional current_rate () const { - return boost::optional(); + return {}; } /** @return the number of frames that are done */ @@ -52,9 +60,10 @@ public: 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; + Player _player; }; + #endif