mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: provide media.name for a2dp source streams
A2DP source acts as Stream/Output/Audio, so provide media.name for it indicating the device it comes from (e.g. shown in pulseaudio apps).
This commit is contained in:
		
							parent
							
								
									3e9bf908ac
								
							
						
					
					
						commit
						f1e56b2317
					
				
					 1 changed files with 10 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -636,16 +636,18 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
 | 
			
		|||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const struct spa_dict_item node_info_items[] = {
 | 
			
		||||
	{ SPA_KEY_DEVICE_API, "bluez5" },
 | 
			
		||||
	{ SPA_KEY_MEDIA_CLASS, "Stream/Output/Audio" },
 | 
			
		||||
	{ SPA_KEY_NODE_DRIVER, "true" },
 | 
			
		||||
	{ SPA_KEY_NODE_LATENCY, "512/48000" },
 | 
			
		||||
	{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static void emit_node_info(struct impl *this, bool full)
 | 
			
		||||
{
 | 
			
		||||
	struct spa_dict_item node_info_items[] = {
 | 
			
		||||
		{ SPA_KEY_DEVICE_API, "bluez5" },
 | 
			
		||||
		{ SPA_KEY_MEDIA_CLASS, "Stream/Output/Audio" },
 | 
			
		||||
		{ SPA_KEY_NODE_DRIVER, "true" },
 | 
			
		||||
		{ SPA_KEY_NODE_LATENCY, "512/48000" },
 | 
			
		||||
		{ SPA_KEY_NODE_PAUSE_ON_IDLE, "false" },
 | 
			
		||||
		{ "media.name", ((this->transport && this->transport->device->name) ?
 | 
			
		||||
		                 this->transport->device->name : "A2DP") },
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
	if (full)
 | 
			
		||||
		this->info.change_mask = this->info_all;
 | 
			
		||||
	if (this->info.change_mask) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue