audioconvert: improve proxy of internal params

This commit is contained in:
Wim Taymans 2019-08-12 12:45:04 +02:00
parent 4449cf61ad
commit b8b2e494bd
7 changed files with 139 additions and 39 deletions

View file

@ -370,7 +370,12 @@ int pw_device_register(struct pw_device *device,
if (properties == NULL)
return -errno;
pw_properties_set(properties, PW_KEY_DEVICE_NAME, device->info.name);
if ((str = pw_properties_get(device->properties, PW_KEY_DEVICE_DESCRIPTION)) != NULL)
pw_properties_set(properties, PW_KEY_DEVICE_DESCRIPTION, str);
if ((str = pw_properties_get(device->properties, PW_KEY_DEVICE_NAME)) != NULL)
pw_properties_set(properties, PW_KEY_DEVICE_NAME, str);
if ((str = pw_properties_get(device->properties, PW_KEY_DEVICE_NICK)) != NULL)
pw_properties_set(properties, PW_KEY_DEVICE_NICK, str);
if ((str = pw_properties_get(device->properties, PW_KEY_MEDIA_CLASS)) != NULL)
pw_properties_set(properties, PW_KEY_MEDIA_CLASS, str);
@ -445,6 +450,7 @@ static int update_properties(struct pw_device *device, const struct spa_dict *di
device->info.props = &device->properties->dict;
device->info.change_mask |= PW_DEVICE_CHANGE_MASK_PROPS;
return changed;
}

View file

@ -104,6 +104,9 @@ extern "C" {
/** Node keys */
#define PW_KEY_NODE_ID "node.id" /**< node id */
#define PW_KEY_NODE_NAME "node.name" /**< node name */
#define PW_KEY_NODE_NICK "node.nick" /**< short node name */
#define PW_KEY_NODE_DESCRIPTION "node.description" /**< localized human readable node one-line
* description. Ex. "Foobar USB Headset" */
#define PW_KEY_NODE_PLUGGED "node.plugged" /**< when the node was created. As a uint64 in
* nanoseconds. */
#define PW_KEY_NODE_SESSION "node.session" /**< the session id this node is part of */
@ -140,6 +143,7 @@ extern "C" {
* does not cause the graph to be
* runnable. */
/** device properties */
#define PW_KEY_DEVICE_ID "device.id" /**< device id */
#define PW_KEY_DEVICE_NAME "device.name" /**< device name */
#define PW_KEY_DEVICE_PLUGGED "device.plugged" /**< when the device was created. As a uint64 in
* nanoseconds. */

View file

@ -721,7 +721,6 @@ static void check_properties(struct pw_node *node)
node->quantum_size = DEFAULT_QUANTUM;
pw_log_debug(NAME" %p: driver:%d", node, node->driver);
}
static void dump_states(struct pw_node *driver)

View file

@ -680,9 +680,11 @@ int pw_port_register(struct pw_port *port,
struct pw_properties *properties)
{
struct pw_node *node = port->node;
struct pw_core *core = node->core;
port->global = pw_global_new(core,
if (node == NULL)
return -EIO;
port->global = pw_global_new(node->core,
PW_TYPE_INTERFACE_Port,
PW_VERSION_PORT_PROXY,
properties,