PipeWire: core.c File Reference

PipeWire 0.2.7

Macros | Functions
core.c File Reference
Include dependency graph for core.c:

## Macros
#define | spa_debug pw_log_trace

## Functions
SPA_EXPORT const struct pw_core_info * | pw_core_get_info (struct pw_core *core)
| Get the core info object. More...
SPA_EXPORT struct pw_global * | pw_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 struct pw_type * | pw_core_get_type (struct pw_core *core)
| Get the type object of 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_loop * | pw_core_get_main_loop (struct pw_core *core)
| get the core main loop More...
SPA_EXPORT const struct pw_properties * | pw_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_global * | pw_core_find_global (struct pw_core *core, uint32_t id)
| Find a core global by id. More...

## Macro Definition Documentation

## ◆ spa_debug

#define spa_debug pw_log_trace

## 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_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

  core | the core
  id | the global id

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

## ◆ 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

  core | the 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.

## ◆ pw_core_get_type()

SPA_EXPORT struct pw_type* pw_core_get_type | ( | struct pw_core * | core | ) |

Get the type object of a core.

References pw_type::core.