PipeWire
0.2.0
|
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... | |
int | 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_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_factory * | pw_core_find_factory (struct pw_core *core, const char *name) |
Find a factory by name. More... | |
void pw_core_destroy | ( | struct pw_core * | core | ) |
Destroy a core object.
core | a core to destroy |
References pw_data_loop::pw_data_loop_destroy(), pw_global::pw_global_destroy(), pw_log::pw_log_debug(), pw_map::pw_map_clear(), pw_module::pw_module_destroy(), pw_node::pw_node_destroy(), pw_properties::pw_properties_free(), and pw_remote::pw_remote_destroy().
struct pw_factory * pw_core_find_factory | ( | struct pw_core * | core, |
const char * | name | ||
) |
Find a factory by name.
core | the core object |
name | the 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.
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_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().
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.
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_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.
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_properties::dict, pw_loop::loop, PW_CORE_PROP_HOST_NAME, PW_CORE_PROP_NAME, PW_CORE_PROP_USER_NAME, PW_CORE_PROP_VERSION, pw_data_loop_get_loop(), pw_data_loop::pw_data_loop_new(), pw_data_loop::pw_data_loop_start(), pw_pipewire::pw_get_host_name(), pw_get_spa_dbus(), pw_pipewire::pw_get_user_name(), pw_global_add_listener(), pw_global::pw_global_new(), pw_log::pw_log_debug(), pw_log::pw_log_get(), pw_map::pw_map_init(), pw_properties::pw_properties_get(), pw_properties::pw_properties_new(), pw_properties::pw_properties_setf(), pw_type::pw_type_init(), PW_VERSION_CORE, and pw_loop::utils.
int 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_CHANGE_MASK_PROPS, pw_core_resource_info, and pw_properties::pw_properties_set().