PipeWire: filter.c File Reference

PipeWire 0.3.34

Data Structures | Macros | Functions
filter.c File Reference

## Data Structures
struct | buffer
struct | queue
struct | data
| user data to add to an object More...
struct | param
struct | port
struct | filter

## Macros
#define | NAME "filter"
#define | MAX_SAMPLES 8192
#define | MAX_BUFFERS 64
#define | MASK_BUFFERS (MAX_BUFFERS-1)
#define | MAX_PORTS 1024
#define | BUFFER_FLAG_MAPPED (1 << 0)
#define | BUFFER_FLAG_QUEUED (1 << 1)
#define | BUFFER_FLAG_ADDED (1 << 2)
#define | PARAM_FLAG_LOCKED (1 << 0)
#define | IDX_EnumFormat 0
#define | IDX_Meta 1
#define | IDX_IO 2
#define | IDX_Format 3
#define | IDX_Buffers 4
#define | IDX_Latency 5
#define | N_PORT_PARAMS 6
#define | IDX_Props 0
#define | IDX_ProcessLatency 1
#define | N_NODE_PARAMS 2

## Functions
struct pw_filter * | pw_filter_new (struct pw_core *core, const char *name, struct pw_properties *props)
| Create a new unconneced PipeWire Filter. More...
struct pw_filter * | pw_filter_new_simple (struct pw_loop *loop, const char *name, struct pw_properties *props, const struct pw_filter_events *events, void *data)
const char * | pw_filter_state_as_string (enum pw_filter_state state)
| Convert a filter state to a readable string More...
void | pw_filter_destroy (struct pw_filter *filter)
| Destroy a filter More...
void | pw_filter_add_listener (struct pw_filter *filter, struct spa_hook *listener, const struct pw_filter_events *events, void *data)
enum pw_filter_state | pw_filter_get_state (struct pw_filter *filter, const char **error)
struct pw_core * | pw_filter_get_core (struct pw_filter *filter)
const char * | pw_filter_get_name (struct pw_filter *filter)
const struct pw_properties * | pw_filter_get_properties (struct pw_filter *filter, void *port_data)
| get properties, port_data of NULL will give global properties More...
int | pw_filter_update_properties (struct pw_filter *filter, void *port_data, const struct spa_dict *dict)
| Update properties, use NULL port_data for global filter properties. More...
int | pw_filter_connect (struct pw_filter *filter, enum pw_filter_flags flags, const struct spa_pod **params, uint32_t n_params)
| Connect a filter for processing. More...
uint32_t | pw_filter_get_node_id (struct pw_filter *filter)
| Get the node ID of the filter. More...
int | pw_filter_disconnect (struct pw_filter *filter)
| Disconnect filter More...
void * | pw_filter_add_port (struct pw_filter *filter, enum pw_direction direction, enum pw_filter_port_flags flags, size_t port_data_size, struct pw_properties *props, const struct spa_pod **params, uint32_t n_params)
| add a port to the filter, returns user data of port_data_size. More...
int | pw_filter_remove_port (void *port_data)
| remove a port from the filter More...
int | pw_filter_set_error (struct pw_filter *filter, int res, const char *error,...)
int | pw_filter_update_params (struct pw_filter *filter, void *port_data, const struct spa_pod **params, uint32_t n_params)
| Update params, use NULL port_data for global filter params. More...
int | pw_filter_set_active (struct pw_filter *filter, bool active)
| Activate or deactivate the filter More...
int | pw_filter_get_time (struct pw_filter *filter, struct pw_time *time)
| Query the time on the filter More...
struct pw_buffer * | pw_filter_dequeue_buffer (void *port_data)
| Get a buffer that can be filled for output ports or consumed for input ports. More...
int | pw_filter_queue_buffer (void *port_data, struct pw_buffer *buffer)
| Submit a buffer for playback or recycle a buffer for capture. More...
void * | pw_filter_get_dsp_buffer (void *port_data, uint32_t n_samples)
| Get a data pointer to the buffer data. More...
int | pw_filter_flush (struct pw_filter *filter, bool drain)
| Flush a filter. More...

## Macro Definition Documentation

## ◆ BUFFER_FLAG_ADDED

#define BUFFER_FLAG_ADDED (1 << 2)

## ◆ BUFFER_FLAG_MAPPED

#define BUFFER_FLAG_MAPPED (1 << 0)

## ◆ BUFFER_FLAG_QUEUED

#define BUFFER_FLAG_QUEUED (1 << 1)

## ◆ IDX_Buffers

#define IDX_Buffers 4

## ◆ IDX_EnumFormat

#define IDX_EnumFormat 0

## ◆ IDX_Format

#define IDX_Format 3

## ◆ IDX_IO

#define IDX_IO 2

## ◆ IDX_Latency

#define IDX_Latency 5

## ◆ IDX_Meta

#define IDX_Meta 1

## ◆ IDX_ProcessLatency

#define IDX_ProcessLatency 1

## ◆ IDX_Props

#define IDX_Props 0

## ◆ MASK_BUFFERS

#define MASK_BUFFERS (MAX_BUFFERS-1)

## ◆ MAX_BUFFERS

#define MAX_BUFFERS 64

## ◆ MAX_PORTS

#define MAX_PORTS 1024

## ◆ MAX_SAMPLES

#define MAX_SAMPLES 8192

## ◆ N_NODE_PARAMS

#define N_NODE_PARAMS 2

## ◆ N_PORT_PARAMS

#define N_PORT_PARAMS 6

## ◆ NAME

#define NAME "filter"

## ◆ PARAM_FLAG_LOCKED

#define PARAM_FLAG_LOCKED (1 << 0)

## Function Documentation

## ◆ pw_filter_set_error()

int pw_filter_set_error | ( | struct pw_filter * | filter,
|  | int | res,
|  | const char * | error,
|  |  | ...
| ) |  |

References pw_proxy_error().