PipeWire  0.2.7
pw_core Class Reference

the core PipeWire object More...

Public Member Functions

SPA_EXPORT struct pw_corepw_core_new (struct pw_loop *main_loop, struct pw_properties *properties)
 Create a new core object. More...
 
SPA_EXPORT void pw_core_destroy (struct pw_core *core)
 Destroy a core object. More...
 
SPA_EXPORT int pw_core_update_properties (struct pw_core *core, const struct spa_dict *dict)
 Update core properties. More...
 
struct pw_portpw_core_find_port (struct pw_core *core, struct pw_port *other_port, uint32_t id, struct pw_properties *props, uint32_t n_format_filters, struct spa_pod **format_filters, char **error)
 Find a port to link with. More...
 
int pw_core_find_format (struct pw_core *core, struct pw_port *output, struct pw_port *input, struct pw_properties *props, uint32_t n_format_filters, struct spa_pod **format_filters, struct spa_pod **format, struct spa_pod_builder *builder, char **error)
 Find a common format between two ports. More...
 
SPA_EXPORT struct pw_factorypw_core_find_factory (struct pw_core *core, const char *name)
 Find a factory by name. More...
 

Detailed Description

the core PipeWire object

The core object manages all available resources.

See Core API

Member Function Documentation

SPA_EXPORT struct pw_factory * pw_core_find_factory ( struct pw_core core,
const char *  name 
)

Find a factory by name.

Parameters
corethe core object
namethe name of the factory to find

Find in the list of factories registered in core for one with the given name.

int pw_core_find_format ( struct pw_core core,
struct pw_port output,
struct pw_port input,
struct pw_properties props,
uint32_t  n_format_filters,
struct spa_pod **  format_filters,
struct spa_pod **  format,
struct spa_pod_builder *  builder,
char **  error 
)

Find a common format between two ports.

Parameters
corea core object
outputan output port
inputan input port
propsextra properties
n_format_filtersnumber of format filters
format_filtersarray of format filters
[out]erroran error when something is wrong
Returns
a common format of NULL on error

Find a common format between the given ports. The format will be restricted to a subset given with the format filters.

References pw_type::param, pw_log::pw_log_debug(), pw_log::pw_log_level_enabled, PW_NODE_STATE_IDLE, and PW_PORT_STATE_CONFIGURE.

Referenced by pw_core_find_port().

struct pw_port * pw_core_find_port ( struct pw_core core,
struct pw_port other_port,
uint32_t  id,
struct pw_properties props,
uint32_t  n_format_filters,
struct spa_pod **  format_filters,
char **  error 
)

Find a port to link with.

Parameters
corea core
other_porta port to find a link with
idthe id of a port or SPA_ID_INVALID
propsextra properties
n_format_filtersnumber of filters
format_filtersarray of format filters
[out]erroran error when something is wrong
Returns
a port that can be used to link to otherport or NULL on error

References pw_core_find_format(), PW_DIRECTION_OUTPUT, pw_pipewire::pw_direction_reverse(), pw_global_get_permissions(), pw_log::pw_log_debug(), pw_node::pw_node_get_free_port(), and PW_PERM_IS_R.

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

Update core properties.

Parameters
corea core
dictproperties to update

Update the core object with the given properties

References PW_CORE_CHANGE_MASK_PROPS, pw_core_resource_info, pw_log::pw_log_debug(), and pw_properties::pw_properties_set().


The documentation for this class was generated from the following files: