/* Copyright (C) 2012-2016 Carl Hetherington 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. 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 DCP-o-matic. If not, see . */ /** @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; class Log; /** @class AudioDecoder. * @brief Parent class for audio decoders. */ class AudioDecoder : public boost::enable_shared_from_this, public DecoderPart { public: AudioDecoder (Decoder* parent, boost::shared_ptr, boost::shared_ptr log); void set_fast (); void flush (); void emit (AudioStreamPtr stream, boost::shared_ptr, ContentTime); boost::signals2::signal Data; boost::optional position () const; private: /** An AudioDecoderStream object to manage each stream in _audio_content */ typedef std::map > StreamMap; StreamMap _streams; }; #endif