meta: add explicit sync metadata and data type

Change the GenericFd data type to SyncObj. It's probably better to
explicitly state the data type than to make something generic. Otherwise
we would need to transfer the specific fd type somewhere else and there
is no room for that in the buffer and the the metadata is not a good idea
either because it can be modified and corrupted at runtime.

Add the SyncTimeline metadata. This contains 2 points on two timelines
(SyncObj datas in the buffer). The buffer can be accessed when the
acquire_point is signaled on the timeline and when the buffer
can be released, the release_point on the timeline should be signaled.
This commit is contained in:
Wim Taymans 2024-04-25 09:55:19 +02:00
parent 31de44f679
commit 9bb5780cc2
6 changed files with 26 additions and 10 deletions

View file

@ -34,10 +34,8 @@ enum spa_data_type {
SPA_DATA_MemId, /**< memory is identified with an id. The actual memory
* can be obtained in some other way and can be identified
* with this id. */
SPA_DATA_GenericFd, /**< generic fd, type and usage might be in metadata. If
* there is a size and MAPPABLE flag, this can be mmapped
* to obtain a memory region. The semantics of memfd might
* not be available (SEALING, ...) */
SPA_DATA_SyncObj, /**< a syncobj, usually requires a spa_meta_sync_timeline metadata
* with timeline points. */
_SPA_DATA_LAST, /**< not part of ABI */
};