mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	keys: rename device.id to device.bus-id
This commit is contained in:
		
							parent
							
								
									9807e7fdab
								
							
						
					
					
						commit
						774e11bc10
					
				
					 5 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -241,7 +241,6 @@ struct spa_device_methods {
 | 
			
		|||
#define SPA_KEY_DEVICE_NAME		"device.name"		/**< the name of the device */
 | 
			
		||||
#define SPA_KEY_DEVICE_ALIAS		"device.alias"		/**< altenative name of the device */
 | 
			
		||||
#define SPA_KEY_DEVICE_NICK		"device.nick"		/**< the device short name */
 | 
			
		||||
#define SPA_KEY_DEVICE_ID		"device.id"		/**< the device id */
 | 
			
		||||
#define SPA_KEY_DEVICE_DESCRIPTION	"device.description"	/**< a device description */
 | 
			
		||||
#define SPA_KEY_DEVICE_ICON		"device.icon"		/**< icon for the device. A base64 blob
 | 
			
		||||
								  *  containing PNG image data */
 | 
			
		||||
| 
						 | 
				
			
			@ -249,6 +248,7 @@ struct spa_device_methods {
 | 
			
		|||
								  *  Ex. "sound-card-speakers-usb" */
 | 
			
		||||
#define SPA_KEY_DEVICE_PLUGGED_USEC	"device.plugged.usec"	/**< when the device was plugged */
 | 
			
		||||
 | 
			
		||||
#define SPA_KEY_DEVICE_BUS_ID		"device.bus-id"		/**< the device bus-id */
 | 
			
		||||
#define SPA_KEY_DEVICE_BUS_PATH		"device.bus-path"	/**< bus path to the device in the OS'
 | 
			
		||||
								  *  format.
 | 
			
		||||
								  *  Ex. "pci-0000:00:14.0-usb-0:3.2:1.0" */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -226,7 +226,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_SYSFS_PATH, str);
 | 
			
		||||
	}
 | 
			
		||||
	if ((str = udev_device_get_property_value(dev, "ID_ID")) && *str) {
 | 
			
		||||
		items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_ID, str);
 | 
			
		||||
		items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_BUS_ID, str);
 | 
			
		||||
	}
 | 
			
		||||
	if ((str = udev_device_get_property_value(dev, "ID_BUS")) && *str) {
 | 
			
		||||
		items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_BUS, str);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -203,7 +203,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_SYSFS_PATH, str);
 | 
			
		||||
	}
 | 
			
		||||
	if ((str = udev_device_get_property_value(dev, "ID_ID")) && *str) {
 | 
			
		||||
		items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_ID, str);
 | 
			
		||||
		items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_BUS_ID, str);
 | 
			
		||||
	}
 | 
			
		||||
	if ((str = udev_device_get_property_value(dev, "ID_BUS")) && *str) {
 | 
			
		||||
		items[n_items++] = SPA_DICT_ITEM_INIT(SPA_KEY_DEVICE_BUS, str);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -226,7 +226,7 @@ static int update_device_props(struct alsa_object *obj)
 | 
			
		|||
	char temp[32];
 | 
			
		||||
 | 
			
		||||
	if ((s = pw_properties_get(p, SPA_KEY_DEVICE_NAME)) == NULL) {
 | 
			
		||||
		if ((s = pw_properties_get(p, SPA_KEY_DEVICE_ID)) == NULL) {
 | 
			
		||||
		if ((s = pw_properties_get(p, SPA_KEY_DEVICE_BUS_ID)) == NULL) {
 | 
			
		||||
			if ((s = pw_properties_get(p, SPA_KEY_DEVICE_BUS_PATH)) == NULL) {
 | 
			
		||||
				snprintf(temp, sizeof(temp), "%d", obj->id);
 | 
			
		||||
				s = temp;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -220,7 +220,7 @@ static int v4l2_update_device_props(struct v4l2_object *obj)
 | 
			
		|||
	char temp[32];
 | 
			
		||||
 | 
			
		||||
	if ((s = pw_properties_get(p, SPA_KEY_DEVICE_NAME)) == NULL) {
 | 
			
		||||
		if ((s = pw_properties_get(p, SPA_KEY_DEVICE_ID)) == NULL) {
 | 
			
		||||
		if ((s = pw_properties_get(p, SPA_KEY_DEVICE_BUS_ID)) == NULL) {
 | 
			
		||||
			if ((s = pw_properties_get(p, SPA_KEY_DEVICE_BUS_PATH)) == NULL) {
 | 
			
		||||
				snprintf(temp, sizeof(temp), "%d", obj->id);
 | 
			
		||||
				s = temp;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue