Merge branch 'v2.15.x' of ssh://git.carlh.net/home/carl/git/dcpomatic into v2.15.x
[dcpomatic.git] / src / lib / decoder.h
index d48df7517814aeb14de7b499f510615dd186d0dc..92082ca18b105a62f9dd9aec909625c12ac875c9 100644 (file)
 #define DCPOMATIC_DECODER_H
 
 #include "types.h"
+#include "film.h"
 #include "dcpomatic_time.h"
 #include <boost/utility.hpp>
 
 class Decoded;
 class VideoDecoder;
 class AudioDecoder;
-class CaptionDecoder;
+class TextDecoder;
 class DecoderPart;
 
 /** @class Decoder.
@@ -41,21 +42,28 @@ class DecoderPart;
 class Decoder : public boost::noncopyable
 {
 public:
+       Decoder (boost::weak_ptr<const Film> film);
        virtual ~Decoder () {}
 
        boost::shared_ptr<VideoDecoder> video;
        boost::shared_ptr<AudioDecoder> audio;
-       std::list<boost::shared_ptr<CaptionDecoder> > caption;
+       std::list<boost::shared_ptr<TextDecoder> > text;
 
-       boost::shared_ptr<CaptionDecoder> only_caption () const;
+       boost::shared_ptr<TextDecoder> only_text () const;
 
        /** 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 () = 0;
-       virtual void seek (ContentTime time, bool accurate);
+       virtual void seek (dcpomatic::ContentTime time, bool accurate);
 
-       ContentTime position () const;
+       dcpomatic::ContentTime position () const;
+
+protected:
+       boost::shared_ptr<const Film> film () const;
+
+private:
+       boost::weak_ptr<const Film> _film;
 };
 
 #endif