X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftranscode_job.h;h=b05b20a1693373b33cc9b6416f37aef53fa1b5ae;hb=HEAD;hp=8240977b9e1de83be715db8e339c9ff0fcbf5058;hpb=9b98a07cb61fd66fd73f9f58468100ec9b7eddd3;p=dcpomatic.git diff --git a/src/lib/transcode_job.h b/src/lib/transcode_job.h index 8240977b9..b05b20a16 100644 --- a/src/lib/transcode_job.h +++ b/src/lib/transcode_job.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2019 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,33 +18,61 @@ */ + +#ifndef DCPOMATIC_TRANSCODE_JOB_H +#define DCPOMATIC_TRANSCODE_JOB_H + + /** @file src/transcode_job.h * @brief A job which transcodes from one format to another. */ + #include "job.h" -#include + + +/* Defined by Windows */ +#undef IGNORE + class Encoder; + /** @class TranscodeJob * @brief A job which transcodes a Film to another format. */ class TranscodeJob : public Job { public: - explicit TranscodeJob (boost::shared_ptr film); + enum class ChangedBehaviour { + EXAMINE_THEN_STOP, + STOP, + IGNORE + }; + + explicit TranscodeJob (std::shared_ptr film, ChangedBehaviour changed); ~TranscodeJob (); - std::string name () const; - std::string json_name () const; - void run (); - std::string status () const; + std::string name () const override; + std::string json_name () const override; + void run () override; + std::string status () const override; + bool enable_notify () const override { + return true; + } - void set_encoder (boost::shared_ptr t); + void set_encoder (std::shared_ptr t); private: - int remaining_time () const; + virtual void post_transcode () {} + float frames_per_second() const; + + int remaining_time () const override; - boost::shared_ptr _encoder; + std::shared_ptr _encoder; + ChangedBehaviour _changed; }; + + +#endif +