mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-01-26 06:07:53 +00:00
examples/video-src-fixate: Fake DmaBuf fd with memfd
Otherwise the stream will fail due to not being able to import fd.
This commit is contained in:
parent
21217a1fad
commit
e615f17573
@ -295,7 +295,11 @@ static void on_stream_add_buffer(void *_data, struct pw_buffer *buffer)
|
||||
if ((d[0].type & (1<<SPA_DATA_DmaBuf)) > 0) {
|
||||
printf("pretend to support dmabufs while setting the fd to -1\n");
|
||||
d[0].type = SPA_DATA_DmaBuf;
|
||||
#ifdef HAVE_MEMFD_CREATE
|
||||
d[0].fd = memfd_create("video-src-fixate-fake-dmabuf", MFD_CLOEXEC | MFD_ALLOW_SEALING);
|
||||
#else
|
||||
d[0].fd = -1;
|
||||
#endif
|
||||
d[0].data = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user