PipeWire  0.2.0
pw_core Class Reference

the core PipeWire object More...

Public Member Functions

struct pw_corepw_core_new (struct pw_loop *main_loop, struct pw_properties *properties)
 Create a new core object. More...
 
void pw_core_destroy (struct pw_core *core)
 Destroy a core object. More...
 
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...
 
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

◆ pw_core_destroy()

◆ pw_core_find_factory()

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.

◆ pw_core_find_format()

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::core, 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().

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

◆ pw_core_new()

◆ pw_core_update_properties()

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, and pw_properties::pw_properties_set().


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