mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: only register available A2DP encoder/decoder
This commit is contained in:
		
							parent
							
								
									3005d33113
								
							
						
					
					
						commit
						908e3f3d1f
					
				
					 1 changed files with 13 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1331,15 +1331,21 @@ static DBusHandlerResult object_manager_handler(DBusConnection *c, DBusMessage *
 | 
			
		|||
			if (caps_size < 0)
 | 
			
		||||
				continue;
 | 
			
		||||
 | 
			
		||||
			if (codec->decode != NULL) {
 | 
			
		||||
				spa_log_info(monitor->log, "register A2DP codec %s", a2dp_codecs[i]->name);
 | 
			
		||||
				endpoint = spa_aprintf("%s/%s", A2DP_SINK_ENDPOINT, codec->name);
 | 
			
		||||
			append_a2dp_object(&array, endpoint, SPA_BT_UUID_A2DP_SINK, codec_id, caps, caps_size);
 | 
			
		||||
				append_a2dp_object(&array, endpoint, SPA_BT_UUID_A2DP_SINK,
 | 
			
		||||
						codec_id, caps, caps_size);
 | 
			
		||||
				free(endpoint);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (codec->encode != NULL) {
 | 
			
		||||
				endpoint = spa_aprintf("%s/%s", A2DP_SOURCE_ENDPOINT, codec->name);
 | 
			
		||||
			append_a2dp_object(&array, endpoint, SPA_BT_UUID_A2DP_SOURCE, codec_id, caps, caps_size);
 | 
			
		||||
				append_a2dp_object(&array, endpoint, SPA_BT_UUID_A2DP_SOURCE,
 | 
			
		||||
						codec_id, caps, caps_size);
 | 
			
		||||
				free(endpoint);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		dbus_message_iter_close_container(&iter, &array);
 | 
			
		||||
		if (!dbus_connection_send(monitor->conn, r, NULL))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue