X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.h;h=ddea58aacbfc636c9c29d0264300155046c5378b;hb=3b31d2d8a129ae6d8d267427bd6b5bc444b40b2a;hp=a8a67ee72624224afdb4af65db9d4522a7a6f23a;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;p=dcpomatic.git diff --git a/src/lib/decoder.h b/src/lib/decoder.h index a8a67ee72..ddea58aac 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -26,6 +26,7 @@ #define DCPOMATIC_DECODER_H #include "types.h" +#include "film.h" #include "dcpomatic_time.h" #include @@ -34,7 +35,6 @@ class VideoDecoder; class AudioDecoder; class TextDecoder; class DecoderPart; -class Film; /** @class Decoder. * @brief Parent class for decoders of content. @@ -42,6 +42,7 @@ class Film; class Decoder : public boost::noncopyable { public: + Decoder (boost::weak_ptr film); virtual ~Decoder () {} boost::shared_ptr video; @@ -53,10 +54,16 @@ public: /** Do some decoding and perhaps emit video, audio or subtitle data. * @return true if this decoder will emit no more data unless a seek() happens. */ - virtual bool pass (boost::shared_ptr film) = 0; - virtual void seek (boost::shared_ptr film, ContentTime time, bool accurate); + virtual bool pass () = 0; + virtual void seek (dcpomatic::ContentTime time, bool accurate); - ContentTime position (boost::shared_ptr film) const; + virtual dcpomatic::ContentTime position () const; + +protected: + boost::shared_ptr film () const; + +private: + boost::weak_ptr _film; }; #endif