PipeWire  0.3.27
core.c File Reference

Macros

#define NAME   "core"
 

Functions

SPA_EXPORT struct pw_contextpw_core_get_context (struct pw_core *core)
 Get the context object used to created this core. More...
 
SPA_EXPORT const struct pw_propertiespw_core_get_properties (struct pw_core *core)
 Get properties from the core. More...
 
SPA_EXPORT int pw_core_update_properties (struct pw_core *core, const struct spa_dict *dict)
 Update the core properties. More...
 
SPA_EXPORT void * pw_core_get_user_data (struct pw_core *core)
 Get the user_data. More...
 
SPA_EXPORT struct pw_client * pw_core_get_client (struct pw_core *core)
 Get the client proxy of the connected core. More...
 
SPA_EXPORT struct pw_proxypw_core_find_proxy (struct pw_core *core, uint32_t id)
 Get the proxy with the given id. More...
 
SPA_EXPORT struct pw_proxypw_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...
 
SPA_EXPORT struct pw_core * pw_context_connect (struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
 
SPA_EXPORT struct pw_core * pw_context_connect_fd (struct pw_context *context, int fd, struct pw_properties *properties, size_t user_data_size)
 
SPA_EXPORT struct pw_core * pw_context_connect_self (struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
 
SPA_EXPORT int pw_core_steal_fd (struct pw_core *core)
 Steal the fd of the core connection or < 0 on error. More...
 
SPA_EXPORT int pw_core_set_paused (struct pw_core *core, bool paused)
 Pause or resume the core. More...
 
SPA_EXPORT struct pw_mempoolpw_core_get_mempool (struct pw_core *core)
 Get the core mempool object. More...
 
SPA_EXPORT int pw_core_disconnect (struct pw_core *core)
 disconnect and destroy a core More...
 

Macro Definition Documentation

◆ NAME

#define NAME   "core"

Function Documentation

◆ pw_context_connect()

SPA_EXPORT struct pw_core* pw_context_connect ( struct pw_context context,
struct pw_properties properties,
size_t  user_data_size 
)

References res.

Referenced by pw_context_connect_self().

◆ pw_context_connect_fd()

SPA_EXPORT struct pw_core* pw_context_connect_fd ( struct pw_context context,
int  fd,
struct pw_properties properties,
size_t  user_data_size 
)

References res.

◆ pw_context_connect_self()

SPA_EXPORT struct pw_core* pw_context_connect_self ( struct pw_context context,
struct pw_properties properties,
size_t  user_data_size 
)

◆ pw_core_disconnect()

SPA_EXPORT int pw_core_disconnect ( struct pw_core *  core)

disconnect and destroy a core

References NAME, pw_log::pw_log_debug, pw_proxy::pw_proxy_destroy(), and pw_proxy_remove().

Referenced by pw_filter_disconnect(), and pw_stream_disconnect().

◆ pw_core_export()

SPA_EXPORT 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.

Parameters
corethe core
typethe type of object
propsextra properties
objectobject to export
user_data_sizeextra user data

References pw_export_type::func, NAME, pw_context_find_export_type(), pw_log::pw_log_debug, pw_log::pw_log_error, res, and pw_export_type::type.

◆ pw_core_find_proxy()

SPA_EXPORT struct pw_proxy* pw_core_find_proxy ( struct pw_core *  core,
uint32_t  id 
)

Get the proxy with the given id.

References pw_map::pw_map_lookup().

◆ pw_core_get_client()

SPA_EXPORT struct pw_client* pw_core_get_client ( struct pw_core *  core)

Get the client proxy of the connected core.

This will have the id of PW_ID_CLIENT (1)

◆ pw_core_get_context()

SPA_EXPORT struct pw_context* pw_core_get_context ( struct pw_core *  core)

Get the context object used to created this core.

◆ pw_core_get_mempool()

SPA_EXPORT struct pw_mempool* pw_core_get_mempool ( struct pw_core *  core)

Get the core mempool object.

◆ pw_core_get_properties()

SPA_EXPORT const struct pw_properties* pw_core_get_properties ( struct pw_core *  core)

Get properties from the core.

◆ pw_core_get_user_data()

SPA_EXPORT void* pw_core_get_user_data ( struct pw_core *  core)

Get the user_data.

It is of the size specified when this object was constructed

◆ pw_core_set_paused()

SPA_EXPORT int pw_core_set_paused ( struct pw_core *  core,
bool  paused 
)

Pause or resume the core.

When the core is paused, no new events will be dispatched until the core is resumed again.

References NAME, pw_log::pw_log_debug, and pw_protocol_client_set_paused.

◆ pw_core_steal_fd()

SPA_EXPORT int pw_core_steal_fd ( struct pw_core *  core)

Steal the fd of the core connection or < 0 on error.

The core will be disconnected after this call.

References NAME, pw_log::pw_log_debug, and pw_protocol_client_steal_fd.

◆ pw_core_update_properties()

SPA_EXPORT int pw_core_update_properties ( struct pw_core *  core,
const struct spa_dict dict 
)

Update the core properties.

This updates the properties of the associated client.

Returns
the number of properties that were updated

References pw_properties::dict, NAME, pw_client_update_properties, pw_log::pw_log_debug, and pw_properties::pw_properties_update().