Filter/Internal: split header
This commit is contained in:
parent
5227582e90
commit
551ac56a33
@ -105,7 +105,8 @@ libmpd_a_SOURCES = \
|
||||
src/decoder/DecoderPrint.cxx src/decoder/DecoderPrint.hxx \
|
||||
src/filter/FilterConfig.cxx src/filter/FilterConfig.hxx \
|
||||
src/filter/FilterPlugin.cxx src/filter/FilterPlugin.hxx \
|
||||
src/filter/FilterInternal.hxx \
|
||||
src/filter/Filter.hxx \
|
||||
src/filter/Prepared.hxx \
|
||||
src/filter/FilterRegistry.cxx src/filter/FilterRegistry.hxx \
|
||||
src/filter/Observer.cxx src/filter/Observer.hxx \
|
||||
src/client/Client.cxx src/client/Client.hxx \
|
||||
|
@ -17,21 +17,13 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
*
|
||||
* Internal stuff for the filter core and filter plugins.
|
||||
*/
|
||||
|
||||
#ifndef MPD_FILTER_INTERNAL_HXX
|
||||
#define MPD_FILTER_INTERNAL_HXX
|
||||
#ifndef MPD_FILTER_HXX
|
||||
#define MPD_FILTER_HXX
|
||||
|
||||
#include "AudioFormat.hxx"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
struct AudioFormat;
|
||||
template<typename T> struct ConstBuffer;
|
||||
|
||||
class Filter {
|
||||
@ -72,20 +64,4 @@ public:
|
||||
virtual ConstBuffer<void> FilterPCM(ConstBuffer<void> src) = 0;
|
||||
};
|
||||
|
||||
class PreparedFilter {
|
||||
public:
|
||||
virtual ~PreparedFilter() {}
|
||||
|
||||
/**
|
||||
* Opens the filter, preparing it for FilterPCM().
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*
|
||||
* @param af the audio format of incoming data; the
|
||||
* plugin may modify the object to enforce another input
|
||||
* format
|
||||
*/
|
||||
virtual std::unique_ptr<Filter> Open(AudioFormat &af) = 0;
|
||||
};
|
||||
|
||||
#endif
|
@ -20,7 +20,7 @@
|
||||
#include "config.h"
|
||||
#include "FilterConfig.hxx"
|
||||
#include "FilterPlugin.hxx"
|
||||
#include "FilterInternal.hxx"
|
||||
#include "Prepared.hxx"
|
||||
#include "plugins/ChainFilterPlugin.hxx"
|
||||
#include "config/Param.hxx"
|
||||
#include "config/ConfigOption.hxx"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "config.h"
|
||||
#include "FilterPlugin.hxx"
|
||||
#include "FilterRegistry.hxx"
|
||||
#include "FilterInternal.hxx"
|
||||
#include "Prepared.hxx"
|
||||
#include "config/Block.hxx"
|
||||
#include "config/ConfigError.hxx"
|
||||
#include "util/RuntimeError.hxx"
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "Observer.hxx"
|
||||
#include "FilterInternal.hxx"
|
||||
#include "Filter.hxx"
|
||||
#include "Prepared.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
|
||||
#include <assert.h>
|
||||
|
44
src/filter/Prepared.hxx
Normal file
44
src/filter/Prepared.hxx
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2003-2017 The Music Player Daemon Project
|
||||
* http://www.musicpd.org
|
||||
*
|
||||
* This program 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,
|
||||
* 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.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef MPD_PREPARED_FILTER_HXX
|
||||
#define MPD_PREPARED_FILTER_HXX
|
||||
|
||||
#include <memory>
|
||||
|
||||
struct AudioFormat;
|
||||
class Filter;
|
||||
|
||||
class PreparedFilter {
|
||||
public:
|
||||
virtual ~PreparedFilter() {}
|
||||
|
||||
/**
|
||||
* Opens the filter, preparing it for FilterPCM().
|
||||
*
|
||||
* Throws std::runtime_error on error.
|
||||
*
|
||||
* @param af the audio format of incoming data; the
|
||||
* plugin may modify the object to enforce another input
|
||||
* format
|
||||
*/
|
||||
virtual std::unique_ptr<Filter> Open(AudioFormat &af) = 0;
|
||||
};
|
||||
|
||||
#endif
|
@ -21,7 +21,8 @@
|
||||
#include "AutoConvertFilterPlugin.hxx"
|
||||
#include "ConvertFilterPlugin.hxx"
|
||||
#include "filter/FilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "filter/FilterRegistry.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "ChainFilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
#include "util/StringBuffer.hxx"
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "ConvertFilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "pcm/PcmConvert.hxx"
|
||||
#include "util/Manual.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
|
@ -20,7 +20,8 @@
|
||||
#include "config.h"
|
||||
#include "NormalizeFilterPlugin.hxx"
|
||||
#include "filter/FilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "filter/FilterRegistry.hxx"
|
||||
#include "pcm/PcmBuffer.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
|
@ -26,7 +26,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "filter/FilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "filter/FilterRegistry.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "Compiler.h"
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "ReplayGainFilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "ReplayGainInfo.hxx"
|
||||
#include "ReplayGainConfig.hxx"
|
||||
|
@ -44,7 +44,8 @@
|
||||
#include "config/Block.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "filter/FilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "filter/FilterRegistry.hxx"
|
||||
#include "pcm/PcmBuffer.hxx"
|
||||
#include "pcm/Silence.hxx"
|
||||
|
@ -19,7 +19,8 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "VolumeFilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "pcm/Volume.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "Filtered.hxx"
|
||||
#include "Interface.hxx"
|
||||
#include "mixer/MixerControl.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
|
||||
FilteredAudioOutput::~FilteredAudioOutput()
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "mixer/MixerControl.hxx"
|
||||
#include "mixer/plugins/SoftwareMixerPlugin.hxx"
|
||||
#include "filter/FilterConfig.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "filter/plugins/AutoConvertFilterPlugin.hxx"
|
||||
#include "filter/plugins/ConvertFilterPlugin.hxx"
|
||||
#include "filter/plugins/ReplayGainFilterPlugin.hxx"
|
||||
|
@ -20,7 +20,8 @@
|
||||
#include "config.h"
|
||||
#include "Source.hxx"
|
||||
#include "MusicChunk.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "filter/plugins/ReplayGainFilterPlugin.hxx"
|
||||
#include "pcm/PcmMix.hxx"
|
||||
#include "thread/Mutex.hxx"
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "AudioParser.hxx"
|
||||
#include "AudioFormat.hxx"
|
||||
#include "filter/FilterPlugin.hxx"
|
||||
#include "filter/FilterInternal.hxx"
|
||||
#include "filter/Filter.hxx"
|
||||
#include "filter/Prepared.hxx"
|
||||
#include "pcm/Volume.hxx"
|
||||
#include "mixer/MixerControl.hxx"
|
||||
#include "util/ConstBuffer.hxx"
|
||||
|
Loading…
Reference in New Issue
Block a user