mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	context: wait till nodes are initialized before notify
This commit is contained in:
		
							parent
							
								
									bfd805a19e
								
							
						
					
					
						commit
						5e2b740ee0
					
				
					 2 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -588,9 +588,11 @@ static int set_mask(pa_context *c, struct global *g)
 | 
			
		|||
				g->link_info.dst->parent_id,
 | 
			
		||||
				g->link_info.dst->id);
 | 
			
		||||
 | 
			
		||||
		if ((f = pa_context_find_global(c, g->link_info.src->parent_id)) != NULL)
 | 
			
		||||
		if ((f = pa_context_find_global(c, g->link_info.src->parent_id)) != NULL &&
 | 
			
		||||
		    !f->init)
 | 
			
		||||
			emit_event(c, f, PA_SUBSCRIPTION_EVENT_CHANGE);
 | 
			
		||||
		if ((f = pa_context_find_global(c, g->link_info.dst->parent_id)) != NULL)
 | 
			
		||||
		if ((f = pa_context_find_global(c, g->link_info.dst->parent_id)) != NULL &&
 | 
			
		||||
		    !f->init)
 | 
			
		||||
			emit_event(c, f, PA_SUBSCRIPTION_EVENT_CHANGE);
 | 
			
		||||
 | 
			
		||||
		break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1424,7 +1424,7 @@ struct sink_input_data {
 | 
			
		|||
 | 
			
		||||
static void sink_input_callback(struct sink_input_data *d)
 | 
			
		||||
{
 | 
			
		||||
	struct global *g = d->global, *l, *cl;
 | 
			
		||||
	struct global *g = d->global, *cl;
 | 
			
		||||
	struct pw_node_info *info = g->info;
 | 
			
		||||
	const char *name;
 | 
			
		||||
	pa_sink_input_info i;
 | 
			
		||||
| 
						 | 
				
			
			@ -1455,6 +1455,7 @@ static void sink_input_callback(struct sink_input_data *d)
 | 
			
		|||
		i.sink = s->device_index;
 | 
			
		||||
	}
 | 
			
		||||
	else {
 | 
			
		||||
		struct global *l;
 | 
			
		||||
		l = pa_context_find_linked(d->context, g->id);
 | 
			
		||||
		i.sink = l ? l->id : PA_INVALID_INDEX;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -1490,6 +1491,8 @@ static void sink_input_callback(struct sink_input_data *d)
 | 
			
		|||
	i.has_volume = true;
 | 
			
		||||
	i.volume_writable = true;
 | 
			
		||||
 | 
			
		||||
	pw_log_debug("context %p: sink info for %d sink:%d", g->context, i.index, i.sink);
 | 
			
		||||
 | 
			
		||||
	d->cb(d->context, &i, 0, d->userdata);
 | 
			
		||||
 | 
			
		||||
	pa_proplist_free(i.proplist);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue