mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
meta: add busy metadata
Metadata on buffers to mark when a buffer is in use. Writers should only use buffers with a count of 0.
This commit is contained in:
parent
07b52299db
commit
b39a2258c4
2 changed files with 8 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ enum spa_meta_type {
|
||||||
SPA_META_Cursor, /**< struct spa_meta_cursor */
|
SPA_META_Cursor, /**< struct spa_meta_cursor */
|
||||||
SPA_META_Control, /**< metadata contains a spa_meta_control
|
SPA_META_Control, /**< metadata contains a spa_meta_control
|
||||||
* associated with the data */
|
* associated with the data */
|
||||||
|
SPA_META_Busy, /**< don't write to buffer when count > 0 */
|
||||||
|
|
||||||
SPA_META_LAST, /**< not part of ABI/API */
|
SPA_META_LAST, /**< not part of ABI/API */
|
||||||
};
|
};
|
||||||
|
|
@ -144,6 +145,12 @@ struct spa_meta_control {
|
||||||
struct spa_pod_sequence sequence;
|
struct spa_pod_sequence sequence;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** a busy counter for the buffer */
|
||||||
|
struct spa_meta_busy {
|
||||||
|
uint32_t flags;
|
||||||
|
uint32_t count; /**< number of users busy with the buffer */
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ static const struct spa_type_info spa_type_meta_type[] = {
|
||||||
{ SPA_META_Bitmap, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Bitmap", NULL },
|
{ SPA_META_Bitmap, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Bitmap", NULL },
|
||||||
{ SPA_META_Cursor, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Cursor", NULL },
|
{ SPA_META_Cursor, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Cursor", NULL },
|
||||||
{ SPA_META_Control, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Control", NULL },
|
{ SPA_META_Control, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Control", NULL },
|
||||||
|
{ SPA_META_Busy, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Busy", NULL },
|
||||||
{ 0, 0, NULL, NULL },
|
{ 0, 0, NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue