mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: Add SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED
This flags allows clients to use the parse_format functions and determine from their result directly if the modifer was fixated yet.
This commit is contained in:
		
							parent
							
								
									abe8c3581f
								
							
						
					
					
						commit
						0a13d37e5c
					
				
					 3 changed files with 14 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -23,8 +23,11 @@ spa_format_video_dsp_parse(const struct spa_pod *format,
 | 
			
		|||
			   struct spa_video_info_dsp *info)
 | 
			
		||||
{
 | 
			
		||||
	info->flags = SPA_VIDEO_FLAG_NONE;
 | 
			
		||||
	if (spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) {
 | 
			
		||||
	const struct spa_pod_prop *mod_prop;
 | 
			
		||||
	if ((mod_prop = spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) != NULL) {
 | 
			
		||||
		info->flags |= SPA_VIDEO_FLAG_MODIFIER;
 | 
			
		||||
		if ((mod_prop->flags & SPA_POD_PROP_FLAG_DONT_FIXATE) == SPA_POD_PROP_FLAG_DONT_FIXATE)
 | 
			
		||||
			info->flags |= SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return spa_pod_parse_object(format,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,8 +23,11 @@ spa_format_video_raw_parse(const struct spa_pod *format,
 | 
			
		|||
			   struct spa_video_info_raw *info)
 | 
			
		||||
{
 | 
			
		||||
	info->flags = SPA_VIDEO_FLAG_NONE;
 | 
			
		||||
	if (spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) {
 | 
			
		||||
	const struct spa_pod_prop *mod_prop;
 | 
			
		||||
	if ((mod_prop = spa_pod_find_prop (format, NULL, SPA_FORMAT_VIDEO_modifier)) != NULL) {
 | 
			
		||||
		info->flags |= SPA_VIDEO_FLAG_MODIFIER;
 | 
			
		||||
		if ((mod_prop->flags & SPA_POD_PROP_FLAG_DONT_FIXATE) == SPA_POD_PROP_FLAG_DONT_FIXATE)
 | 
			
		||||
			info->flags |= SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return spa_pod_parse_object(format,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -139,6 +139,7 @@ enum spa_video_flags {
 | 
			
		|||
								 *   denote the maximum fps of the video */
 | 
			
		||||
	SPA_VIDEO_FLAG_PREMULTIPLIED_ALPHA = (1 << 1),		/**< Each color has been scaled by the alpha value. */
 | 
			
		||||
	SPA_VIDEO_FLAG_MODIFIER = (1 << 2),			/**< use the format modifier */
 | 
			
		||||
	SPA_VIDEO_FLAG_MODIFIER_FIXATION_REQUIRED = (1 << 3),	/**< format modifier was not fixated yet */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue