mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	media-session: schedule more rescan for pending changes
Trigger/delay a rescan until the profiles, routes and stream volume are restored. See #789
This commit is contained in:
		
							parent
							
								
									d603c1086a
								
							
						
					
					
						commit
						1b6060ef5f
					
				
					 3 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -245,6 +245,8 @@ static int set_profile(struct device *dev, struct profile *pr)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dev->active_profile = pr->index;
 | 
						dev->active_profile = pr->index;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sm_media_session_schedule_rescan(dev->impl->session);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -417,6 +417,9 @@ static int restore_route_params(struct device *dev, const char *val, struct rout
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_device_set_param((struct pw_node*)dev->obj->obj.proxy,
 | 
						pw_device_set_param((struct pw_node*)dev->obj->obj.proxy,
 | 
				
			||||||
			SPA_PARAM_Route, 0, param);
 | 
								SPA_PARAM_Route, 0, param);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sm_media_session_schedule_rescan(dev->impl->session);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -363,6 +363,9 @@ static int restore_stream(struct stream *str, const char *val)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_node_set_param((struct pw_node*)str->obj->obj.proxy,
 | 
						pw_node_set_param((struct pw_node*)str->obj->obj.proxy,
 | 
				
			||||||
			SPA_PARAM_Props, 0, param);
 | 
								SPA_PARAM_Props, 0, param);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sm_media_session_schedule_rescan(str->impl->session);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue