mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: libcamera: source: remove format config shortcut
Remove the code that is supposed to compare the current and the to-be-set format for returning early if they match. This is removed: * v4l2 also does not have it either; * it needs more consideration (there are not properly handled fields); * it would make later changes somewhat more complicated.
This commit is contained in:
		
							parent
							
								
									25075bb3d7
								
							
						
					
					
						commit
						05a9e52caf
					
				
					 1 changed files with 0 additions and 19 deletions
				
			
		| 
						 | 
				
			
			@ -1878,35 +1878,16 @@ int port_set_format(struct impl *impl, struct port *port,
 | 
			
		|||
				return -EINVAL;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (port->current_format && info.media_type == port->current_format->media_type &&
 | 
			
		||||
			    info.media_subtype == port->current_format->media_subtype &&
 | 
			
		||||
			    info.info.raw.format == port->current_format->info.raw.format &&
 | 
			
		||||
			    info.info.raw.size.width == port->current_format->info.raw.size.width &&
 | 
			
		||||
			    info.info.raw.size.height == port->current_format->info.raw.size.height &&
 | 
			
		||||
			    info.info.raw.flags == port->current_format->info.raw.flags &&
 | 
			
		||||
			    (!(info.info.raw.flags & SPA_VIDEO_FLAG_MODIFIER) ||
 | 
			
		||||
			     (info.info.raw.modifier == port->current_format->info.raw.modifier)))
 | 
			
		||||
				return 0;
 | 
			
		||||
			break;
 | 
			
		||||
		case SPA_MEDIA_SUBTYPE_mjpg:
 | 
			
		||||
			if (spa_format_video_mjpg_parse(format, &info.info.mjpg) < 0)
 | 
			
		||||
				return -EINVAL;
 | 
			
		||||
 | 
			
		||||
			if (port->current_format && info.media_type == port->current_format->media_type &&
 | 
			
		||||
			    info.media_subtype == port->current_format->media_subtype &&
 | 
			
		||||
			    info.info.mjpg.size.width == port->current_format->info.mjpg.size.width &&
 | 
			
		||||
			    info.info.mjpg.size.height == port->current_format->info.mjpg.size.height)
 | 
			
		||||
				return 0;
 | 
			
		||||
			break;
 | 
			
		||||
		case SPA_MEDIA_SUBTYPE_h264:
 | 
			
		||||
			if (spa_format_video_h264_parse(format, &info.info.h264) < 0)
 | 
			
		||||
				return -EINVAL;
 | 
			
		||||
 | 
			
		||||
			if (port->current_format && info.media_type == port->current_format->media_type &&
 | 
			
		||||
			    info.media_subtype == port->current_format->media_subtype &&
 | 
			
		||||
			    info.info.h264.size.width == port->current_format->info.h264.size.width &&
 | 
			
		||||
			    info.info.h264.size.height == port->current_format->info.h264.size.height)
 | 
			
		||||
				return 0;
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			return -EINVAL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue