PipeWire  0.3.32
core.h File Reference

Go to the source code of this file.

Data Structures

struct  pw_core_info
 The core information. More...
 
struct  pw_core_events
 Core events. More...
 
struct  pw_core_methods
 Core methods. More...
 
struct  pw_registry_events
 Registry events. More...
 
struct  pw_registry_methods
 Registry methods. More...
 

Macros

#define PW_TYPE_INTERFACE_Core   PW_TYPE_INFO_INTERFACE_BASE "Core"
 
#define PW_TYPE_INTERFACE_Registry   PW_TYPE_INFO_INTERFACE_BASE "Registry"
 
#define PW_VERSION_CORE   3
 
#define PW_VERSION_REGISTRY   3
 
#define PW_DEFAULT_REMOTE   "pipewire-0"
 
#define PW_ID_CORE   0
 
#define PW_ID_ANY   (uint32_t)(0xffffffff)
 
#define PW_CORE_CHANGE_MASK_PROPS   (1 << 0)
 
#define PW_CORE_CHANGE_MASK_ALL   ((1 << 1)-1)
 
#define PW_CORE_EVENT_INFO   0
 Core. More...
 
#define PW_CORE_EVENT_DONE   1
 
#define PW_CORE_EVENT_PING   2
 
#define PW_CORE_EVENT_ERROR   3
 
#define PW_CORE_EVENT_REMOVE_ID   4
 
#define PW_CORE_EVENT_BOUND_ID   5
 
#define PW_CORE_EVENT_ADD_MEM   6
 
#define PW_CORE_EVENT_REMOVE_MEM   7
 
#define PW_CORE_EVENT_NUM   8
 
#define PW_VERSION_CORE_EVENTS   0
 
#define PW_CORE_METHOD_ADD_LISTENER   0
 
#define PW_CORE_METHOD_HELLO   1
 
#define PW_CORE_METHOD_SYNC   2
 
#define PW_CORE_METHOD_PONG   3
 
#define PW_CORE_METHOD_ERROR   4
 
#define PW_CORE_METHOD_GET_REGISTRY   5
 
#define PW_CORE_METHOD_CREATE_OBJECT   6
 
#define PW_CORE_METHOD_DESTROY   7
 
#define PW_CORE_METHOD_NUM   8
 
#define PW_VERSION_CORE_METHODS   0
 
#define pw_core_method(o, method, version, ...)
 
#define pw_core_add_listener(c, ...)   pw_core_method(c,add_listener,0,__VA_ARGS__)
 
#define pw_core_hello(c, ...)   pw_core_method(c,hello,0,__VA_ARGS__)
 
#define pw_core_sync(c, ...)   pw_core_method(c,sync,0,__VA_ARGS__)
 
#define pw_core_pong(c, ...)   pw_core_method(c,pong,0,__VA_ARGS__)
 
#define pw_core_error(c, ...)   pw_core_method(c,error,0,__VA_ARGS__)
 
#define pw_core_destroy(c, ...)   pw_core_method(c,destroy,0,__VA_ARGS__)
 
#define PW_REGISTRY_EVENT_GLOBAL   0
 
#define PW_REGISTRY_EVENT_GLOBAL_REMOVE   1
 
#define PW_REGISTRY_EVENT_NUM   2
 
#define PW_VERSION_REGISTRY_EVENTS   0
 
#define PW_REGISTRY_METHOD_ADD_LISTENER   0
 
#define PW_REGISTRY_METHOD_BIND   1
 
#define PW_REGISTRY_METHOD_DESTROY   2
 
#define PW_REGISTRY_METHOD_NUM   3
 
#define PW_VERSION_REGISTRY_METHODS   0
 
#define pw_registry_method(o, method, version, ...)
 
#define pw_registry_add_listener(p, ...)   pw_registry_method(p,add_listener,0,__VA_ARGS__)
 Registry. More...
 
#define pw_registry_destroy(p, ...)   pw_registry_method(p,destroy,0,__VA_ARGS__)
 

Functions

struct pw_core_infopw_core_info_update (struct pw_core_info *info, const struct pw_core_info *update)
 Update and existing pw_core_info with update. More...
 
void pw_core_info_free (struct pw_core_info *info)
 Free a pw_core_info
More...
 
 vsnprintf (buffer, sizeof(buffer), message, args)
 
return pw_core_error (core, id, seq, res, buffer)
 
 va_start (args, message)
 
 va_end (args)
 
struct pw_core * pw_context_connect (struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
 Connect to a PipeWire instance. More...
 
struct pw_core * pw_context_connect_fd (struct pw_context *context, int fd, struct pw_properties *properties, size_t user_data_size)
 Connect to a PipeWire instance on the given socket. More...
 
struct pw_core * pw_context_connect_self (struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
 Connect to a given PipeWire instance. More...
 
int pw_core_steal_fd (struct pw_core *core)
 Steal the fd of the core connection or < 0 on error. More...
 
int pw_core_set_paused (struct pw_core *core, bool paused)
 Pause or resume the core. More...
 
int pw_core_disconnect (struct pw_core *core)
 disconnect and destroy a core More...
 
void * pw_core_get_user_data (struct pw_core *core)
 Get the user_data. More...
 
struct pw_client * pw_core_get_client (struct pw_core *core)
 Get the client proxy of the connected core. More...
 
struct pw_context * pw_core_get_context (struct pw_core *core)
 Get the context object used to created this core. More...
 
const struct pw_propertiespw_core_get_properties (struct pw_core *core)
 Get properties from the core. More...
 
int pw_core_update_properties (struct pw_core *core, const struct spa_dict *dict)
 Update the core properties. More...
 
struct pw_mempoolpw_core_get_mempool (struct pw_core *core)
 Get the core mempool object. More...
 
struct pw_proxy * pw_core_find_proxy (struct pw_core *core, uint32_t id)
 Get the proxy with the given id. More...
 
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. More...
 

Variables

static uint32_t id
 
static uint32_t int seq
 
static uint32_t int int res
 
static uint32_t int int const char * message
 
static uint32_t int int const char va_list args
 
 buffer [1023] = '\0'
 
static uint32_t int int const char int r
 

Macro Definition Documentation

◆ PW_CORE_CHANGE_MASK_ALL

#define PW_CORE_CHANGE_MASK_ALL   ((1 << 1)-1)

◆ PW_CORE_CHANGE_MASK_PROPS

#define PW_CORE_CHANGE_MASK_PROPS   (1 << 0)

◆ PW_VERSION_CORE_EVENTS

#define PW_VERSION_CORE_EVENTS   0

◆ PW_VERSION_CORE_METHODS

#define PW_VERSION_CORE_METHODS   0

◆ PW_VERSION_REGISTRY_EVENTS

#define PW_VERSION_REGISTRY_EVENTS   0

◆ PW_VERSION_REGISTRY_METHODS

#define PW_VERSION_REGISTRY_METHODS   0