mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: handle .monitor master source
This commit is contained in:
		
							parent
							
								
									ff69454eb4
								
							
						
					
					
						commit
						8767e8ed97
					
				
					 2 changed files with 17 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -219,7 +219,15 @@ static int module_ladspa_source_prepare(struct module * const module)
 | 
			
		|||
 | 
			
		||||
	if ((str = pw_properties_get(props, "master")) != NULL ||
 | 
			
		||||
	    (str = pw_properties_get(props, "source_master")) != NULL) {
 | 
			
		||||
		if (spa_strendswith(str, ".monitor")) {
 | 
			
		||||
			pw_properties_setf(capture_props, PW_KEY_TARGET_OBJECT,
 | 
			
		||||
					"%.*s", (int)strlen(str)-8, str);
 | 
			
		||||
			pw_properties_set(capture_props, PW_KEY_STREAM_CAPTURE_SINK,
 | 
			
		||||
					"true");
 | 
			
		||||
		} else {
 | 
			
		||||
			pw_properties_set(capture_props, PW_KEY_TARGET_OBJECT, str);
 | 
			
		||||
		}
 | 
			
		||||
		pw_properties_set(props, "source_master", NULL);
 | 
			
		||||
		pw_properties_set(props, "master", NULL);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -197,7 +197,14 @@ static int module_remap_source_prepare(struct module * const module)
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if ((str = pw_properties_get(props, "master")) != NULL) {
 | 
			
		||||
		if (spa_strendswith(str, ".monitor")) {
 | 
			
		||||
			pw_properties_setf(capture_props, PW_KEY_TARGET_OBJECT,
 | 
			
		||||
					"%.*s", (int)strlen(str)-8, str);
 | 
			
		||||
			pw_properties_set(capture_props, PW_KEY_STREAM_CAPTURE_SINK,
 | 
			
		||||
					"true");
 | 
			
		||||
		} else {
 | 
			
		||||
			pw_properties_set(capture_props, PW_KEY_TARGET_OBJECT, str);
 | 
			
		||||
		}
 | 
			
		||||
		pw_properties_set(props, "master", NULL);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue