PipeWire  0.1.4
pw_core Class Reference

the core PipeWire object More...

Collaboration diagram for pw_core:

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...
 
void 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_format **format_filters, char **error)
 Find a port to link with. More...
 
struct spa_format * 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_format **format_filters, char **error)
 Find a common format between two ports. More...
 
struct pw_node_factorypw_core_find_node_factory (struct pw_core *core, const char *name)
 Find a node by name. More...
 
struct pw_globalpw_core_add_global (struct pw_core *core, struct pw_client *owner, struct pw_global *parent, uint32_t type, uint32_t version, pw_bind_func_t bind, void *object)
 Create and add a new global to the core. More...
 

Data Fields

struct pw_globalglobal
 the global of the core More...
 
struct pw_core_info info
 info about the core More...
 
struct pw_propertiesproperties
 properties of the core More...
 
struct pw_type type
 type map and common types More...
 
pw_permission_func_t permission_func
 get permissions of an object More...
 
void * permission_data
 data passed to permission function More...
 
struct pw_map globals
 map of globals More...
 
struct spa_list protocol_list
 list of protocols More...
 
struct spa_list remote_list
 list of remote connections More...
 
struct spa_list resource_list
 list of core resources More...
 
struct spa_list registry_resource_list
 list of registry resources More...
 
struct spa_list module_list
 list of modules More...
 
struct spa_list global_list
 list of globals More...
 
struct spa_list client_list
 list of clients More...
 
struct spa_list node_list
 list of nodes More...
 
struct spa_list node_factory_list
 list of node factories More...
 
struct spa_list link_list
 list of links More...
 
struct spa_hook_list listener_list
 
struct pw_loopmain_loop
 main loop for control More...
 
struct pw_loopdata_loop
 data loop for data passing More...
 
struct pw_data_loopdata_loop_impl
 
struct spa_support support [4]
 support for spa plugins More...
 
uint32_t n_support
 number of support items More...
 
struct {
   struct spa_graph   graph
 
rt
 

Detailed Description

the core PipeWire object

The server core object manages all resources available on the server.

See Server API

Member Function Documentation

◆ pw_core_add_global()

struct pw_global * pw_core_add_global ( struct pw_core core,
struct pw_client owner,
struct pw_global parent,
uint32_t  type,
uint32_t  version,
pw_bind_func_t  bind,
void *  object 
)

Create and add a new global to the core.

Parameters
corea core
owneran optional owner of the global
typethe type of the global
n_ifacesnumber of interfaces
ifacesinterface information
objectthe associated object
binda function to bind to this global
[out]globala result global
Returns
true on success

References pw_resource::client, pw_resource::core, pw_client::global, global, global_list, globals, pw_global::id, pw_global::link, pw_resource::link, listener_list, pw_type::map, pw_resource::permissions, pw_global_get_permissions(), PW_PERM_IS_R, pw_registry_resource_global, registry_resource_list, pw_global::type, type, pw_resource::type, pw_global::version, and pw_resource::version.

Referenced by pw_node_factory_export().

◆ pw_core_destroy()

void pw_core_destroy ( struct pw_core core)

◆ pw_core_find_format()

struct spa_format * 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_format **  format_filters,
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_node::info, pw_port::node, PW_NODE_STATE_IDLE, pw_port_enum_formats(), pw_port_get_format(), PW_PORT_STATE_CONFIGURE, pw_node_info::state, and pw_port::state.

◆ pw_core_find_node_factory()

struct pw_node_factory * pw_core_find_node_factory ( struct pw_core core,
const char *  name 
)

Find a node by name.

Parameters
corethe core object
namethe name of the node to find

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

References pw_node_factory::link, pw_node_factory::name, and node_factory_list.

◆ 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_format **  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_port::direction, pw_node::global, pw_global::id, pw_node::link, pw_port::node, node_list, pw_core_find_format(), PW_DIRECTION_OUTPUT, pw_direction_reverse(), and pw_node_get_free_port().

◆ pw_core_new()

◆ pw_core_update_properties()

void 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_info::change_mask, pw_properties::dict, info, pw_resource::link, listener_list, properties, pw_core_info::props, PW_CORE_CHANGE_MASK_PROPS, pw_core_resource_info, pw_properties_set(), and resource_list.

Field Documentation

◆ client_list

struct spa_list pw_core::client_list

list of clients

Referenced by pw_client::pw_client_new(), and pw_core_new().

◆ data_loop

struct pw_loop* pw_core::data_loop

data loop for data passing

Referenced by pw_core_new(), and pw_node_new().

◆ data_loop_impl

struct pw_data_loop* pw_core::data_loop_impl

Referenced by pw_core_destroy(), and pw_core_new().

◆ global

struct pw_global* pw_core::global

the global of the core

Referenced by pw_core_add_global(), and pw_core_get_global().

◆ global_list

struct spa_list pw_core::global_list

◆ globals

◆ graph

struct spa_graph pw_core::graph

Referenced by pw_node_new().

◆ info

◆ link_list

struct spa_list pw_core::link_list

list of links

Referenced by pw_core_new(), and pw_link_new().

◆ listener_list

◆ main_loop

struct pw_loop* pw_core::main_loop

main loop for control

Referenced by pw_core_get_main_loop(), pw_core_new(), pw_link_new(), and pw_node_new().

◆ module_list

struct spa_list pw_core::module_list

list of modules

Referenced by pw_core_destroy(), pw_core_find_module(), and pw_core_new().

◆ n_support

uint32_t pw_core::n_support

number of support items

Referenced by pw_core_get_support(), and pw_core_new().

◆ node_factory_list

struct spa_list pw_core::node_factory_list

list of node factories

Referenced by pw_core_find_node_factory(), pw_core_new(), and pw_node_factory_export().

◆ node_list

struct spa_list pw_core::node_list

list of nodes

Referenced by pw_core_find_port(), and pw_core_new().

◆ permission_data

void* pw_core::permission_data

data passed to permission function

Referenced by pw_core_set_permission_callback(), and pw_global_get_permissions().

◆ permission_func

pw_permission_func_t pw_core::permission_func

get permissions of an object

Referenced by pw_core_set_permission_callback(), and pw_global_get_permissions().

◆ properties

◆ protocol_list

struct spa_list pw_core::protocol_list

list of protocols

Referenced by pw_core_find_protocol(), pw_core_new(), and pw_protocol_new().

◆ registry_resource_list

struct spa_list pw_core::registry_resource_list

list of registry resources

Referenced by pw_core_add_global(), pw_core_new(), and pw_global::pw_global_destroy().

◆ remote_list

struct spa_list pw_core::remote_list

list of remote connections

Referenced by pw_core_new(), and pw_remote_new().

◆ resource_list

struct spa_list pw_core::resource_list

list of core resources

Referenced by pw_core_new(), and pw_core_update_properties().

◆ rt

struct { ... } pw_core::rt

Referenced by pw_core_new(), and pw_node_new().

◆ support

struct spa_support pw_core::support[4]

support for spa plugins

Referenced by pw_core_get_support(), and pw_core_new().

◆ type


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