mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	stream: set errno to the current error
Make the state_changed event and _get_state() function set errno with the current error value if the state is in error, so that application can use this to give more detailed error reporting. Use this in alsa, v4l2 and pulse to give some other error codes than EIO. Fixes #4574
This commit is contained in:
		
							parent
							
								
									491fb26f18
								
							
						
					
					
						commit
						3905e3b3d3
					
				
					 7 changed files with 27 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1109,7 +1109,7 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
 | 
			
		|||
 | 
			
		||||
	switch (state) {
 | 
			
		||||
	case PW_STREAM_STATE_ERROR:
 | 
			
		||||
		reply_error(client, -1, stream->create_tag, -EIO);
 | 
			
		||||
		reply_error(client, -1, stream->create_tag, -errno);
 | 
			
		||||
		destroy_stream = true;
 | 
			
		||||
		break;
 | 
			
		||||
	case PW_STREAM_STATE_UNCONNECTED:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue