mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
examples: also handle SDL events in main-thread
This commit is contained in:
parent
0b523e4334
commit
47dd97049c
2 changed files with 4 additions and 4 deletions
|
|
@ -452,6 +452,8 @@ static int do_render(struct spa_loop *loop, bool async, uint32_t seq,
|
|||
int i;
|
||||
uint8_t *src, *dst;
|
||||
|
||||
handle_events(d);
|
||||
|
||||
if (d->io->status != SPA_STATUS_HAVE_BUFFER)
|
||||
return 0;
|
||||
|
||||
|
|
@ -506,8 +508,6 @@ static int impl_node_process_input(struct spa_node *node)
|
|||
SPA_ID_INVALID, NULL, 0, true, d)) < 0)
|
||||
return res;
|
||||
|
||||
handle_events(d);
|
||||
|
||||
return d->io->status = SPA_STATUS_NEED_BUFFER;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,8 @@ do_render(struct spa_loop *loop, bool async, uint32_t seq,
|
|||
int i;
|
||||
uint8_t *src, *dst;
|
||||
|
||||
handle_events(data);
|
||||
|
||||
if (buf->datas[0].type == data->type.data.MemFd ||
|
||||
buf->datas[0].type == data->type.data.DmaBuf) {
|
||||
map = mmap(NULL, buf->datas[0].maxsize + buf->datas[0].mapoffset, PROT_READ,
|
||||
|
|
@ -159,8 +161,6 @@ on_stream_new_buffer(void *_data, uint32_t id)
|
|||
true, data);
|
||||
|
||||
pw_stream_recycle_buffer(stream, id);
|
||||
|
||||
handle_events(data);
|
||||
}
|
||||
|
||||
static void on_stream_state_changed(void *_data, enum pw_stream_state old,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue