mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
improve properties on globals and ports
This commit is contained in:
parent
6756a3c8fc
commit
77e07e1948
4 changed files with 7 additions and 2 deletions
|
|
@ -201,6 +201,7 @@ static int emit_object_info(struct impl *this, uint32_t id, struct udev_device *
|
|||
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_ENUM_API, "udev");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_API, "alsa");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_MEDIA_CLASS, "Audio/Device");
|
||||
|
||||
if ((str = path_get_card_id(udev_device_get_property_value(dev, "DEVPATH"))) == NULL)
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -509,6 +509,7 @@ static int device_add(struct spa_bt_monitor *monitor, struct spa_bt_device *devi
|
|||
info.flags = 0;
|
||||
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_API, "bluez5");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_MEDIA_CLASS, "Audio/Device");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_NAME, device->name);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_ALIAS, device->alias);
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_ICON_NAME, device->icon);
|
||||
|
|
|
|||
|
|
@ -190,6 +190,7 @@ static int emit_object_info(struct impl *this, uint32_t id, struct udev_device *
|
|||
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_ENUM_API,"udev");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_API, "v4l2");
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_MEDIA_CLASS, "Video/Device");
|
||||
|
||||
items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_API_V4L2_PATH, udev_device_get_devnode(dev));
|
||||
|
||||
|
|
|
|||
|
|
@ -242,8 +242,10 @@ static void node_port_init(void *data, struct pw_port *port)
|
|||
direction == PW_DIRECTION_INPUT ? "in" : "out",
|
||||
str);
|
||||
|
||||
pw_properties_set(new, PW_KEY_PORT_PHYSICAL, "1");
|
||||
pw_properties_set(new, PW_KEY_PORT_TERMINAL, "1");
|
||||
if (is_device) {
|
||||
pw_properties_set(new, PW_KEY_PORT_PHYSICAL, "1");
|
||||
pw_properties_set(new, PW_KEY_PORT_TERMINAL, "1");
|
||||
}
|
||||
}
|
||||
|
||||
pw_port_update_properties(port, &new->dict);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue