mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-16 06:59:55 -05:00
client audio: Support memfd transport
Now that all layers in the stack support memfd blocks, add memfd pools support for client context and audio playback data. Use such memfd pools by default only if the server signals memfd support in its connection negotiations. Also add ability for clients to force-disable memfd transport through the `enable-memfd=' client configuration option. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
This commit is contained in:
parent
a831e45515
commit
b1d47d60fc
7 changed files with 88 additions and 7 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <pulsecore/creds.h>
|
||||
#include <pulsecore/macro.h>
|
||||
|
||||
typedef enum pa_mem_type {
|
||||
|
|
@ -48,4 +49,12 @@ static inline bool pa_mem_type_is_shared(pa_mem_type_t t) {
|
|||
return (t == PA_MEM_TYPE_SHARED_POSIX) || (t == PA_MEM_TYPE_SHARED_MEMFD);
|
||||
}
|
||||
|
||||
static inline bool pa_memfd_is_locally_supported() {
|
||||
#if defined(HAVE_CREDS) && defined(HAVE_MEMFD)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue