mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
port: use right properties
Use format.dsp as a key to mark the dsp format on a port Use audio.channel as the key to set the audio channel on a port
This commit is contained in:
parent
3ad73f0532
commit
a680f434d2
7 changed files with 8 additions and 9 deletions
|
|
@ -497,7 +497,7 @@ handle_node(struct impl *impl, uint32_t id, uint32_t parent_id,
|
|||
spa_list_append(&impl->node_list, &node->l);
|
||||
node->type = NODE_TYPE_UNKNOWN;
|
||||
|
||||
pw_log_debug(NAME" %p: node media.class %s", impl, media_class);
|
||||
pw_log_debug(NAME" %p: node "PW_KEY_MEDIA_CLASS" %s", impl, media_class);
|
||||
|
||||
if (media_class == NULL)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ static void node_port_init(void *data, struct pw_port *port)
|
|||
else
|
||||
prefix = "capture";
|
||||
|
||||
if ((str = pw_properties_get(old, PW_KEY_PORT_CHANNEL)) == NULL ||
|
||||
if ((str = pw_properties_get(old, PW_KEY_AUDIO_CHANNEL)) == NULL ||
|
||||
strcmp(str, "UNK") == 0) {
|
||||
snprintf(position, 7, "%d", port->port_id);
|
||||
str = position;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ extern "C" {
|
|||
#define PW_KEY_PORT_NAME "port.name" /**< port name */
|
||||
#define PW_KEY_PORT_DIRECTION "port.direction" /**< the port direction, one of "in" or "out"
|
||||
* or "control" and "notify" for control ports */
|
||||
#define PW_KEY_PORT_CHANNEL "port.channel" /**< port channel */
|
||||
#define PW_KEY_PORT_ALIAS1 "port.alias1" /**< port alias1 */
|
||||
#define PW_KEY_PORT_ALIAS2 "port.alias2" /**< port alias2 */
|
||||
#define PW_KEY_PORT_PHYSICAL "port.physical" /**< if this is a physical port */
|
||||
|
|
|
|||
|
|
@ -693,7 +693,7 @@ int pw_port_add(struct pw_port *port, struct pw_node *node)
|
|||
pw_properties_set(port->properties, PW_KEY_PORT_DIRECTION, dir);
|
||||
|
||||
if ((str = pw_properties_get(port->properties, PW_KEY_PORT_NAME)) == NULL) {
|
||||
if ((str = pw_properties_get(port->properties, PW_KEY_PORT_CHANNEL)) != NULL &&
|
||||
if ((str = pw_properties_get(port->properties, PW_KEY_AUDIO_CHANNEL)) != NULL &&
|
||||
strcmp(str, "UNK") != 0) {
|
||||
pw_properties_setf(port->properties, PW_KEY_PORT_NAME, "%s_%s", dir, str);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue