diff --git a/spa/include/spa/buffer/meta.h b/spa/include/spa/buffer/meta.h index 0297486f9..213026b45 100644 --- a/spa/include/spa/buffer/meta.h +++ b/spa/include/spa/buffer/meta.h @@ -45,6 +45,7 @@ enum spa_meta_type { 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_LAST, /**< not part of ABI/API */ }; @@ -144,6 +145,12 @@ struct spa_meta_control { 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 } /* extern "C" */ #endif diff --git a/spa/include/spa/buffer/type-info.h b/spa/include/spa/buffer/type-info.h index 35594d6d3..3a1001f45 100644 --- a/spa/include/spa/buffer/type-info.h +++ b/spa/include/spa/buffer/type-info.h @@ -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_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_Busy, SPA_TYPE_Pointer, SPA_TYPE_INFO_META_BASE "Busy", NULL }, { 0, 0, NULL, NULL }, };