X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Ftranscoder.h;h=ed0a6b1b561bb45a628080819d0866944e8a37f8;hb=05c37bfdb86be26497d5baa448a0cbda20e33bed;hp=786010869d35bb04f4528b3827601a62983a3a42;hpb=32fc1ddb0ee004d18c36155ddcf4d9b3998a7061;p=dcpomatic.git diff --git a/src/lib/transcoder.h b/src/lib/transcoder.h index 786010869..ed0a6b1b5 100644 --- a/src/lib/transcoder.h +++ b/src/lib/transcoder.h @@ -17,56 +17,34 @@ */ -/** @file src/transcoder.h - * @brief A class which takes a FilmState and some Options, then uses those to transcode a Film. - * - * A decoder is selected according to the content type, and the encoder can be specified - * as a parameter to the constructor. - */ - -#include "decoder_factory.h" +#include "types.h" +#include "encoder.h" class Film; -class Job; class Encoder; -class FilmState; -class Matcher; class VideoFilter; -class Gain; -class VideoDecoder; -class AudioDecoder; -class DelayLine; +class Player; -/** @class Transcoder - * @brief A class which takes a FilmState and some Options, then uses those to transcode a Film. - * - * A decoder is selected according to the content type, and the encoder can be specified - * as a parameter to the constructor. - */ -class Transcoder +/** @class Transcoder */ +class Transcoder : public boost::noncopyable { public: - Transcoder ( - boost::shared_ptr f, - DecodeOptions o, - Job* j, - boost::shared_ptr e - ); + Transcoder (boost::shared_ptr, boost::shared_ptr); void go (); - boost::shared_ptr video_decoder () const { - return _decoders.video; + float current_encoding_rate () const; + int video_frames_out () const; + + /** @return true if we are in the process of calling Encoder::process_end */ + bool finishing () const { + return _finishing; } -protected: - /** A Job that is running this Transcoder, or 0 */ - Job* _job; - /** The encoder that we will use */ +private: + boost::shared_ptr _film; + boost::shared_ptr _player; + boost::shared_ptr _writer; boost::shared_ptr _encoder; - /** The decoders that we will use */ - Decoders _decoders; - boost::shared_ptr _matcher; - boost::shared_ptr _delay_line; - boost::shared_ptr _gain; + bool _finishing; };