PipeWire
0.1.4
|
the core PipeWire object More...
Public Member Functions | |
struct pw_core * | pw_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_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. 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_factory * | pw_core_find_node_factory (struct pw_core *core, const char *name) |
Find a node by name. More... | |
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. More... | |
Data Fields | |
struct pw_global * | global |
the global of the core More... | |
struct pw_core_info | info |
info about the core More... | |
struct pw_properties * | properties |
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_loop * | main_loop |
main loop for control More... | |
struct pw_loop * | data_loop |
data loop for data passing More... | |
struct pw_data_loop * | data_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 |
the core PipeWire object
The server core object manages all resources available on the server.
See Server API
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.
core | a core | |
owner | an optional owner of the global | |
type | the type of the global | |
n_ifaces | number of interfaces | |
ifaces | interface information | |
object | the associated object | |
bind | a function to bind to this global | |
[out] | global | a result global |
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().
void pw_core_destroy | ( | struct pw_core * | core | ) |
Destroy a core object.
core | a core to destroy |
References data_loop_impl, global_list, globals, pw_module::link, listener_list, module_list, properties, pw_data_loop_destroy(), pw_global_destroy(), pw_module_destroy(), and pw_properties_free().
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.
core | a core object | |
output | an output port | |
input | an input port | |
props | extra properties | |
n_format_filters | number of format filters | |
format_filters | array of format filters | |
[out] | error | an error when something is wrong |
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.
struct pw_node_factory * pw_core_find_node_factory | ( | struct pw_core * | core, |
const char * | name | ||
) |
Find a node by name.
core | the core object |
name | the 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.
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.
core | a core | |
other_port | a port to find a link with | |
id | the id of a port or SPA_ID_INVALID | |
props | extra properties | |
n_format_filters | number of filters | |
format_filters | array of format filters | |
[out] | error | an error when something is wrong |
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().
struct pw_core * pw_core_new | ( | struct pw_loop * | main_loop, |
struct pw_properties * | properties | ||
) |
Create a new core object.
main_loop | the main loop to use |
properties | extra properties for the core, ownership it taken |
References pw_core_info::change_mask, client_list, pw_core_info::cookie, data_loop, data_loop_impl, pw_properties::dict, global_list, globals, pw_core_info::host_name, info, link_list, listener_list, pw_loop::loop, main_loop, module_list, n_support, pw_core_info::name, node_factory_list, node_list, properties, pw_core_info::props, protocol_list, pw_core_add_global(), pw_data_loop_get_loop(), pw_data_loop_new(), pw_data_loop_start(), pw_get_host_name(), pw_get_user_name(), pw_log_get(), pw_properties_get(), pw_properties_new(), pw_properties_setf(), pw_type_init(), PW_VERSION_CORE, registry_resource_list, remote_list, resource_list, rt, support, pw_core_info::user_name, and pw_core_info::version.
void pw_core_update_properties | ( | struct pw_core * | core, |
const struct spa_dict * | dict | ||
) |
Update core properties.
core | a core |
dict | properties 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.
struct spa_list pw_core::client_list |
list of clients
Referenced by pw_client::pw_client_new(), and pw_core_new().
struct pw_loop* pw_core::data_loop |
data loop for data passing
Referenced by pw_core_new(), and pw_node_new().
struct pw_data_loop* pw_core::data_loop_impl |
Referenced by pw_core_destroy(), and pw_core_new().
struct pw_global* pw_core::global |
the global of the core
Referenced by pw_core_add_global(), and pw_core_get_global().
struct spa_list pw_core::global_list |
list of globals
Referenced by pw_core_add_global(), pw_core_destroy(), pw_core_for_each_global(), and pw_core_new().
struct pw_map pw_core::globals |
map of globals
Referenced by pw_core_add_global(), pw_core_destroy(), pw_core_find_global(), pw_core_new(), and pw_global::pw_global_destroy().
struct spa_graph pw_core::graph |
Referenced by pw_node_new().
struct pw_core_info pw_core::info |
info about the core
Referenced by pw_core_get_info(), pw_core_new(), pw_core_update_properties(), and pw_pipewire::pw_fill_remote_properties().
struct spa_list pw_core::link_list |
list of links
Referenced by pw_core_new(), and pw_link_new().
struct spa_hook_list pw_core::listener_list |
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().
struct spa_list pw_core::module_list |
list of modules
Referenced by pw_core_destroy(), pw_core_find_module(), and pw_core_new().
uint32_t pw_core::n_support |
number of support items
Referenced by pw_core_get_support(), and pw_core_new().
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().
struct spa_list pw_core::node_list |
list of nodes
Referenced by pw_core_find_port(), and pw_core_new().
void* pw_core::permission_data |
data passed to permission function
Referenced by pw_core_set_permission_callback(), and pw_global_get_permissions().
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().
struct pw_properties* pw_core::properties |
properties of the core
Referenced by pw_core_destroy(), pw_core_get_properties(), pw_core_new(), pw_core_update_properties(), and pw_pipewire::pw_fill_remote_properties().
struct spa_list pw_core::protocol_list |
list of protocols
Referenced by pw_core_find_protocol(), pw_core_new(), and pw_protocol_new().
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().
struct spa_list pw_core::remote_list |
list of remote connections
Referenced by pw_core_new(), and pw_remote_new().
struct spa_list pw_core::resource_list |
list of core resources
Referenced by pw_core_new(), and pw_core_update_properties().
struct { ... } pw_core::rt |
Referenced by pw_core_new(), and pw_node_new().
struct spa_support pw_core::support[4] |
support for spa plugins
Referenced by pw_core_get_support(), and pw_core_new().
struct pw_type pw_core::type |
type map and common types
Referenced by pw_client::pw_client_new(), pw_core_add_global(), pw_core_get_type(), pw_node_factory_export(), pw_protocol_add_marshal(), pw_remote_new(), and pw_stream_new().