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

Functions

SPA_EXPORT void * pw_core_get_user_data (struct pw_core *core)
 Get the core user data. More...
 
SPA_EXPORT const struct pw_core_infopw_core_get_info (struct pw_core *core)
 Get the core info object. More...
 
SPA_EXPORT struct pw_globalpw_core_get_global (struct pw_core *core)
 Get the core global object. More...
 
SPA_EXPORT void pw_core_add_listener (struct pw_core *core, struct spa_hook *listener, const struct pw_core_events *events, void *data)
 Add a new event listener to a core. More...
 
SPA_EXPORT const struct spa_support * pw_core_get_support (struct pw_core *core, uint32_t *n_support)
 Get the core support objects. More...
 
SPA_EXPORT struct pw_looppw_core_get_main_loop (struct pw_core *core)
 get the core main loop More...
 
SPA_EXPORT const struct pw_propertiespw_core_get_properties (struct pw_core *core)
 Get the core properties. More...
 
SPA_EXPORT int pw_core_for_each_global (struct pw_core *core, int(*callback)(void *data, struct pw_global *global), void *data)
 Iterate the globals of the core. More...
 
SPA_EXPORT struct pw_globalpw_core_find_global (struct pw_core *core, uint32_t id)
 Find a core global by id. More...
 
int pw_core_recalc_graph (struct pw_core *core)
 
SPA_EXPORT int pw_core_add_spa_lib (struct pw_core *core, const char *factory_regexp, const char *lib)
 add a spa library for the given factory_name regex More...
 
SPA_EXPORT const char * pw_core_find_spa_lib (struct pw_core *core, const char *factory_name)
 find the library name for a spa factory More...
 
SPA_EXPORT struct spa_handle * pw_core_load_spa_handle (struct pw_core *core, const char *factory_name, const struct spa_dict *info)
 

Function Documentation

◆ pw_core_add_listener()

SPA_EXPORT void pw_core_add_listener ( struct pw_core core,
struct spa_hook *  listener,
const struct pw_core_events events,
void *  data 
)

Add a new event listener to a core.

◆ pw_core_add_spa_lib()

SPA_EXPORT int pw_core_add_spa_lib ( struct pw_core core,
const char *  factory_regexp,
const char *  lib 
)

add a spa library for the given factory_name regex

References pw_array::pw_array_add(), pw_array_remove, pw_log::pw_log_debug, and pw_log::pw_log_error.

◆ pw_core_find_global()

SPA_EXPORT struct pw_global* pw_core_find_global ( struct pw_core core,
uint32_t  id 
)

Find a core global by id.

Parameters
corethe core
idthe global id

References pw_global_get_permissions(), pw_map::pw_map_lookup(), and PW_PERM_IS_R.

Referenced by pw_client_update_permissions().

Here is the caller graph for this function:

◆ pw_core_find_spa_lib()

SPA_EXPORT const char* pw_core_find_spa_lib ( struct pw_core core,
const char *  factory_name 
)

find the library name for a spa factory

References pw_array_for_each.

Referenced by pw_core_load_spa_handle().

Here is the caller graph for this function:

◆ pw_core_for_each_global()

SPA_EXPORT int pw_core_for_each_global ( struct pw_core core,
int(*)(void *data, struct pw_global *global)  callback,
void *  data 
)

Iterate the globals of the core.

The callback should return 0 to fetch the next item, any other value stops the iteration and returns the value. When all callbacks return 0, this function returns 0 when all globals are iterated.

Parameters
corethe core

References pw_global_get_permissions(), and PW_PERM_IS_R.

◆ pw_core_get_global()

SPA_EXPORT struct pw_global* pw_core_get_global ( struct pw_core core)

Get the core global object.

◆ pw_core_get_info()

SPA_EXPORT const struct pw_core_info* pw_core_get_info ( struct pw_core core)

Get the core info object.

◆ pw_core_get_main_loop()

SPA_EXPORT struct pw_loop* pw_core_get_main_loop ( struct pw_core core)

get the core main loop

◆ pw_core_get_properties()

SPA_EXPORT const struct pw_properties* pw_core_get_properties ( struct pw_core core)

Get the core properties.

◆ pw_core_get_support()

SPA_EXPORT const struct spa_support* pw_core_get_support ( struct pw_core core,
uint32_t *  n_support 
)

Get the core support objects.

Referenced by pw_core_load_spa_handle().

Here is the caller graph for this function:

◆ pw_core_get_user_data()

SPA_EXPORT void* pw_core_get_user_data ( struct pw_core core)

Get the core user data.

◆ pw_core_load_spa_handle()

SPA_EXPORT struct spa_handle* pw_core_load_spa_handle ( struct pw_core core,
const char *  factory_name,
const struct spa_dict *  info 
)

◆ pw_core_recalc_graph()

int pw_core_recalc_graph ( struct pw_core core)