mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	Remove direction
Direction is tied to the port id. Handle nodes with fixed ports.
This commit is contained in:
		
							parent
							
								
									7d8e2d53f7
								
							
						
					
					
						commit
						9485bd77e7
					
				
					 25 changed files with 246 additions and 165 deletions
				
			
		| 
						 | 
				
			
			@ -573,11 +573,21 @@ pinos_daemon_find_port (PinosDaemon     *daemon,
 | 
			
		|||
      }
 | 
			
		||||
    }
 | 
			
		||||
    if (best == NULL && node_found) {
 | 
			
		||||
      g_debug ("node %p: making port", n);
 | 
			
		||||
      best = pinos_node_add_port (n, direction, 0, NULL);
 | 
			
		||||
      if (best != NULL) {
 | 
			
		||||
        created_port = TRUE;
 | 
			
		||||
        break;
 | 
			
		||||
      guint id;
 | 
			
		||||
 | 
			
		||||
      id = pinos_node_get_free_port_id (n, direction);
 | 
			
		||||
      if (id != SPA_ID_INVALID) {
 | 
			
		||||
        g_debug ("node %p: making port with id %u", n, id);
 | 
			
		||||
        best = pinos_node_add_port (n, id, NULL);
 | 
			
		||||
        if (best != NULL) {
 | 
			
		||||
          created_port = TRUE;
 | 
			
		||||
          break;
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        g_debug ("node %p: using port with id %u", n, id);
 | 
			
		||||
        best = pinos_node_find_port_by_id (n, id);
 | 
			
		||||
        if (best != NULL)
 | 
			
		||||
          break;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue