X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fencoder.h;h=19c1120b360f789fd8af1ef76ccf85a97e494337;hp=78c1f99088b46aae6506c561912647938143ed01;hb=da44da6f31f97d39ca91c35955e573e76371f2c2;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 78c1f9908..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,13 +18,16 @@ */ + #ifndef DCPOMATIC_ENCODER_H #define DCPOMATIC_ENCODER_H -#include "types.h" + #include "player_text.h" +#include "types.h" #include + class Film; class Encoder; class Player; @@ -32,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 (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 */ @@ -56,4 +65,5 @@ protected: std::shared_ptr _player; }; + #endif