5#ifndef PIPEWIRE_DEVICE_H 
    6#define PIPEWIRE_DEVICE_H 
   26#define PW_TYPE_INTERFACE_Device        PW_TYPE_INFO_INTERFACE_BASE "Device" 
   28#define PW_DEVICE_PERM_MASK             PW_PERM_RWXM 
   30#define PW_VERSION_DEVICE               3 
   33#ifndef PW_API_DEVICE_IMPL 
   34#define PW_API_DEVICE_IMPL static inline 
   40#define PW_DEVICE_CHANGE_MASK_PROPS     (1 << 0) 
   41#define PW_DEVICE_CHANGE_MASK_PARAMS    (1 << 1) 
   42#define PW_DEVICE_CHANGE_MASK_ALL       ((1 << 2)-1) 
   60#define PW_DEVICE_EVENT_INFO    0 
   61#define PW_DEVICE_EVENT_PARAM   1 
   62#define PW_DEVICE_EVENT_NUM     2 
   66#define PW_VERSION_DEVICE_EVENTS        0 
   86                      uint32_t 
id, uint32_t index, uint32_t next,
 
   91#define PW_DEVICE_METHOD_ADD_LISTENER           0 
   92#define PW_DEVICE_METHOD_SUBSCRIBE_PARAMS       1 
   93#define PW_DEVICE_METHOD_ENUM_PARAMS            2 
   94#define PW_DEVICE_METHOD_SET_PARAM              3 
   95#define PW_DEVICE_METHOD_NUM                    4 
   99#define PW_VERSION_DEVICE_METHODS       0 
 
  133        int (*
enum_params) (
void *object, 
int seq, uint32_t 
id, uint32_t start, uint32_t num,
 
  144        int (*
set_param) (
void *object, uint32_t 
id, uint32_t flags,
 
  157                        listener, events, data);
 
 
  170                int seq, uint32_t 
id, uint32_t start, uint32_t num,
 
  175                        seq, 
id, start, num, filter);
 
 
uint32_t int seq
Definition core.h:432
uint32_t id
Definition core.h:432
PW_API_DEVICE_IMPL int pw_device_add_listener(struct pw_device *object, struct spa_hook *listener, const struct pw_device_events *events, void *data)
Definition device.h:172
PW_API_DEVICE_IMPL int pw_device_subscribe_params(struct pw_device *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition device.h:183
void pw_device_info_free(struct pw_device_info *info)
Free a pw_device_info.
Definition introspect.c:471
PW_API_DEVICE_IMPL int pw_device_enum_params(struct pw_device *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate device parameters.
Definition device.h:191
struct pw_device_info * pw_device_info_merge(struct pw_device_info *info, const struct pw_device_info *update, bool reset)
Merge and existing pw_device_info with update.
Definition introspect.c:409
PW_API_DEVICE_IMPL int pw_device_set_param(struct pw_device *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the device.
Definition device.h:201
struct pw_device_info * pw_device_info_update(struct pw_device_info *info, const struct pw_device_info *update)
Update and existing pw_device_info with update and reset.
Definition introspect.c:464
#define PW_API_DEVICE_IMPL
Definition device.h:43
#define spa_api_method_r(rtype, def, type, o, method, version,...)
Definition hook.h:291
Device events.
Definition device.h:80
uint32_t version
Definition device.h:83
void(* param)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a device param.
Definition device.h:101
The device information.
Definition device.h:47
uint64_t change_mask
bitfield of changed fields since last call
Definition device.h:55
uint32_t n_params
number of items in params
Definition device.h:58
struct spa_param_info * params
parameters
Definition device.h:57
Device methods.
Definition device.h:119
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition device.h:139
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate device parameters.
Definition device.h:155
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the device.
Definition device.h:166
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_device_events *events, void *data)
Definition device.h:124
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427
information about a parameter
Definition param.h:51