Basics of splitting up Decoder tree like Content.
[dcpomatic.git] / src / lib / audio_decoder.h
index 716b37969d87986d5ebf449ea98a4a68900f5849..a56847daf293588c0003b166c9054d0188e61f8a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 class AudioBuffers;
 class AudioContent;
 class AudioDecoderStream;
+class Log;
 
 /** @class AudioDecoder.
  *  @brief Parent class for audio decoders.
  */
-class AudioDecoder : public virtual Decoder, public boost::enable_shared_from_this<AudioDecoder>
+class AudioDecoder : public boost::enable_shared_from_this<AudioDecoder>
 {
 public:
-       AudioDecoder (boost::shared_ptr<const AudioContent>, bool fast);
-
-       boost::shared_ptr<const AudioContent> audio_content () const {
-               return _audio_content;
-       }
+       AudioDecoder (Decoder* parent, boost::shared_ptr<const AudioContent>, bool fast, boost::shared_ptr<Log> log);
 
        /** Try to fetch some audio from a specific place in this content.
         *  @param frame Frame to start from (after resampling, if applicable)
@@ -59,7 +56,6 @@ public:
                return _fast;
        }
 
-protected:
        void audio (AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
        void flush ();
        void seek (ContentTime t, bool accurate);