Enforce minimum reel length when using REELTYPE_BY_LENGTH.
[dcpomatic.git] / src / lib / decoder.h
index 1b330316ecc7c5c8812720ba4c8f1835f12fda9c..ddea58aacbfc636c9c29d0264300155046c5378b 100644 (file)
@@ -26,6 +26,7 @@
 #define DCPOMATIC_DECODER_H
 
 #include "types.h"
+#include "film.h"
 #include "dcpomatic_time.h"
 #include <boost/utility.hpp>
 
@@ -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<TextDecoder> > caption;
+       std::list<boost::shared_ptr<TextDecoder> > text;
 
-       boost::shared_ptr<TextDecoder> 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;
+       virtual dcpomatic::ContentTime position () const;
+
+protected:
+       boost::shared_ptr<const Film> film () const;
+
+private:
+       boost::weak_ptr<const Film> _film;
 };
 
 #endif