mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-15 06:59:58 -05:00
memblock, pstream: Allow send/receive of remote writable memblocks
The shared ringbuffer memblock must be writable by both sides. This makes it possible to send such a memblock over a pstream without the "both sides writable" information getting lost. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
613177919f
commit
710c4b39af
3 changed files with 62 additions and 16 deletions
|
|
@ -104,6 +104,7 @@ function is not multiple caller safe, i.e. needs to be locked
|
|||
manually if called from more than one thread at the same time. */
|
||||
void pa_memblock_unref_fixed(pa_memblock*b);
|
||||
|
||||
bool pa_memblock_is_ours(pa_memblock *b);
|
||||
bool pa_memblock_is_read_only(pa_memblock *b);
|
||||
bool pa_memblock_is_silence(pa_memblock *b);
|
||||
bool pa_memblock_ref_is_one(pa_memblock *b);
|
||||
|
|
@ -125,12 +126,15 @@ const pa_mempool_stat* pa_mempool_get_stat(pa_mempool *p);
|
|||
void pa_mempool_vacuum(pa_mempool *p);
|
||||
int pa_mempool_get_shm_id(pa_mempool *p, uint32_t *id);
|
||||
bool pa_mempool_is_shared(pa_mempool *p);
|
||||
bool pa_mempool_is_remote_writable(pa_mempool *p);
|
||||
void pa_mempool_set_is_remote_writable(pa_mempool *p, bool writable);
|
||||
size_t pa_mempool_block_size_max(pa_mempool *p);
|
||||
|
||||
/* For receiving blocks from other nodes */
|
||||
pa_memimport* pa_memimport_new(pa_mempool *p, pa_memimport_release_cb_t cb, void *userdata);
|
||||
void pa_memimport_free(pa_memimport *i);
|
||||
pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_id, size_t offset, size_t size);
|
||||
pa_memblock* pa_memimport_get(pa_memimport *i, uint32_t block_id, uint32_t shm_id,
|
||||
size_t offset, size_t size, bool writable);
|
||||
int pa_memimport_process_revoke(pa_memimport *i, uint32_t block_id);
|
||||
|
||||
/* For sending blocks to other nodes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue