mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: media-sink: set node.group for ISO group nodes
It's better to schedule nodes in the same ISO group together, since they are supposed to produce synchronized output.
This commit is contained in:
		
							parent
							
								
									17c583bbe7
								
							
						
					
					
						commit
						de9086481f
					
				
					 1 changed files with 16 additions and 0 deletions
				
			
		| 
						 | 
					@ -1405,6 +1405,21 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void emit_node_info(struct impl *this, bool full)
 | 
					static void emit_node_info(struct impl *this, bool full)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						char node_group_buf[256];
 | 
				
			||||||
 | 
						char *node_group = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (this->transport && (this->transport->profile & SPA_BT_PROFILE_BAP_SINK)) {
 | 
				
			||||||
 | 
							spa_scnprintf(node_group_buf, sizeof(node_group_buf), "bluez-iso-%s-cig-%d",
 | 
				
			||||||
 | 
									this->transport->device->adapter->address,
 | 
				
			||||||
 | 
									this->transport->bap_cig);
 | 
				
			||||||
 | 
							node_group = node_group_buf;
 | 
				
			||||||
 | 
						} else if (this->transport && (this->transport->profile & SPA_BT_PROFILE_BAP_BROADCAST_SINK)) {
 | 
				
			||||||
 | 
							spa_scnprintf(node_group_buf, sizeof(node_group_buf), "bluez-iso-%s-big-%d",
 | 
				
			||||||
 | 
									this->transport->device->adapter->address,
 | 
				
			||||||
 | 
									this->transport->bap_big);
 | 
				
			||||||
 | 
							node_group = node_group_buf;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct spa_dict_item node_info_items[] = {
 | 
						struct spa_dict_item node_info_items[] = {
 | 
				
			||||||
		{ SPA_KEY_DEVICE_API, "bluez5" },
 | 
							{ SPA_KEY_DEVICE_API, "bluez5" },
 | 
				
			||||||
		{ SPA_KEY_MEDIA_CLASS, this->is_internal ? "Audio/Sink/Internal" :
 | 
							{ SPA_KEY_MEDIA_CLASS, this->is_internal ? "Audio/Sink/Internal" :
 | 
				
			||||||
| 
						 | 
					@ -1412,6 +1427,7 @@ static void emit_node_info(struct impl *this, bool full)
 | 
				
			||||||
		{ "media.name", ((this->transport && this->transport->device->name) ?
 | 
							{ "media.name", ((this->transport && this->transport->device->name) ?
 | 
				
			||||||
					this->transport->device->name : this->codec->bap ? "BAP" : "A2DP" ) },
 | 
										this->transport->device->name : this->codec->bap ? "BAP" : "A2DP" ) },
 | 
				
			||||||
		{ SPA_KEY_NODE_DRIVER, this->is_output ? "true" : "false" },
 | 
							{ SPA_KEY_NODE_DRIVER, this->is_output ? "true" : "false" },
 | 
				
			||||||
 | 
							{ "node.group", node_group },
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	uint64_t old = full ? this->info.change_mask : 0;
 | 
						uint64_t old = full ? this->info.change_mask : 0;
 | 
				
			||||||
	if (full)
 | 
						if (full)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue