mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	fix for api changes
This commit is contained in:
		
							parent
							
								
									5f9200d9ee
								
							
						
					
					
						commit
						61edd78bf4
					
				
					 3 changed files with 25 additions and 15 deletions
				
			
		| 
						 | 
				
			
			@ -287,7 +287,7 @@ static int set_mask(pa_context *c, struct global *g)
 | 
			
		|||
	return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void registry_event_global(void *data, uint32_t id, uint32_t parent_id,
 | 
			
		||||
static int registry_event_global(void *data, uint32_t id, uint32_t parent_id,
 | 
			
		||||
                                  uint32_t permissions, uint32_t type, uint32_t version,
 | 
			
		||||
                                  const struct spa_dict *props)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -304,26 +304,28 @@ static void registry_event_global(void *data, uint32_t id, uint32_t parent_id,
 | 
			
		|||
 | 
			
		||||
	if (set_mask(c, g) == 0) {
 | 
			
		||||
		global_free(g);
 | 
			
		||||
		return;
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pw_log_debug("mask %d/%d", g->mask, g->event);
 | 
			
		||||
	emit_event(c, g, PA_SUBSCRIPTION_EVENT_NEW);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void registry_event_global_remove(void *object, uint32_t id)
 | 
			
		||||
static int registry_event_global_remove(void *object, uint32_t id)
 | 
			
		||||
{
 | 
			
		||||
	pa_context *c = object;
 | 
			
		||||
	struct global *g;
 | 
			
		||||
 | 
			
		||||
	pw_log_debug("context %p: remove %d", c, id);
 | 
			
		||||
	if ((g = pa_context_find_global(c, id)) == NULL)
 | 
			
		||||
		return;
 | 
			
		||||
		return 0;
 | 
			
		||||
 | 
			
		||||
	emit_event(c, g, PA_SUBSCRIPTION_EVENT_REMOVE);
 | 
			
		||||
 | 
			
		||||
	pw_log_debug("context %p: free %d %p", c, id, g);
 | 
			
		||||
	global_free(g);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const struct pw_registry_proxy_events registry_events =
 | 
			
		||||
| 
						 | 
				
			
			@ -357,17 +359,19 @@ static void complete_operations(pa_context *c, uint32_t seq)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void core_info(void *data, const struct pw_core_info *info)
 | 
			
		||||
static int core_info(void *data, const struct pw_core_info *info)
 | 
			
		||||
{
 | 
			
		||||
	pa_context *c = data;
 | 
			
		||||
	c->core_info = pw_core_info_update(c->core_info, info);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void core_done(void *data, uint32_t seq)
 | 
			
		||||
static int core_done(void *data, uint32_t id, uint32_t seq)
 | 
			
		||||
{
 | 
			
		||||
	pa_context *c = data;
 | 
			
		||||
	pw_log_debug("done %d", seq);
 | 
			
		||||
	complete_operations(c, seq);
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static const struct pw_core_proxy_events core_events = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue