mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-15 07:00:05 -05:00
meta: add cursor metadata and examples
Add a moving and flashing circle cursor to video-src Render the cursor in video-play
This commit is contained in:
parent
67a0b33dc8
commit
cd53eca92b
3 changed files with 122 additions and 8 deletions
|
|
@ -36,6 +36,7 @@ extern "C" {
|
|||
|
||||
#define SPA_TYPE_META__Header SPA_TYPE_META_BASE "Header"
|
||||
#define SPA_TYPE_META__VideoCrop SPA_TYPE_META_BASE "VideoCrop"
|
||||
#define SPA_TYPE_META__Cursor SPA_TYPE_META_BASE "Cursor"
|
||||
|
||||
/**
|
||||
* A metadata element.
|
||||
|
|
@ -84,6 +85,28 @@ struct spa_meta_control {
|
|||
uint32_t offset; /**< offset in buffer memory */
|
||||
};
|
||||
|
||||
/**
|
||||
* Bitmap information
|
||||
*/
|
||||
struct spa_meta_bitmap {
|
||||
uint32_t format; /**< bitmap video format */
|
||||
uint32_t width, height; /**< width and height of bitmap */
|
||||
uint32_t stride; /**< stride of bitmap data */
|
||||
uint32_t size; /**< size of bitmap data */
|
||||
uint32_t offset; /**< offset of bitmap data in this structure */
|
||||
};
|
||||
|
||||
/**
|
||||
* Cursor information
|
||||
*/
|
||||
struct spa_meta_cursor {
|
||||
uint32_t id; /**< cursor id */
|
||||
int32_t x, y; /**< offsets on screen */
|
||||
int32_t hotspot_x, hotspot_y; /**< offsets for hotspot in bitmap */
|
||||
uint32_t bitmap_offset; /**< offset of bitmap meta in this structure */
|
||||
};
|
||||
|
||||
|
||||
struct spa_type_meta {
|
||||
uint32_t Header;
|
||||
uint32_t VideoCrop;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue