PipeWire
0.3.59
|
Data Fields | |
uint32_t | version |
int(* | add_listener )(void *object, struct spa_hook *listener, const struct spa_device_events *events, void *data) |
Set events to receive asynchronous notifications from the device. More... | |
int(* | sync )(void *object, int seq) |
Perform a sync operation. More... | |
int(* | enum_params )(void *object, int seq, uint32_t id, uint32_t index, uint32_t max, const struct spa_pod *filter) |
Enumerate the parameters of a device. More... | |
int(* | set_param )(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param) |
Set the configurable parameter in device. More... | |
uint32_t spa_device_methods::version |
int(* spa_device_methods::add_listener) (void *object, struct spa_hook *listener, const struct spa_device_events *events, void *data) |
Set events to receive asynchronous notifications from the device.
Setting the events will trigger the info event and an object_info event for each managed object on the new listener.
object | a Device |
listener | a listener |
events | a struct spa_device_events |
data | data passed as first argument in functions of events |
int(* spa_device_methods::sync) (void *object, int seq) |
Perform a sync operation.
This method will emit the result event with the given sequence number synchronously or with the returned async return value asynchronously.
Because all methods are serialized in the device, this can be used to wait for completion of all previous method calls.
seq | a sequence number |
int(* spa_device_methods::enum_params) (void *object, int seq, uint32_t id, uint32_t index, uint32_t max, const struct spa_pod *filter) |
Enumerate the parameters of a device.
Parameters are identified with an id. Some parameters can have multiple values, see the documentation of the parameter id.
Parameters can be filtered by passing a non-NULL filter.
The result callback will be called at most max times with a struct spa_result_device_params as the result.
This function must be called from the main thread.
device | a Device |
seq | a sequence number to pass to the result function |
id | the param id to enumerate |
index | the index of enumeration, pass 0 for the first item. |
max | the maximum number of items to iterate |
filter | and optional filter to use |
int(* spa_device_methods::set_param) (void *object, uint32_t id, uint32_t flags, const struct spa_pod *param) |
Set the configurable parameter in device.
Usually, param will be obtained from enum_params and then modified but it is also possible to set another spa_pod as long as its keys and types match a supported object.
Objects with property keys that are not known are ignored.
This function must be called from the main thread.
object | Device |
id | the parameter id to configure |
flags | additional flags |
param | the parameter to configure |