X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=5b68a51a17534d8f07f719927927bf022699f35b;hb=a79d78d8bb6d51f6662f1f63b9f8fd19e1a0c5f1;hp=013a6327f1d8587b3e9d4991f3603f618e995da5;hpb=aa230169f8b59b7cb2da9a3bbb8ce5f7600285c0;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index 013a6327f..5b68a51a1 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -21,38 +21,39 @@ * @brief Parent class for audio decoders. */ -#ifndef DVDOMATIC_AUDIO_DECODER_H -#define DVDOMATIC_AUDIO_DECODER_H +#ifndef DCPOMATIC_AUDIO_DECODER_H +#define DCPOMATIC_AUDIO_DECODER_H -#include "audio_source.h" -#include "stream.h" #include "decoder.h" +#include "content.h" +#include "audio_content.h" +#include "decoded.h" + +class AudioBuffers; +class Resampler; /** @class AudioDecoder. * @brief Parent class for audio decoders. */ -class AudioDecoder : public AudioSource, public virtual Decoder +class AudioDecoder : public virtual Decoder { public: - AudioDecoder (boost::shared_ptr, boost::shared_ptr, Job *); - - virtual void set_audio_stream (boost::shared_ptr); - - /** @return Audio stream that we are using */ - boost::shared_ptr audio_stream () const { - return _audio_stream; - } - - /** @return All available audio streams */ - std::vector > audio_streams () const { - return _audio_streams; + AudioDecoder (boost::shared_ptr, boost::shared_ptr); + + boost::shared_ptr audio_content () const { + return _audio_content; } + void seek (ContentTime time, bool accurate); + protected: - /** Audio stream that we are using */ - boost::shared_ptr _audio_stream; - /** All available audio streams */ - std::vector > _audio_streams; + + void audio (boost::shared_ptr, ContentTime); + void flush (); + + boost::shared_ptr _audio_content; + boost::shared_ptr _resampler; + boost::optional _audio_position; }; #endif