v4l2: in alloc buffer, don't mmap, just pass the fd

If we can't use EXPBUF, just put the fd and mapoffset in the buffer
memory. This way we can pass the fd to the client and let it mmap .
This commit is contained in:
Wim Taymans 2020-09-27 17:07:29 +02:00
parent 59990ea049
commit 9f1d84e37c
2 changed files with 14 additions and 21 deletions

View file

@ -89,7 +89,8 @@ struct control {
struct port {
struct impl *impl;
bool export_buf;
bool alloc_buffers;
bool have_expbuf;
bool next_fmtdesc;
struct v4l2_fmtdesc fmtdesc;
@ -963,7 +964,8 @@ impl_init(const struct spa_handle_factory *factory,
port->info.params = port->params;
port->info.n_params = 6;
port->export_buf = true;
port->alloc_buffers = true;
port->have_expbuf = true;
port->have_query_ext_ctrl = true;
port->dev.log = this->log;
port->dev.fd = -1;