X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftranscode_job.h;h=368a9b685117ff6425e0a43207032a05450e960e;hb=6e93ff6ac5b514d1b8dd9ccb2d6372576a52761a;hp=5419a46f3342985d2cbe91359f5957847473aa49;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/transcode_job.h b/src/lib/transcode_job.h index 5419a46f3..368a9b685 100644 --- a/src/lib/transcode_job.h +++ b/src/lib/transcode_job.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,30 +18,55 @@ */ + +#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 -class Transcoder; + +/* Defined by Windows */ +#undef IGNORE + + +class Encoder; + /** @class TranscodeJob - * @brief A job which transcodes from one format to another. + * @brief A job which transcodes a Film to another format. */ class TranscodeJob : public Job { public: - TranscodeJob (boost::shared_ptr); + enum class ChangedBehaviour { + EXAMINE_THEN_STOP, + STOP, + IGNORE + }; + + explicit TranscodeJob (std::shared_ptr film, ChangedBehaviour changed); + ~TranscodeJob (); + + std::string name () const override; + std::string json_name () const override; + void run () override; + std::string status () const override; - std::string name () const; - std::string json_name () const; - void run (); - std::string status () const; + void set_encoder (std::shared_ptr t); private: - int remaining_time () const; + int remaining_time () const override; - boost::shared_ptr _transcoder; + std::shared_ptr _encoder; + ChangedBehaviour _changed; }; + + +#endif +