Attempts to simplify black-filling logic in Player.
[dcpomatic.git] / src / lib / audio_decoder.h
index c104d8201971a3b1ee98bf72dfed3f58f619945c..624b5c94ab01d3f9c3674a2b5d7f767d52eae012 100644 (file)
@@ -36,6 +36,7 @@ class AudioBuffers;
 class AudioContent;
 class AudioDecoderStream;
 class Log;
+class Resampler;
 
 /** @class AudioDecoder.
  *  @brief Parent class for audio decoders.
@@ -48,12 +49,17 @@ public:
        ContentTime position () const;
        void emit (AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
        void seek ();
+       void flush ();
+
+       ContentTime stream_position (AudioStreamPtr stream) const;
 
        boost::signals2::signal<void (AudioStreamPtr, ContentAudio)> Data;
 
 private:
+       boost::shared_ptr<const AudioContent> _content;
        /** Frame after the last one that was emitted from Data for each AudioStream */
        std::map<AudioStreamPtr, Frame> _positions;
+       std::map<AudioStreamPtr, boost::shared_ptr<Resampler> > _resamplers;
 };
 
 #endif