mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-05 04:06:37 -05:00
libcamera: allocate memory according to the number of discontiguous memory
This commit is contained in:
parent
fb2b314660
commit
d67882fa10
2 changed files with 26 additions and 1 deletions
|
|
@ -69,6 +69,7 @@ struct port {
|
|||
StreamConfiguration streamConfig;
|
||||
|
||||
uint32_t memtype = 0;
|
||||
uint32_t buffers_blocks = 1;
|
||||
|
||||
struct buffer buffers[MAX_BUFFERS];
|
||||
uint32_t n_buffers = 0;
|
||||
|
|
@ -553,7 +554,7 @@ next:
|
|||
param = (struct spa_pod*)spa_pod_builder_add_object(&b,
|
||||
SPA_TYPE_OBJECT_ParamBuffers, id,
|
||||
SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(n_buffers, n_buffers, n_buffers),
|
||||
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1),
|
||||
SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(port->buffers_blocks),
|
||||
SPA_PARAM_BUFFERS_size, SPA_POD_Int(port->streamConfig.frameSize),
|
||||
SPA_PARAM_BUFFERS_stride, SPA_POD_Int(port->streamConfig.stride));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue