Make Atmos content work more like other content. Now its MXFs
[dcpomatic.git] / src / lib / decoder.h
index 55d9cfc64b92172d35e1714708965e4672f430de..316109ebb95e5eed3d12d3127c75354e3af33f7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -26,6 +26,7 @@
 #define DCPOMATIC_DECODER_H
 
 #include "types.h"
+#include "film.h"
 #include "dcpomatic_time.h"
 #include <boost/utility.hpp>
 
@@ -33,6 +34,7 @@ class Decoded;
 class VideoDecoder;
 class AudioDecoder;
 class TextDecoder;
+class AtmosDecoder;
 class DecoderPart;
 
 /** @class Decoder.
@@ -41,11 +43,13 @@ 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> > text;
+       boost::shared_ptr<AtmosDecoder> atmos;
 
        boost::shared_ptr<TextDecoder> only_text () const;
 
@@ -53,9 +57,15 @@ public:
         *  @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