mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	raop: Code clarification : Detect raop_client recording state in a proper way
This commit is contained in:
		
							parent
							
								
									3e66643f50
								
							
						
					
					
						commit
						7e6bb05390
					
				
					 3 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1565,6 +1565,10 @@ bool pa_raop_client_can_stream(pa_raop_client *c) {
 | 
			
		|||
    return false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool pa_raop_client_is_recording(pa_raop_client *c) {
 | 
			
		||||
    return c->is_recording;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int pa_raop_client_stream(pa_raop_client *c) {
 | 
			
		||||
    int rv = 0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -65,6 +65,7 @@ bool pa_raop_client_is_authenticated(pa_raop_client *c);
 | 
			
		|||
 | 
			
		||||
int pa_raop_client_announce(pa_raop_client *c);
 | 
			
		||||
bool pa_raop_client_is_alive(pa_raop_client *c);
 | 
			
		||||
bool pa_raop_client_is_recording(pa_raop_client *c);
 | 
			
		||||
bool pa_raop_client_can_stream(pa_raop_client *c);
 | 
			
		||||
int pa_raop_client_stream(pa_raop_client *c);
 | 
			
		||||
int pa_raop_client_set_volume(pa_raop_client *c, pa_volume_t volume);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -268,7 +268,7 @@ static int sink_set_state_in_io_thread_cb(pa_sink *s, pa_sink_state_t new_state,
 | 
			
		|||
            if (!pa_raop_client_is_alive(u->raop)) {
 | 
			
		||||
                /* Connecting will trigger a RECORD and start steaming */
 | 
			
		||||
                pa_raop_client_announce(u->raop);
 | 
			
		||||
            } else if (!pa_raop_client_can_stream(u->raop)) {
 | 
			
		||||
            } else if (!pa_raop_client_is_recording(u->raop)) {
 | 
			
		||||
                /* RECORD alredy sent, simply start streaming */
 | 
			
		||||
                pa_raop_client_stream(u->raop);
 | 
			
		||||
                pa_rtpoll_set_timer_absolute(u->rtpoll, now);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue