X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=19d10354351d0bef14461961b3758b56812fbd87;hb=a5f9f8163ecb38a140cf623e141bea1d96866fe5;hp=68e99608fb2b42c2631d718018a59ebd8af685f5;hpb=e11276a822289d7d7d91a4f431f386ad28ef16dd;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index 68e99608f..19d103543 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2016 Carl Hetherington + Copyright (C) 2012-2017 Carl Hetherington This file is part of DCP-o-matic. @@ -36,6 +36,7 @@ class AudioBuffers; class AudioContent; class AudioDecoderStream; class Log; +class Resampler; /** @class AudioDecoder. * @brief Parent class for audio decoders. @@ -43,24 +44,24 @@ class Log; class AudioDecoder : public boost::enable_shared_from_this, public DecoderPart { public: - AudioDecoder (Decoder* parent, boost::shared_ptr, boost::shared_ptr log); + AudioDecoder (Decoder* parent, boost::shared_ptr content, boost::shared_ptr log); - boost::optional position () const; - void set_position (AudioStreamPtr stream, ContentTime position); - - void set_fast (); + ContentTime position () const; + void emit (AudioStreamPtr stream, boost::shared_ptr, ContentTime); + void seek (); void flush (); - void emit (AudioStreamPtr stream, boost::shared_ptr, ContentTime); + ContentTime stream_position (AudioStreamPtr stream) const; boost::signals2::signal Data; - boost::optional position () const; - private: - /** An AudioDecoderStream object to manage each stream in _audio_content */ - std::map > _streams; - std::map _positions; + void silence (int milliseconds); + + boost::shared_ptr _content; + /** Frame after the last one that was emitted from Data for each AudioStream */ + std::map _positions; + std::map > _resamplers; }; #endif