c++ tidying.
[dcpomatic.git] / src / lib / decoder.h
index ddea58aacbfc636c9c29d0264300155046c5378b..da5be4af679ccbda8b7c2100e2af3e5ce52b82e6 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.
 
 
 #include "types.h"
 #include "film.h"
+#include "font_data.h"
 #include "dcpomatic_time.h"
+#include "weak_film.h"
 #include <boost/utility.hpp>
 
 class Decoded;
 class VideoDecoder;
 class AudioDecoder;
 class TextDecoder;
+class AtmosDecoder;
 class DecoderPart;
 
 /** @class Decoder.
  *  @brief Parent class for decoders of content.
  */
-class Decoder : public boost::noncopyable
+class Decoder : public boost::noncopyable, public WeakConstFilm
 {
 public:
-       Decoder (boost::weak_ptr<const Film> film);
+       Decoder (std::weak_ptr<const Film> film);
        virtual ~Decoder () {}
 
-       boost::shared_ptr<VideoDecoder> video;
-       boost::shared_ptr<AudioDecoder> audio;
-       std::list<boost::shared_ptr<TextDecoder> > text;
+       std::shared_ptr<VideoDecoder> video;
+       std::shared_ptr<AudioDecoder> audio;
+       std::list<std::shared_ptr<TextDecoder> > text;
+       std::shared_ptr<AtmosDecoder> atmos;
 
-       boost::shared_ptr<TextDecoder> only_text () const;
+       std::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.
@@ -59,11 +63,9 @@ public:
 
        virtual dcpomatic::ContentTime position () const;
 
-protected:
-       boost::shared_ptr<const Film> film () const;
-
-private:
-       boost::weak_ptr<const Film> _film;
+       virtual std::vector<dcpomatic::FontData> fonts () const {
+               return std::vector<dcpomatic::FontData>();
+       }
 };
 
 #endif