2009-07-03 01:02:53 +02:00
|
|
|
/*
|
2021-01-01 19:54:25 +01:00
|
|
|
* Copyright 2003-2021 The Music Player Daemon Project
|
2009-07-03 01:02:53 +02:00
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2018-01-01 18:48:34 +01:00
|
|
|
#ifndef MPD_PREPARED_FILTER_HXX
|
|
|
|
#define MPD_PREPARED_FILTER_HXX
|
2016-06-22 11:15:49 +02:00
|
|
|
|
2017-12-27 11:42:14 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2013-08-03 21:00:50 +02:00
|
|
|
struct AudioFormat;
|
2018-01-01 18:48:34 +01:00
|
|
|
class Filter;
|
2009-07-03 01:02:53 +02:00
|
|
|
|
2016-06-22 11:15:49 +02:00
|
|
|
class PreparedFilter {
|
|
|
|
public:
|
2021-05-31 07:30:34 +02:00
|
|
|
virtual ~PreparedFilter() = default;
|
2016-06-22 11:15:49 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Opens the filter, preparing it for FilterPCM().
|
|
|
|
*
|
2019-08-26 21:01:22 +02:00
|
|
|
* Throws on error.
|
2016-09-04 14:32:09 +02:00
|
|
|
*
|
2016-06-22 11:15:49 +02:00
|
|
|
* @param af the audio format of incoming data; the
|
|
|
|
* plugin may modify the object to enforce another input
|
|
|
|
* format
|
|
|
|
*/
|
2017-12-27 11:42:14 +01:00
|
|
|
virtual std::unique_ptr<Filter> Open(AudioFormat &af) = 0;
|
2016-06-22 11:15:49 +02:00
|
|
|
};
|
|
|
|
|
2009-07-03 01:02:53 +02:00
|
|
|
#endif
|