mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	media-session: set bluetooth volume directly on the local adapter node
Avoid problems with session proxy appearing too late by setting props on directly on the local SPA node.
This commit is contained in:
		
							parent
							
								
									c7ad443e03
								
							
						
					
					
						commit
						d9c5ea54fd
					
				
					 1 changed files with 3 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -292,19 +292,10 @@ static void bluez_device_event(void *data, const struct spa_event *event)
 | 
			
		|||
 | 
			
		||||
	switch (type) {
 | 
			
		||||
	case SPA_DEVICE_EVENT_ObjectConfig:
 | 
			
		||||
		/* FIXME, proxy might be NULL at this point until the
 | 
			
		||||
		 * node proxy is created. We should probably do
 | 
			
		||||
		 * pw_client_node_get_node() and perform the set_param on
 | 
			
		||||
		 * that node proxy instead of waiting for the session manager
 | 
			
		||||
		 * proxy. */
 | 
			
		||||
		if (props != NULL) {
 | 
			
		||||
			if (node->snode->obj.proxy != NULL) {
 | 
			
		||||
				pw_node_set_param((struct pw_node*)node->snode->obj.proxy,
 | 
			
		||||
					SPA_PARAM_Props, 0, props);
 | 
			
		||||
			} else {
 | 
			
		||||
				pw_log_warn("device %p: node %d object:%p not ready for volume yet",
 | 
			
		||||
						device, id, node->snode);
 | 
			
		||||
			}
 | 
			
		||||
			struct spa_node *adapter;
 | 
			
		||||
			adapter = pw_impl_node_get_implementation(node->adapter);
 | 
			
		||||
			spa_node_set_param(adapter, SPA_PARAM_Props, 0, props);
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue