X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=25d858681eea36e6e4ed0f6605526f88a37c49d2;hb=3350e8134ec419ca561d3e596c510fbfe0e071d5;hp=cdb643ceeabef373aa5ada3f705168beed574766;hpb=936ff6927ad24daf0ed20776b19b6faa3df9bf83;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index cdb643cee..25d858681 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -30,6 +30,7 @@ #include "audio_stream.h" #include "decoder_part.h" #include +#include class AudioBuffers; class AudioContent; @@ -42,28 +43,16 @@ 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); - /** Try to fetch some audio from a specific place in this content. - * @param frame Frame to start from (after resampling, if applicable) - * @param length Frames to get (after resampling, if applicable) - * @param accurate true to try hard to return frames from exactly `frame', false if we don't mind nearby frames. - * @return Time-stamped audio data which may or may not be from the location (and of the length) requested. - */ - ContentAudio get (AudioStreamPtr stream, Frame time, Frame length, bool accurate); + ContentTime position () const; + void emit (AudioStreamPtr stream, boost::shared_ptr, ContentTime); + void seek (); - void set_fast (); - - void give (AudioStreamPtr stream, boost::shared_ptr, ContentTime); - void flush (); - void seek (ContentTime t, bool accurate); - - boost::optional position () const; + boost::signals2::signal Data; private: - /** An AudioDecoderStream object to manage each stream in _audio_content */ - typedef std::map > StreamMap; - StreamMap _streams; + std::map _positions; }; #endif