X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=754321880bcb026c7af361f6ff642eea350ea3f0;hp=32d71c0671b849d57c5a4bfa921110fca57526d0;hb=da44da6f31f97d39ca91c35955e573e76371f2c2;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566 diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index 32d71c067..754321880 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -18,20 +18,23 @@ */ + /** @file src/lib/audio_decoder.h * @brief Parent class for audio decoders. */ + #ifndef DCPOMATIC_AUDIO_DECODER_H #define DCPOMATIC_AUDIO_DECODER_H + #include "decoder.h" #include "content_audio.h" #include "audio_stream.h" #include "decoder_part.h" -#include #include + class AudioBuffers; class AudioContent; class AudioDecoderStream; @@ -39,37 +42,38 @@ class Log; class Film; class Resampler; + /** @class AudioDecoder. * @brief Parent class for audio decoders. */ -class AudioDecoder : public boost::enable_shared_from_this, public DecoderPart +class AudioDecoder : public std::enable_shared_from_this, public DecoderPart { public: - AudioDecoder (Decoder* parent, boost::shared_ptr content, bool fast); + AudioDecoder (Decoder* parent, std::shared_ptr content, bool fast); - dcpomatic::ContentTime position (boost::shared_ptr film) const; - void emit (boost::shared_ptr film, AudioStreamPtr stream, boost::shared_ptr, dcpomatic::ContentTime); + boost::optional position (std::shared_ptr film) const; + void emit (std::shared_ptr film, AudioStreamPtr stream, std::shared_ptr, dcpomatic::ContentTime, bool time_already_delayed = false); void seek (); void flush (); - dcpomatic::ContentTime stream_position (boost::shared_ptr film, AudioStreamPtr stream) const; + dcpomatic::ContentTime stream_position (std::shared_ptr film, AudioStreamPtr stream) const; - /** @return Number of frames of data that were accepted */ boost::signals2::signal Data; private: void silence (int milliseconds); - boost::shared_ptr _content; + std::shared_ptr _content; /** Frame after the last one that was emitted from Data (i.e. at the resampled rate, if applicable) * for each AudioStream. */ typedef std::map PositionMap; PositionMap _positions; - typedef std::map > ResamplerMap; + typedef std::map> ResamplerMap; ResamplerMap _resamplers; bool _fast; }; + #endif