mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	v4l2: set colorspace
This commit is contained in:
		
							parent
							
								
									0f13d5a65e
								
							
						
					
					
						commit
						73ad5d9057
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1168,15 +1168,18 @@ static int info_to_fmt(const struct spa_video_info *info, struct v4l2_format *fm
 | 
			
		|||
	case SPA_MEDIA_SUBTYPE_raw:
 | 
			
		||||
		fmt->fmt.pix.width = info->info.raw.size.width;
 | 
			
		||||
		fmt->fmt.pix.height = info->info.raw.size.height;
 | 
			
		||||
		fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
 | 
			
		||||
		break;
 | 
			
		||||
	case SPA_MEDIA_SUBTYPE_mjpg:
 | 
			
		||||
	case SPA_MEDIA_SUBTYPE_jpeg:
 | 
			
		||||
		fmt->fmt.pix.width = info->info.mjpg.size.width;
 | 
			
		||||
		fmt->fmt.pix.height = info->info.mjpg.size.height;
 | 
			
		||||
		fmt->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
 | 
			
		||||
		break;
 | 
			
		||||
	case SPA_MEDIA_SUBTYPE_h264:
 | 
			
		||||
		fmt->fmt.pix.width = info->info.h264.size.width;
 | 
			
		||||
		fmt->fmt.pix.height = info->info.h264.size.height;
 | 
			
		||||
		fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		return -EINVAL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue