summaryrefslogtreecommitdiff
path: root/src/tests/srbchannel-test.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2016-03-13 01:12:18 +0200
committerDavid Henningsson <david.henningsson@canonical.com>2016-04-02 05:55:14 +0200
commit27d0a3b388899a1799be20040d93cded9d74c813 (patch)
treefa83fcde84754b5545d27e3c03a0185ebeb3cbd6 /src/tests/srbchannel-test.c
parentee2db622778ae8038c9e178675978ad23f1300a2 (diff)
downloadpulseaudio-27d0a3b388899a1799be20040d93cded9d74c813.tar.gz
pstream: Support memfd blocks transport
Now that we have the necessary infrastructure to memexport and mempimport a memfd memblock, extend that support higher up in the chain with pstreams. A PA endpoint can now _transparently_ send a memfd memblock to the other end by simply calling pa_pstream_send_memblock() – provided the block's memfd pool was earlier registered with the pstream. If the pipe does not support memfd transfers, we fall back to sending the block's full data instead of just its reference. ** Further details: A single pstream connection usually transfers blocks from multiple pools including the server's srbchannel mempool, the client's audio data mempool, and the server's global core mempool. If these mempools are memfd-backed, we now require registering them with the pstream before sending any blocks they cover. This is done to minimize fd passing overhead and avoid fd leaks. Moreover, to support all these pools without hard-coding their number or nature in the Pulse communication protocol itself, a new REGISTER_MEMFD_SHMID command is introduced. That command can be sent _anytime_ during the pstream's lifetime and is used for creating on demand SHM ID to memfd mappings. Suggested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Diffstat (limited to 'src/tests/srbchannel-test.c')
-rw-r--r--src/tests/srbchannel-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/srbchannel-test.c b/src/tests/srbchannel-test.c
index 9fc5d45b8..0e7b0ce90 100644
--- a/src/tests/srbchannel-test.c
+++ b/src/tests/srbchannel-test.c
@@ -34,7 +34,7 @@ static unsigned packets_received;
static unsigned packets_checksum;
static size_t packets_length;
-static void packet_received(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data, void *userdata) {
+static void packet_received(pa_pstream *p, pa_packet *packet, pa_cmsg_ancil_data *ancil_data, void *userdata) {
const uint8_t *pdata;
size_t plen;
unsigned i;