X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=bb3aafccd6a8982824f890fa05907ea8def66b96;hb=3350e8134ec419ca561d3e596c510fbfe0e071d5;hp=fb9f23f034be4bd410b5b50bb5ec05c7611e16a7;hpb=996b0c06e23bcb6b300d7b8799df94993692e07d;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index fb9f23f03..25d858681 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -1,19 +1,20 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ @@ -24,32 +25,34 @@ #ifndef DCPOMATIC_AUDIO_DECODER_H #define DCPOMATIC_AUDIO_DECODER_H -#include "audio_source.h" #include "decoder.h" -extern "C" { -#include -} +#include "content_audio.h" +#include "audio_stream.h" +#include "decoder_part.h" +#include +#include +class AudioBuffers; class AudioContent; +class AudioDecoderStream; +class Log; /** @class AudioDecoder. * @brief Parent class for audio decoders. */ -class AudioDecoder : public AudioSource, public virtual Decoder +class AudioDecoder : public boost::enable_shared_from_this, public DecoderPart { public: - AudioDecoder (boost::shared_ptr, boost::shared_ptr); - ~AudioDecoder (); - -protected: + AudioDecoder (Decoder* parent, boost::shared_ptr content, boost::shared_ptr log); - void audio (boost::shared_ptr, Time); + ContentTime position () const; + void emit (AudioStreamPtr stream, boost::shared_ptr, ContentTime); + void seek (); - Time _next_audio; - boost::shared_ptr _audio_content; + boost::signals2::signal Data; -private: - SwrContext* _swr_context; +private: + std::map _positions; }; #endif