mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	sink-input, source-output: remove the state getters
pa_sink_input_get_state() and pa_source_output_get_state() just return the state variable. We can as well access the state variable directly. There are no behaviour changes, except that some filter sources accessed the main thread's state variable from their push() callbacks. I fixed them so that they use the thread_info.state variable instead.
This commit is contained in:
		
							parent
							
								
									64ba239f65
								
							
						
					
					
						commit
						b4a36453da
					
				
					 21 changed files with 57 additions and 81 deletions
				
			
		| 
						 | 
				
			
			@ -671,7 +671,7 @@ static void route_sink_input(struct userdata *u, pa_sink_input *si) {
 | 
			
		|||
    /* It might happen that a stream and a sink are set up at the
 | 
			
		||||
    same time, in which case we want to make sure we don't
 | 
			
		||||
    interfere with that */
 | 
			
		||||
    if (!PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(si)))
 | 
			
		||||
    if (!PA_SINK_INPUT_IS_LINKED(si->state))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    if (!(role = pa_proplist_gets(si->proplist, PA_PROP_MEDIA_ROLE)))
 | 
			
		||||
| 
						 | 
				
			
			@ -746,7 +746,7 @@ static void route_source_output(struct userdata *u, pa_source_output *so) {
 | 
			
		|||
    /* It might happen that a stream and a source are set up at the
 | 
			
		||||
    same time, in which case we want to make sure we don't
 | 
			
		||||
    interfere with that */
 | 
			
		||||
    if (!PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(so)))
 | 
			
		||||
    if (!PA_SOURCE_OUTPUT_IS_LINKED(so->state))
 | 
			
		||||
        return;
 | 
			
		||||
 | 
			
		||||
    if (!(role = pa_proplist_gets(so->proplist, PA_PROP_MEDIA_ROLE)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue