mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
examples: set the MAPPABLE flag for MemFd
This commit is contained in:
parent
2f8740dee8
commit
77f3b7f6e4
3 changed files with 3 additions and 3 deletions
|
|
@ -223,7 +223,7 @@ static void on_stream_add_buffer(void *_data, struct pw_buffer *buffer)
|
|||
|
||||
/* create the memfd on the buffer, set the type and flags */
|
||||
d[0].type = SPA_DATA_MemFd;
|
||||
d[0].flags = SPA_DATA_FLAG_READWRITE;
|
||||
d[0].flags = SPA_DATA_FLAG_READWRITE | SPA_DATA_FLAG_MAPPABLE;
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
d[0].fd = memfd_create("video-src-memfd", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ static void on_stream_add_buffer(void *_data, struct pw_buffer *buffer)
|
|||
printf("use memfd\n");
|
||||
/* create the memfd on the buffer, set the type and flags */
|
||||
d[0].type = SPA_DATA_MemFd;
|
||||
d[0].flags = SPA_DATA_FLAG_READWRITE;
|
||||
d[0].flags = SPA_DATA_FLAG_READWRITE | SPA_DATA_FLAG_MAPPABLE;
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
d[0].fd = memfd_create("video-src-fixate-memfd", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ static void on_stream_add_buffer(void *_data, struct pw_buffer *buffer)
|
|||
|
||||
/* create the memfd on the buffer, set the type and flags */
|
||||
d[0].type = SPA_DATA_MemFd;
|
||||
d[0].flags = SPA_DATA_FLAG_READWRITE;
|
||||
d[0].flags = SPA_DATA_FLAG_READWRITE | SPA_DATA_FLAG_MAPPABLE;
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
d[0].fd = memfd_create("video-src-memfd", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue