diff options
author | Wim Taymans <wtaymans@redhat.com> | 2018-11-30 11:07:45 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2018-11-30 11:07:45 +0100 |
commit | cd53eca92ba4ba0a763ad3ee555faf0345ff59b0 (patch) | |
tree | d13b744c05c9af777e9262eecdd0aa38e03c32b7 /spa | |
parent | 67a0b33dc89075da9834abcb73bd57c59330a965 (diff) |
meta: add cursor metadata and examples
Add a moving and flashing circle cursor to video-src
Render the cursor in video-play
Diffstat (limited to 'spa')
-rw-r--r-- | spa/include/spa/buffer/meta.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spa/include/spa/buffer/meta.h b/spa/include/spa/buffer/meta.h index fcd87955..e45d176b 100644 --- a/spa/include/spa/buffer/meta.h +++ b/spa/include/spa/buffer/meta.h @@ -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; |