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.
Data Structures | |
struct | filter_plugin |
Functions | |
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.
struct filter* filter_configured_new | ( | const struct config_param * | param, | |
GError ** | error_r | |||
) | [read] |
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.
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 occurring, or NULL to ignore errors. |
void filter_free | ( | struct filter * | filter | ) |
Deletes a filter.
It must be closed prior to calling this function, see filter_close().
struct filter* filter_new | ( | const struct filter_plugin * | plugin, | |
const struct config_param * | param, | |||
GError ** | error_r | |||
) | [read] |
struct audio_format* filter_open | ( | struct filter * | filter, | |
struct audio_format * | audio_format, | |||
GError ** | error_r | |||
) | [read] |
Opens the filter, preparing it for filter_filter().
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 occurring, or NULL to ignore errors. |