mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
link: limit number of buffers when allocating
When we let the nodes allocat buffer, limit the number of buffers to 16 for now. We run out of fds when sending the message. We would need to send the fds in multiple sendmsg calls.
This commit is contained in:
parent
41c63149f9
commit
1d34d994e2
1 changed files with 6 additions and 2 deletions
|
|
@ -33,7 +33,7 @@
|
||||||
#include "link.h"
|
#include "link.h"
|
||||||
#include "work-queue.h"
|
#include "work-queue.h"
|
||||||
|
|
||||||
#define MAX_BUFFERS 32
|
#define MAX_BUFFERS 64
|
||||||
|
|
||||||
/** \cond */
|
/** \cond */
|
||||||
struct impl {
|
struct impl {
|
||||||
|
|
@ -685,8 +685,12 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s
|
||||||
/* when one of the ports can allocate buffer memory, set the minsize to
|
/* when one of the ports can allocate buffer memory, set the minsize to
|
||||||
* 0 to make sure we don't allocate memory in the shared memory */
|
* 0 to make sure we don't allocate memory in the shared memory */
|
||||||
if ((in_flags & SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS) ||
|
if ((in_flags & SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS) ||
|
||||||
(out_flags & SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS))
|
(out_flags & SPA_PORT_INFO_FLAG_CAN_ALLOC_BUFFERS)) {
|
||||||
minsize = 0;
|
minsize = 0;
|
||||||
|
/* limit buffers to 16 because there is a limit on the number of
|
||||||
|
* fds in a message for now */
|
||||||
|
max_buffers = 16;
|
||||||
|
}
|
||||||
|
|
||||||
data_sizes[0] = minsize;
|
data_sizes[0] = minsize;
|
||||||
data_strides[0] = stride;
|
data_strides[0] = stride;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue