mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: Add buffer meta information VideoTransform
This metadata can be used to signal that a buffer is transformed. The values are intentionally choosen to coincide with wl_output::transform from the wayland windowsystem.
This commit is contained in:
		
							parent
							
								
									f038e3f238
								
							
						
					
					
						commit
						01b2552b71
					
				
					 2 changed files with 32 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -39,16 +39,17 @@ extern "C" {
 | 
			
		|||
 | 
			
		||||
enum spa_meta_type {
 | 
			
		||||
	SPA_META_Invalid,
 | 
			
		||||
	SPA_META_Header,	/**< struct spa_meta_header */
 | 
			
		||||
	SPA_META_VideoCrop,	/**< struct spa_meta_region with cropping data */
 | 
			
		||||
	SPA_META_VideoDamage,	/**< array of struct spa_meta_region with damage, where an invalid entry or end-of-array marks the end. */
 | 
			
		||||
	SPA_META_Bitmap,	/**< struct spa_meta_bitmap */
 | 
			
		||||
	SPA_META_Cursor,	/**< struct spa_meta_cursor */
 | 
			
		||||
	SPA_META_Control,	/**< metadata contains a spa_meta_control
 | 
			
		||||
				  *  associated with the data */
 | 
			
		||||
	SPA_META_Busy,		/**< don't write to buffer when count > 0 */
 | 
			
		||||
	SPA_META_Header,		/**< struct spa_meta_header */
 | 
			
		||||
	SPA_META_VideoCrop,		/**< struct spa_meta_region with cropping data */
 | 
			
		||||
	SPA_META_VideoDamage,		/**< array of struct spa_meta_region with damage, where an invalid entry or end-of-array marks the end. */
 | 
			
		||||
	SPA_META_Bitmap,		/**< struct spa_meta_bitmap */
 | 
			
		||||
	SPA_META_Cursor,		/**< struct spa_meta_cursor */
 | 
			
		||||
	SPA_META_Control,		/**< metadata contains a spa_meta_control
 | 
			
		||||
					  *  associated with the data */
 | 
			
		||||
	SPA_META_Busy,			/**< don't write to buffer when count > 0 */
 | 
			
		||||
	SPA_META_VideoTransform,	/**< struct spa_meta_transform */
 | 
			
		||||
 | 
			
		||||
	_SPA_META_LAST,		/**< not part of ABI/API */
 | 
			
		||||
	_SPA_META_LAST,			/**< not part of ABI/API */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -161,6 +162,24 @@ struct spa_meta_busy {
 | 
			
		|||
	uint32_t count;			/**< number of users busy with the buffer */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
enum spa_meta_videotransform_value {
 | 
			
		||||
	SPA_META_TRANSFORMATION_None = 0,	/**< no transform */
 | 
			
		||||
	SPA_META_TRANSFORMATION_90,		/**< 90 degree counter-clockwise */
 | 
			
		||||
	SPA_META_TRANSFORMATION_180,		/**< 180 degree counter-clockwise */
 | 
			
		||||
	SPA_META_TRANSFORMATION_270,		/**< 270 degree counter-clockwise */
 | 
			
		||||
	SPA_META_TRANSFORMATION_Flipped,	/**< 180 degree flipped around the vertical axis. Equivalent
 | 
			
		||||
						  * to a reflexion through the vertical line splitting the
 | 
			
		||||
						  * bufffer in two equal sized parts */
 | 
			
		||||
	SPA_META_TRANSFORMATION_Flipped90,	/**< flip then rotate around 90 degree counter-clockwise */
 | 
			
		||||
	SPA_META_TRANSFORMATION_Flipped180,	/**< flip then rotate around 180 degree counter-clockwise */
 | 
			
		||||
	SPA_META_TRANSFORMATION_Flipped270,	/**< flip then rotate around 270 degree counter-clockwise */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/** a transformation of the buffer */
 | 
			
		||||
struct spa_meta_videotransform {
 | 
			
		||||
	uint32_t transform;		/**< orientation transformation that was applied to the buffer */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * \}
 | 
			
		||||
 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue