mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
buffer: add GenericFd memory type
Add a Generic fd type. These could be eventfd or timerfd, the meaning can depend on extra metadata.
This commit is contained in:
parent
77f3b7f6e4
commit
f3fe20bdde
4 changed files with 15 additions and 4 deletions
|
|
@ -27,9 +27,17 @@ enum spa_data_type {
|
|||
SPA_DATA_Invalid,
|
||||
SPA_DATA_MemPtr, /**< pointer to memory, the data field in
|
||||
* struct spa_data is set. */
|
||||
SPA_DATA_MemFd, /**< generic fd, mmap to get to memory */
|
||||
SPA_DATA_DmaBuf, /**< fd to dmabuf memory */
|
||||
SPA_DATA_MemId, /**< memory is identified with an id */
|
||||
SPA_DATA_MemFd, /**< memfd, mmap to get to memory. */
|
||||
SPA_DATA_DmaBuf, /**< fd to dmabuf memory. This might not be readily
|
||||
* mappable (unless the MAPPABLE flag is set) and should
|
||||
* normally be handled with DMABUF apis. */
|
||||
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_LAST, /**< not part of ABI */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ static const struct spa_type_info spa_type_data_type[] = {
|
|||
{ SPA_DATA_MemFd, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_FD_BASE "MemFd", NULL },
|
||||
{ SPA_DATA_DmaBuf, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_FD_BASE "DmaBuf", NULL },
|
||||
{ SPA_DATA_MemId, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_BASE "MemId", NULL },
|
||||
{ SPA_DATA_GenericFd, SPA_TYPE_Int, SPA_TYPE_INFO_DATA_BASE "GenericFd", NULL },
|
||||
{ 0, 0, NULL, NULL },
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue