Go to the documentation of this file.
25 #ifndef PIPEWIRE_FILTER_H
26 #define PIPEWIRE_FILTER_H
79 #define PW_VERSION_FILTER_EVENTS 0
89 uint32_t id,
void *area, uint32_t size);
184 size_t port_data_size,
parameters to map a memory range
Definition: src/pipewire/mem.h:185
#define IDX_Buffers
Definition: filter.c:107
@ SPA_MEDIA_SUBTYPE_dsp
Definition: param/format.h:54
int pw_filter_get_time(struct pw_filter *filter, struct pw_time *time)
Query the time on the filter
Definition: filter.c:1776
int pw_filter_set_active(struct pw_filter *filter, bool active)
Activate or deactivate the filter
Definition: filter.c:1769
void * user_data
user data attached to the buffer
Definition: stream.h:177
#define PW_KEY_FORMAT_DSP
format related properties
Definition: src/pipewire/keys.h:302
int pw_filter_disconnect(struct pw_filter *filter)
Disconnect filter
Definition: filter.c:1542
@ SPA_VIDEO_FORMAT_DSP_F32
Definition: video/raw.h:141
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
uint32_t maxsize
max size of data
Definition: buffer/buffer.h:87
Definition: module-filter-chain.c:170
int pw_filter_set_error(struct pw_filter *filter, int res, const char *error,...)
Definition: filter.c:1719
#define IDX_EnumFormat
Definition: filter.c:103
struct pw_context * context
Definition: filter.c:131
const char * pw_filter_get_name(struct pw_filter *filter)
Definition: filter.c:1406
void spa_hook_list_join(struct spa_hook_list *list, struct spa_hook_list *save)
Definition: hook.h:366
int32_t status
the status code
Definition: io.h:99
uint64_t base_pos
Definition: filter.c:160
uint32_t clock_id
Definition: filter.c:161
spa_direction
Definition: defs.h:78
#define SPA_FLAG_CLEAR(field, flag)
Definition: defs.h:75
int pw_proxy_error(struct pw_proxy *proxy, int res, const char *error)
Generate an error for a proxy.
Definition: proxy.c:338
@ SPA_FORMAT_mediaType
media type (Id enum spa_media_type)
Definition: param/format.h:102
#define spa_node_call_ready(hook,...)
Definition: build-12683127/doc/spa/node/utils.h:145
Node callbacks.
Definition: build-12683127/doc/spa/node/node.h:207
@ SPA_TYPE_OBJECT_ParamBuffers
Definition: build-12683127/doc/spa/utils/type.h:91
enum spa_direction direction
Definition: latency-utils.h:38
#define spa_return_val_if_fail(expr, val)
Definition: defs.h:251
pw_filter_flags
Extra flags that can be used in pw_filter_connect()
Definition: src/pipewire/filter.h:112
struct pw_filter this
Definition: filter.c:127
@ SPA_PARAM_BUFFERS_blocks
number of data blocks per buffer (Int)
Definition: param.h:83
Node information structure.
Definition: build-12683127/doc/spa/node/node.h:60
#define SPA_PARAM_INFO_WRITE
Definition: param.h:69
int pw_filter_queue_buffer(void *port_data, struct pw_buffer *buffer)
Submit a buffer for playback or recycle a buffer for capture.
Definition: filter.c:1833
@ SPA_IO_Position
position information in the graph, struct spa_io_position
Definition: io.h:59
int spa_latency_info_combine(struct spa_latency_info *info, const struct spa_latency_info *other)
Definition: latency-utils.h:63
@ SPA_PARAM_IO_size
size of the io area (Int)
Definition: param.h:101
#define SPA_NODE_CHANGE_MASK_PROPS
Definition: build-12683127/doc/spa/node/node.h:64
#define SPA_POD_Int(val)
Definition: vararg.h:59
#define SPA_STATUS_NEED_DATA
Definition: io.h:95
int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:298
#define spa_zero(x)
Definition: defs.h:303
#define MASK_BUFFERS
Definition: filter.c:51
struct spa_param_info params[N_PORT_PARAMS]
Definition: filter.c:110
@ SPA_TYPE_OBJECT_Format
Definition: build-12683127/doc/spa/utils/type.h:90
struct spa_port_info info
Definition: filter.c:101
@ SPA_PARAM_BUFFERS_dataType
possible memory types (Int, mask of enum spa_data_type)
Definition: param.h:87
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.
Definition: filter.c:1632
struct pw_context * pw_context_new(struct pw_loop *main_loop, struct pw_properties *props, size_t user_data_size)
Make a new context object for a given main_loop.
Definition: context.c:249
struct pw_properties * props
Definition: filter.c:98
struct queue dequeued
Definition: filter.c:117
#define IDX_Meta
Definition: filter.c:104
uint32_t n_datas
number of data members
Definition: buffer/buffer.h:95
void(* state_changed)(void *data, enum pw_filter_state old, enum pw_filter_state state, const char *error)
when the filter state changes
Definition: src/pipewire/filter.h:84
#define BUFFER_FLAG_MAPPED
Definition: filter.c:62
Definition: latency-utils.h:37
#define SPA_DICT_ITEM_INIT(key, value)
Definition: utils/dict.h:46
#define SPA_PORT_CHANGE_MASK_PARAMS
Definition: build-12683127/doc/spa/node/node.h:98
@ SPA_PARAM_ProcessLatency
processing latency, a SPA_TYPE_OBJECT_ParamProcessLatency
Definition: param.h:60
enum pw_filter_flags flags
Definition: filter.c:133
int spa_latency_parse(const struct spa_pod *latency, struct spa_latency_info *info)
Definition: latency-utils.h:83
struct spa_callbacks callbacks
Definition: filter.c:137
uint32_t n_params
number of items in params
Definition: build-12683127/doc/spa/node/node.h:123
#define SPA_POD_VALUE(type, pod)
Definition: pod/pod.h:55
#define IDX_ProcessLatency
Definition: filter.c:151
@ SPA_PARAM_Latency
latency reporting, a SPA_TYPE_OBJECT_ParamLatency
Definition: param.h:59
user data to add to an object
Definition: filter.c:75
@ SPA_PARAM_BUFFERS_buffers
number of buffers (Int)
Definition: param.h:82
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:87
#define SPA_DICT_INIT_ARRAY(items)
Definition: utils/dict.h:56
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
Definition: pod/pod.h:199
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
struct pw_filter * pw_filter_new(struct pw_core *core, const char *name, struct pw_properties *props)
Create a new unconneced PipeWire Filter.
Definition: filter.c:1245
struct spa_list param_list
Definition: impl-device.c:40
struct spa_io_buffers * io
Definition: filter.c:112
@ PW_FILTER_PORT_FLAG_NONE
no flags
Definition: src/pipewire/filter.h:126
@ PW_FILTER_STATE_ERROR
the stream is in error
Definition: src/pipewire/filter.h:57
Definition: src/pipewire/loop.h:47
int32_t stride
stride of valid data
Definition: buffer/buffer.h:63
#define SPA_EXPORT
Definition: defs.h:208
@ SPA_DIRECTION_INPUT
Definition: defs.h:79
struct spa_hook filter_listener
Definition: filter.c:77
#define SPA_NODE_FLAG_RT
node can do real-time processing
Definition: build-12683127/doc/spa/node/node.h:68
@ SPA_LOG_LEVEL_WARN
Definition: build-12683127/doc/spa/support/log.h:49
void(* drained)(void *data)
The filter is drained.
Definition: src/pipewire/filter.h:105
int seq
Definition: policy-ep.c:65
#define IDX_Latency
Definition: filter.c:108
#define pw_log_trace(...)
Definition: src/pipewire/log.h:90
A time structure.
Definition: stream.h:194
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.
Definition: filter.c:1743
The position information adds extra meaning to the raw clock times.
Definition: io.h:271
#define MAX_PORTS
Definition: filter.c:52
#define SPA_POD_CHOICE_STEP_Int(def, min, max, step)
Definition: vararg.h:62
void pw_proxy_destroy(struct pw_proxy *proxy)
destroy a proxy
Definition: proxy.c:229
#define SPA_PARAM_INFO_READ
Definition: param.h:68
#define PW_KEY_MEDIA_NAME
media name.
Definition: src/pipewire/keys.h:286
pw_filter_port_flags
Definition: src/pipewire/filter.h:125
Proxy events, use pw_proxy_add_listener.
Definition: proxy.h:111
void spa_hook_list_append(struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data)
Append a hook.
Definition: hook.h:316
@ SPA_PARAM_IO_id
type ID, uniquely identifies the io area (Id enum spa_io_type)
Definition: param.h:100
@ SPA_MEDIA_TYPE_audio
Definition: param/format.h:42
int spa_pod_get_int(const struct spa_pod *pod, int32_t *value)
Definition: iter.h:182
uint32_t ids[MAX_BUFFERS]
Definition: filter.c:69
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
uint32_t id
Definition: filter.c:81
#define SPA_POD_OBJECT_ID(obj)
Definition: pod/pod.h:167
int64_t delay
delay to device, add to ticks to get the time of the device.
Definition: stream.h:199
int pw_filter_remove_port(void *port_data)
remove a port from the filter
Definition: filter.c:1700
void(* remove_buffer)(void *data, void *port_data, struct pw_buffer *buffer)
when a buffer was destroyed for a port
Definition: src/pipewire/filter.h:97
#define SPA_PRINTF_FUNC(fmt, arg1)
Definition: defs.h:205
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.
Definition: filter.c:1814
struct spa_list port_list
Definition: filter.c:144
A ringbuffer type.
Definition: ringbuffer.h:46
#define SPA_INTERFACE_INIT(_type, _version, _funcs, _data)
Initialize a spa_interface.
Definition: hook.h:165
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
@ SPA_PARAM_Props
properties as SPA_TYPE_OBJECT_Props
Definition: param.h:46
uintptr_t seq
Definition: filter.c:158
#define SPA_LATENCY_INFO(dir,...)
Definition: latency-utils.h:47
Definition: build-12683127/doc/spa/support/loop.h:44
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
unsigned int allow_mlock
Definition: filter.c:169
struct spa_latency_info latency[2]
Definition: filter.c:120
uint32_t rate
Definition: module-filter-chain.c:240
#define SPA_VERSION_NODE
Definition: build-12683127/doc/spa/node/node.h:52
Definition: utils/dict.h:41
void(* destroy)(void *data)
Definition: src/pipewire/filter.h:82
int spa_pod_filter(struct spa_pod_builder *b, struct spa_pod **result, const struct spa_pod *pod, const struct spa_pod *filter)
Definition: build-12683127/doc/spa/pod/filter.h:387
#define SPA_CONTAINER_OF(p, t, m)
Definition: defs.h:170
uint64_t ticks
the ticks at now.
Definition: stream.h:197
struct pw_core * pw_context_connect(struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
Connect to a PipeWire instance.
Definition: core.c:401
#define SPA_PARAM_INFO(id, flags)
Definition: param.h:77
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:48
uint32_t flags
Definition: param.h:71
#define spa_list_consume(pos, head, member)
Definition: list.h:96
#define SPA_TYPE_INTERFACE_Node
Definition: build-12683127/doc/spa/node/node.h:50
void spa_hook_list_isolate(struct spa_hook_list *list, struct spa_hook_list *save, struct spa_hook *hook, const void *funcs, void *data)
Definition: hook.h:352
@ SPA_AUDIO_FORMAT_DSP_F32
Definition: audio/raw.h:100
struct spa_list link
Definition: filter.c:89
struct spa_pod * param
Definition: filter.c:85
Definition: latency-utils.h:115
int spa_process_latency_parse(const struct spa_pod *latency, struct spa_process_latency_info *info)
Definition: latency-utils.h:124
IO area to exchange buffers.
Definition: io.h:93
struct pw_port * port
Definition: filter.c:96
void(* process)(void *data, struct spa_io_position *position)
do processing.
Definition: src/pipewire/filter.h:102
struct spa_node impl_node
Definition: filter.c:135
#define PW_VERSION_PROXY_EVENTS
Definition: proxy.h:112
@ SPA_IO_Buffers
area to exchange buffers, struct spa_io_buffers
Definition: io.h:53
uint32_t offset
offset of valid data.
Definition: buffer/buffer.h:58
@ SPA_PARAM_BUFFERS_size
size of a data block memory (Int)
Definition: param.h:84
#define SPA_PARAM_INFO_SERIAL
bit to signal update even when the read/write flags don't change
Definition: param.h:66
@ SPA_MEDIA_TYPE_application
Definition: param/format.h:47
#define PARAM_FLAG_LOCKED
Definition: filter.c:82
uint32_t change_mask_all
Definition: filter.c:147
uint32_t id
unique clock id, set by application
Definition: io.h:135
int pw_filter_set_error(struct pw_filter *filter, int res, const char *error,...) 1(3
Set the filter in error state.
#define N_NODE_PARAMS
Definition: filter.c:152
uint64_t size
This field is set by the user and the sum of all queued buffer is returned in the time info.
Definition: stream.h:178
Node methods.
Definition: build-12683127/doc/spa/node/node.h:281
int32_t spa_ringbuffer_get_read_index(struct spa_ringbuffer *rbuf, uint32_t *index)
Get the read index and available bytes for reading.
Definition: ringbuffer.h:85
#define SPA_NODE_INFO_INIT()
Definition: build-12683127/doc/spa/node/node.h:87
int32_t spa_ringbuffer_get_write_index(struct spa_ringbuffer *rbuf, uint32_t *index)
Get the write index and the number of bytes inside the ringbuffer.
Definition: ringbuffer.h:135
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
@ PW_FILTER_STATE_PAUSED
filter is connected and paused
Definition: src/pipewire/filter.h:60
struct timespec now
Definition: default-profile.c:87
@ PW_FILTER_FLAG_RT_PROCESS
call process from the realtime thread
Definition: src/pipewire/filter.h:118
struct data data
Definition: filter.c:157
#define SPA_FLAG_SET(field, flag)
Definition: defs.h:74
#define IDX_Props
Definition: filter.c:150
#define spa_node_emit_result(hooks,...)
Definition: build-12683127/doc/spa/node/utils.h:133
@ PW_FILTER_STATE_UNCONNECTED
unconnected
Definition: src/pipewire/filter.h:58
#define SPA_NODE_COMMAND_ID(cmd)
Definition: node/command.h:59
@ PW_FILTER_FLAG_INACTIVE
start the filter inactive, pw_filter_set_active() needs to be called explicitly
Definition: src/pipewire/filter.h:114
#define SPA_STATUS_HAVE_DATA
Definition: io.h:96
A Buffer.
Definition: buffer/buffer.h:93
struct spa_param_info params[N_NODE_PARAMS]
Definition: filter.c:153
#define SPA_PORT_INFO_INIT()
Definition: build-12683127/doc/spa/node/node.h:126
@ SPA_TYPE_OBJECT_ParamIO
Definition: build-12683127/doc/spa/utils/type.h:93
struct spa_pod * spa_latency_build(struct spa_pod_builder *builder, uint32_t id, const struct spa_latency_info *info)
Definition: latency-utils.h:102
int64_t now
the monotonic time in nanoseconds
Definition: stream.h:195
@ PW_FILTER_PORT_FLAG_ALLOC_BUFFERS
the application will allocate buffer memory.
Definition: src/pipewire/filter.h:128
struct pw_proxy * pw_core_export(struct pw_core *core, const char *type, const struct spa_dict *props, void *object, size_t user_data_size)
Export an object into the PipeWire instance associated with core.
Definition: core.c:274
#define PW_KEY_NODE_NAME
node name
Definition: src/pipewire/keys.h:138
Definition: build-12683127/doc/spa/node/node.h:53
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
Callbacks, contains the structure with functions and the data passed to the functions.
Definition: hook.h:130
@ SPA_NODE_COMMAND_Suspend
suspend a node, this removes all configured formats and closes any devices
Definition: node/command.h:41
#define PW_KEY_APP_PROCESS_BINARY
binary name
Definition: src/pipewire/keys.h:119
struct spa_process_latency_info process_latency
Definition: filter.c:155
#define BUFFER_FLAG_ADDED
Definition: filter.c:64
#define PW_KEY_NODE_LATENCY
the requested latency of the node as a fraction.
Definition: src/pipewire/keys.h:154
#define PW_KEY_APP_NAME
application keys
Definition: src/pipewire/keys.h:108
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.
Definition: filter.c:1451
uint32_t type
memory type, one of enum spa_data_type, when allocating memory, the type contains a bitmask of allowe...
Definition: buffer/buffer.h:71
@ PW_FILTER_PORT_FLAG_MAP_BUFFERS
mmap the buffers except DmaBuf
Definition: src/pipewire/filter.h:127
the result of enum_params or port_enum_params.
Definition: build-12683127/doc/spa/node/node.h:137
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)
Definition: filter.c:1267
uint64_t position
current position
Definition: io.h:141
#define SPA_PORT_CHANGE_MASK_PROPS
Definition: build-12683127/doc/spa/node/node.h:97
struct spa_pod * spa_pod_get_values(const struct spa_pod *pod, uint32_t *n_vals, uint32_t *choice)
Definition: iter.h:362
void(* removed)(struct spa_hook *hook)
callback and data for the hook list, private to the hook_list implementor
Definition: hook.h:300
uint32_t n_params
number of items in params
Definition: build-12683127/doc/spa/node/node.h:84
@ PW_FILTER_STATE_STREAMING
filter is streaming
Definition: src/pipewire/filter.h:61
#define NAME
Definition: filter.c:46
struct pw_core * pw_filter_get_core(struct pw_filter *filter)
Definition: filter.c:1400
#define SPA_RESULT_TYPE_NODE_PARAMS
Definition: build-12683127/doc/spa/node/node.h:129
@ SPA_MEDIA_TYPE_video
Definition: param/format.h:43
const char * pw_filter_state_as_string(enum pw_filter_state state)
Convert a filter state to a readable string
Definition: filter.c:1312
uint32_t flags
Definition: audio/raw.h:287
int pw_core_disconnect(struct pw_core *core)
disconnect and destroy a core
Definition: core.c:488
uint32_t version
Definition: src/pipewire/filter.h:80
uint64_t change_mask
Definition: build-12683127/doc/spa/node/node.h:99
uint32_t state
one of enum spa_io_position_state
Definition: io.h:280
@ SPA_NODE_COMMAND_Pause
pause a node.
Definition: node/command.h:43
@ PW_FILTER_FLAG_DRIVER
be a driver
Definition: src/pipewire/filter.h:117
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12683127/doc/spa/support/log.h:51
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:73
#define SPA_VERSION_NODE_METHODS
Definition: build-12683127/doc/spa/node/node.h:284
#define spa_node_emit_port_info(hooks,...)
Definition: build-12683127/doc/spa/node/utils.h:132
struct spa_hook_list hooks
Definition: filter.c:136
information about a parameter
Definition: param.h:64
@ PW_FILTER_STATE_CONNECTING
connection is in progress
Definition: src/pipewire/filter.h:59
void spa_list_init(struct spa_list *list)
Definition: list.h:44
@ SPA_FORMAT_mediaSubtype
media subtype (Id enum spa_media_subtype)
Definition: param/format.h:103
#define spa_list_for_each_safe(pos, tmp, head, member)
Definition: list.h:129
void spa_pod_builder_init(struct spa_pod_builder *builder, void *data, uint32_t size)
Definition: builder.h:96
struct spa_chunk * chunk
valid chunk of memory
Definition: buffer/buffer.h:89
Definition: utils/dict.h:48
struct spa_hook_list hooks
Definition: media-session.c:155
Port information structure.
Definition: build-12683127/doc/spa/node/node.h:94
pw_filter_state
The state of a filter
Definition: src/pipewire/filter.h:56
@ SPA_DIRECTION_OUTPUT
Definition: defs.h:80
const char * path
Definition: filter.c:129
uint32_t change_mask_all
Definition: filter.c:100
uint32_t port_id
Definition: buffers.c:47
size_t size
Definition: media-session.c:112
@ SPA_PARAM_EnumFormat
available formats as SPA_TYPE_OBJECT_Format
Definition: param.h:47
uint32_t flags
Definition: filter.c:95
struct spa_io_clock clock
clock position of driver, always valid and read only
Definition: io.h:272
int pw_filter_flush(struct pw_filter *filter, bool drain)
Flush a filter.
Definition: filter.c:1903
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.
Definition: filter.c:1425
#define MAX_SAMPLES
Definition: filter.c:48
#define PW_VERSION_CORE_EVENTS
Definition: core.h:115
int32_t flags
chunk flags
Definition: buffer/buffer.h:66
#define spa_strerror(err)
Definition: result.h:51
void pw_filter_add_listener(struct pw_filter *filter, struct spa_hook *listener, const struct pw_filter_events *events, void *data)
Definition: filter.c:1377
uint32_t denom
Definition: defs.h:106
#define PW_ID_CORE
default ID for the core object after connect
Definition: core.h:66
@ SPA_NODE_COMMAND_Start
start a node, this makes it start emitting scheduling events
Definition: node/command.h:45
@ SPA_PARAM_Meta
allowed metadata for buffers as SPA_TYPE_OBJECT_ParamMeta
Definition: param.h:50
const struct spa_pod_prop * spa_pod_find_prop(const struct spa_pod *pod, const struct spa_pod_prop *start, uint32_t key)
Definition: iter.h:423
@ SPA_FORMAT_VIDEO_format
video format (Id enum spa_video_format)
Definition: param/format.h:115
unsigned int draining
Definition: filter.c:168
#define N_PORT_PARAMS
Definition: filter.c:109
#define SPA_POD_CHOICE_RANGE_Int(def, min, max)
Definition: vararg.h:61
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
void pw_context_destroy(struct pw_context *context)
destroy a context object, all resources except the main_loop will be destroyed
Definition: context.c:464
@ PW_FILTER_FLAG_NONE
no flags
Definition: src/pipewire/filter.h:113
const struct spa_type_info spa_type_io[]
Definition: node/type-info.h:46
void(* io_changed)(void *data, void *port_data, uint32_t id, void *area, uint32_t size)
when io changed on a port of the filter (when port_data is NULL).
Definition: src/pipewire/filter.h:88
@ PW_FILTER_FLAG_CUSTOM_LATENCY
don't call the default latency algorithm but emit the param_changed event for the ports when Latency ...
Definition: src/pipewire/filter.h:120
#define pw_log(lev,...)
Definition: src/pipewire/log.h:80
uint8_t user_data[0]
Definition: filter.c:123
void(* add_buffer)(void *data, void *port_data, struct pw_buffer *buffer)
when a new buffer was created for a port
Definition: src/pipewire/filter.h:95
#define SPA_ID_INVALID
Definition: defs.h:182
struct pw_context * context
Definition: settings.c:43
uint32_t user
private user field.
Definition: param.h:72
int pw_properties_update_string(struct pw_properties *props, const char *str, size_t size)
Update the properties from the given string, overwriting any existing keys with the new values from s...
Definition: properties.c:154
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
uint32_t flags
Definition: filter.c:83
#define SPA_NODE_CHANGE_MASK_PARAMS
Definition: build-12683127/doc/spa/node/node.h:65
@ SPA_MEDIA_SUBTYPE_control
control stream, data contains spa_pod_sequence with control info.
Definition: param/format.h:94
@ SPA_PARAM_IO
configurable IO areas as SPA_TYPE_OBJECT_ParamIO
Definition: param.h:51
A list of hooks.
Definition: hook.h:284
uint32_t size
size of valid data.
Definition: buffer/buffer.h:61
#define BUFFER_FLAG_QUEUED
Definition: filter.c:63
@ SPA_DATA_MemFd
generic fd, mmap to get to memory
Definition: buffer/buffer.h:49
void pw_filter_destroy(struct pw_filter *filter)
Destroy a filter
Definition: filter.c:1330
#define PW_KEY_OBJECT_REGISTER
If the object should be registered.
Definition: src/pipewire/keys.h:69
void spa_ringbuffer_write_update(struct spa_ringbuffer *rbuf, int32_t index)
Update the write pointer to index.
Definition: ringbuffer.h:169
Events for a filter.
Definition: src/pipewire/filter.h:78
uint32_t id
Definition: filter.c:61
void spa_ringbuffer_read_update(struct spa_ringbuffer *rbuf, int32_t index)
Update the read pointer to index.
Definition: ringbuffer.h:119
struct spa_node_info info
Definition: filter.c:148
unsigned int warn_mlock
Definition: filter.c:170
@ SPA_DATA_MemPtr
pointer to memory, the data field in struct spa_data is set.
Definition: buffer/buffer.h:47
@ SPA_PARAM_BUFFERS_stride
stride of data block memory (Int)
Definition: param.h:85
@ SPA_FORMAT_AUDIO_format
audio format, (Id enum spa_audio_format)
Definition: param/format.h:107
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
void(* param_changed)(void *data, void *port_data, uint32_t id, const struct spa_pod *param)
when a parameter changed on a port of the filter (when port_data is NULL).
Definition: src/pipewire/filter.h:91
void * pw_filter_get_dsp_buffer(void *port_data, uint32_t n_samples)
Get a data pointer to the buffer data.
Definition: filter.c:1848
struct spa_callbacks rt_callbacks
Definition: filter.c:163
#define spa_callbacks_call(callbacks, type, method, vers,...)
Invoke method named method in the callbacks.
Definition: hook.h:172
struct spa_fraction rate
rate for position/duration/delay
Definition: io.h:140
Definition: pod/command.h:44
struct spa_data * datas
array of data members
Definition: buffer/buffer.h:97
unsigned int disconnecting
Definition: filter.c:165
#define IDX_Format
Definition: filter.c:106
struct spa_buffer * buffer
the spa buffer
Definition: stream.h:176
Data for a buffer this stays constant for a buffer.
Definition: buffer/buffer.h:70
#define SPA_PORT_CHANGE_MASK_FLAGS
Definition: build-12683127/doc/spa/node/node.h:95
struct spa_list param_list
Definition: filter.c:102
struct pw_buffer this
Definition: filter.c:60
unsigned int disconnect_core
Definition: filter.c:166
struct pw_control this
Definition: control.c:34
#define spa_pod_builder_add_object(b, type, id,...)
Definition: builder.h:650
struct spa_ringbuffer ring
Definition: filter.c:70
unsigned int process_rt
Definition: filter.c:171
struct pw_properties * pw_properties_copy(const struct pw_properties *properties)
Copy a properties object.
Definition: properties.c:222
#define pw_loop_invoke(l,...)
Definition: src/pipewire/loop.h:63
int64_t delay
delay between position and hardware, positive for capture, negative for playback
Definition: io.h:143
void pw_proxy_add_listener(struct pw_proxy *proxy, struct spa_hook *listener, const struct pw_proxy_events *events, void *data)
Add an event listener to proxy.
Definition: proxy.c:195
const struct spa_type_info spa_type_param[]
Definition: param/type-info.h:46
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
void * priv
Definition: hook.h:301
unsigned long p
Definition: module-filter-chain.c:140
#define SPA_POD_SIZE(pod)
Definition: pod/pod.h:42
uint32_t buffer_id
a buffer id
Definition: io.h:100
uint32_t pw_filter_get_node_id(struct pw_filter *filter)
Get the node ID of the filter.
Definition: filter.c:1536
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
events from the spa_node.
Definition: build-12683127/doc/spa/node/node.h:156
int spa_process_latency_info_add(const struct spa_process_latency_info *process, struct spa_latency_info *info)
Definition: latency-utils.h:149
#define SPA_PORT_FLAG_CAN_ALLOC_BUFFERS
the port can allocate buffer data
Definition: build-12683127/doc/spa/node/node.h:103
struct spa_list link
Definition: filter.c:84
void * data
optional data pointer
Definition: buffer/buffer.h:88
void spa_hook_list_init(struct spa_hook_list *list)
Initialize a hook list to the empty list.
Definition: hook.h:305
unsigned int subscribe
Definition: filter.c:167
uint64_t change_mask
Definition: build-12683127/doc/spa/node/node.h:66
void spa_ringbuffer_init(struct spa_ringbuffer *rbuf)
Initialize a spa_ringbuffer with size.
Definition: ringbuffer.h:58
#define IDX_IO
Definition: filter.c:105
struct spa_pod value
Definition: pod/pod.h:212
uint32_t num
Definition: defs.h:105
enum pw_filter_state pw_filter_get_state(struct pw_filter *filter, const char **error)
Definition: filter.c:1392
#define spa_node_emit_info(hooks,...)
Definition: build-12683127/doc/spa/node/utils.h:131
#define SPA_POD_Id(val)
Definition: vararg.h:56
int spa_pod_is_object(const struct spa_pod *pod)
Definition: iter.h:381
#define SPA_UNLIKELY(x)
Definition: defs.h:235
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
@ SPA_PARAM_BUFFERS_align
alignment of data block memory (Int)
Definition: param.h:86
uint64_t nsec
time in nanoseconds against monotonic clock
Definition: io.h:139
struct buffer buffers[MAX_BUFFERS]
Definition: filter.c:114
#define pw_core_add_listener(c,...)
Definition: core.h:325
struct port * ports[2][MAX_PORTS]
Definition: filter.c:145
#define SPA_CALLBACKS_INIT(_funcs, _data)
Initialize the set of functions funcs as a spa_callbacks, together with _data.
Definition: hook.h:142
uint64_t incount
Definition: filter.c:71
enum spa_direction direction
Definition: buffers.c:46
const struct spa_dict * props
extra port properties
Definition: build-12683127/doc/spa/node/node.h:121
uint32_t flags
Definition: filter.c:65
struct spa_fraction rate
the rate of ticks and delay
Definition: stream.h:196
struct filter * filter
Definition: filter.c:91
@ SPA_PARAM_Buffers
buffer configurations as SPA_TYPE_OBJECT_ParamBuffers
Definition: param.h:49
#define pw_direction
The direction of a port.
Definition: port.h:56
struct spa_list param_list
Definition: filter.c:149
struct spa_io_position * position
Definition: filter.c:138
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
Definition: filter.c:1412
uint32_t n_buffers
Definition: filter.c:115
uint32_t id
Definition: filter.c:94
struct pw_context * context
Definition: filter.c:76
struct queue queued
Definition: filter.c:118
struct pw_time time
Definition: filter.c:159
#define SPA_NODE_CHANGE_MASK_FLAGS
Definition: build-12683127/doc/spa/node/node.h:63
Definition: properties.h:49
#define MAX_BUFFERS
Definition: filter.c:49
void spa_hook_list_clean(struct spa_hook_list *list)
Remove all hooks from the list.
Definition: hook.h:344
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
const char * pw_context_get_conf_section(struct pw_context *context, const char *section)
Get a config section for this context.
Definition: context.c:587
Core events.
Definition: core.h:114
uint64_t outcount
Definition: filter.c:72
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:68
#define spa_list_append(list, item)
Definition: list.h:81