This header declares the filter_plugin class.
More...
#include <glib.h>
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
|
struct filter * | filter_new (const struct filter_plugin *plugin, const struct config_param *param, GError **error_r) |
| Creates a new instance of the specified filter plugin.
|
|
struct filter * | filter_configured_new (const struct config_param *param, GError **error_r) |
| Creates a new filter, loads configuration and the plugin name from the specified configuration section.
|
|
void | filter_free (struct filter *filter) |
| Deletes a filter.
|
|
struct audio_format * | filter_open (struct filter *filter, struct audio_format *audio_format, GError **error_r) |
| Opens the filter, preparing it for filter_filter().
|
|
void | filter_close (struct filter *filter) |
| Closes the filter.
|
|
const void * | filter_filter (struct filter *filter, const void *src, size_t src_size, size_t *dest_size_r, GError **error_r) |
| Filters a block of PCM data.
|
|
This header declares the filter_plugin class.
It describes a plugin API for objects which filter raw PCM data.
Definition in file filter_plugin.h.
void filter_close |
( |
struct filter * |
filter | ) |
|
Closes the filter.
After that, you may call filter_open() again.
- Parameters
-
struct filter* filter_configured_new |
( |
const struct config_param * |
param, |
|
|
GError ** |
error_r |
|
) |
| |
|
read |
Creates a new filter, loads configuration and the plugin name from the specified configuration section.
- Parameters
-
param | the configuration section |
error | location to store the error occuring, or NULL to ignore errors. |
- Returns
- a new filter object, or NULL on error
const void* filter_filter |
( |
struct filter * |
filter, |
|
|
const void * |
src, |
|
|
size_t |
src_size, |
|
|
size_t * |
dest_size_r, |
|
|
GError ** |
error_r |
|
) |
| |
Filters a block of PCM data.
- Parameters
-
filter | the filter object |
src | the input buffer |
src_size | the size of #src_buffer in bytes |
dest_size_r | the size of the returned buffer |
error | location to store the error occuring, or NULL to ignore errors. |
- Returns
- the destination buffer on success (will be invalidated by filter_close() or filter_filter()), NULL on error
void filter_free |
( |
struct filter * |
filter | ) |
|
Deletes a filter.
It must be closed prior to calling this function, see filter_close().
- Parameters
-
Creates a new instance of the specified filter plugin.
- Parameters
-
plugin | the filter plugin |
param | optional configuration section |
error | location to store the error occuring, or NULL to ignore errors. |
- Returns
- a new filter object, or NULL on error
Opens the filter, preparing it for filter_filter().
- Parameters
-
filter | the filter object |
audio_format | the audio format of incoming data; the plugin may modify the object to enforce another input format |
error | location to store the error occuring, or NULL to ignore errors. |
- Returns
- the format of outgoing data