mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Make buffer data point to memory blocks
Make buffer data point to a registered memory block by its mem_id. Add some more helpers to allocate memfd backed memory. Allocate buffers in memfd so that we easily share them between client and server. Update pts and seq in v4l2 now that this change will actually be visible at the client.
This commit is contained in:
parent
98993c680b
commit
1169c2419b
19 changed files with 383 additions and 356 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/videodev2.h>
|
||||
|
||||
#include <spa/node.h>
|
||||
#include <spa/memory.h>
|
||||
#include <spa/video/format.h>
|
||||
#include <spa/debug.h>
|
||||
|
||||
|
|
@ -54,8 +55,7 @@ struct _V4l2Buffer {
|
|||
SpaMeta metas[1];
|
||||
SpaMetaHeader header;
|
||||
SpaData datas[1];
|
||||
SpaV4l2Source *source;
|
||||
SpaBuffer *imported;
|
||||
SpaBuffer *outbuf;
|
||||
bool outstanding;
|
||||
struct v4l2_buffer v4l2_buffer;
|
||||
V4l2Buffer *next;
|
||||
|
|
@ -102,7 +102,8 @@ typedef struct {
|
|||
enum v4l2_memory memtype;
|
||||
|
||||
struct v4l2_requestbuffers reqbuf;
|
||||
V4l2Buffer buffers[MAX_BUFFERS];
|
||||
SpaMemory *alloc_mem;
|
||||
V4l2Buffer *alloc_buffers;
|
||||
V4l2Buffer *ready;
|
||||
uint32_t ready_count;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue