PipeWire  0.2.9
device.c File Reference
Include dependency graph for device.c:

Data Structures

struct  impl
struct  result_device_params_data
struct  resource_data
struct  node_data


#define NAME   "device"
#define pw_device_resource(r, m, v, ...)   pw_resource_call(r,struct pw_device_proxy_events,m,v,__VA_ARGS__)
#define pw_device_resource_info(r, ...)   pw_device_resource(r,info,0,__VA_ARGS__)
#define pw_device_resource_param(r, ...)   pw_device_resource(r,param,0,__VA_ARGS__)


SPA_EXPORT struct pw_devicepw_device_new (struct pw_core *core, const char *name, struct pw_properties *properties, size_t user_data_size)
SPA_EXPORT void pw_device_destroy (struct pw_device *device)
SPA_EXPORT int pw_device_for_each_param (struct pw_device *device, int seq, uint32_t param_id, uint32_t index, uint32_t max, const struct spa_pod *filter, int(*callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param), void *data)
SPA_EXPORT int pw_device_register (struct pw_device *device, struct pw_client *owner, struct pw_global *parent, struct pw_properties *properties)
SPA_EXPORT int pw_device_set_implementation (struct pw_device *device, struct spa_device *spa_device)
 Set the device implementation. More...
SPA_EXPORT struct spa_device * pw_device_get_implementation (struct pw_device *device)
 Get the device implementation. More...
SPA_EXPORT const struct pw_propertiespw_device_get_properties (struct pw_device *device)
SPA_EXPORT int pw_device_update_properties (struct pw_device *device, const struct spa_dict *dict)
SPA_EXPORT void * pw_device_get_user_data (struct pw_device *device)
SPA_EXPORT struct pw_globalpw_device_get_global (struct pw_device *device)
 Get the global of this device. More...
SPA_EXPORT void pw_device_add_listener (struct pw_device *device, struct spa_hook *listener, const struct pw_device_events *events, void *data)
 Add an event listener. More...

Macro Definition Documentation


#define NAME   "device"

◆ pw_device_resource

#define pw_device_resource (   r,
)    pw_resource_call(r,struct pw_device_proxy_events,m,v,__VA_ARGS__)

◆ pw_device_resource_info

#define pw_device_resource_info (   r,
)    pw_device_resource(r,info,0,__VA_ARGS__)

◆ pw_device_resource_param

#define pw_device_resource_param (   r,
)    pw_device_resource(r,param,0,__VA_ARGS__)

Function Documentation

◆ pw_device_add_listener()

SPA_EXPORT void pw_device_add_listener ( struct pw_device device,
struct spa_hook *  listener,
const struct pw_device_events events,
void *  data 

Add an event listener.

◆ pw_device_destroy()

SPA_EXPORT void pw_device_destroy ( struct pw_device device)

◆ pw_device_for_each_param()

SPA_EXPORT int pw_device_for_each_param ( struct pw_device device,
int  seq,
uint32_t  param_id,
uint32_t  index,
uint32_t  max,
const struct spa_pod *  filter,
int(*)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param callback,
void *  data 

◆ pw_device_get_global()

SPA_EXPORT struct pw_global* pw_device_get_global ( struct pw_device device)

Get the global of this device.

◆ pw_device_get_implementation()

SPA_EXPORT struct spa_device* pw_device_get_implementation ( struct pw_device device)

Get the device implementation.

◆ pw_device_get_properties()

SPA_EXPORT const struct pw_properties* pw_device_get_properties ( struct pw_device device)

◆ pw_device_get_user_data()

SPA_EXPORT void* pw_device_get_user_data ( struct pw_device device)

◆ pw_device_new()

SPA_EXPORT struct pw_device* pw_device_new ( struct pw_core core,
const char *  name,
struct pw_properties properties,
size_t  user_data_size 

◆ pw_device_register()

◆ pw_device_set_implementation()

SPA_EXPORT int pw_device_set_implementation ( struct pw_device device,
struct spa_device *  spa_device 

Set the device implementation.

References NAME, pw_log::pw_log_debug, and pw_log::pw_log_error.

◆ pw_device_update_properties()

SPA_EXPORT int pw_device_update_properties ( struct pw_device device,
const struct spa_dict *  dict