mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	media-session: (re)schedule rescan after new pending operation
Every time a new operation is started, schedule a rescan. This ensures that there are no more pending actions before the policy module scans the nodes. This has the effect that all devices and nodes are up to data and ready to be used by policy-node. Fixes #789
This commit is contained in:
		
							parent
							
								
									59f86df9f3
								
							
						
					
					
						commit
						d603c1086a
					
				
					 3 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -470,6 +470,7 @@ static void device_event_info(void *object, const struct pw_device_info *info)
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	sm_object_sync_update(&device->obj);
 | 
			
		||||
	sm_media_session_schedule_rescan(&impl->this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void device_event_param(void *object, int seq,
 | 
			
		||||
| 
						 | 
				
			
			@ -570,6 +571,7 @@ static void node_event_info(void *object, const struct pw_node_info *info)
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	sm_object_sync_update(&node->obj);
 | 
			
		||||
	sm_media_session_schedule_rescan(&impl->this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void node_event_param(void *object, int seq,
 | 
			
		||||
| 
						 | 
				
			
			@ -1263,6 +1265,7 @@ registry_global(void *data, uint32_t id,
 | 
			
		|||
				impl, id, obj->type, type);
 | 
			
		||||
		update_object(impl, info, obj, id, permissions, type, version, props);
 | 
			
		||||
	}
 | 
			
		||||
	sm_media_session_schedule_rescan(&impl->this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int sm_object_add_listener(struct sm_object *obj, struct spa_hook *listener,
 | 
			
		||||
| 
						 | 
				
			
			@ -1410,6 +1413,7 @@ static void monitor_sync(struct impl *impl)
 | 
			
		|||
	pw_core_set_paused(impl->policy_core, true);
 | 
			
		||||
	impl->monitor_seq = pw_core_sync(impl->monitor_core, 0, impl->monitor_seq);
 | 
			
		||||
	pw_log_debug(NAME " %p: monitor sync start %d", impl, impl->monitor_seq);
 | 
			
		||||
	sm_media_session_schedule_rescan(&impl->this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct pw_proxy *sm_media_session_export(struct sm_media_session *sess,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue