mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
spa: support: loop: assert source type
This commit is contained in:
parent
cfc8510ce8
commit
4ed0365976
1 changed files with 4 additions and 0 deletions
|
|
@ -448,6 +448,7 @@ static int loop_update_io(void *object, struct spa_source *source, uint32_t mask
|
|||
int res;
|
||||
|
||||
spa_assert(s->impl == object);
|
||||
spa_assert(source->func == source_io_func);
|
||||
|
||||
spa_log_trace(impl->log, "%p: update %08x -> %08x", s, source->mask, mask);
|
||||
source->mask = mask;
|
||||
|
|
@ -472,6 +473,7 @@ static int loop_enable_idle(void *object, struct spa_source *source, bool enable
|
|||
int res = 0;
|
||||
|
||||
spa_assert(s->impl == object);
|
||||
spa_assert(source->func == source_idle_func);
|
||||
|
||||
if (enabled && !s->enabled) {
|
||||
if ((res = spa_system_eventfd_write(s->impl->system, source->fd, 1)) < 0)
|
||||
|
|
@ -587,6 +589,7 @@ static int loop_signal_event(void *object, struct spa_source *source)
|
|||
int res;
|
||||
|
||||
spa_assert(s->impl == object);
|
||||
spa_assert(source->func == source_event_func);
|
||||
|
||||
if (SPA_UNLIKELY((res = spa_system_eventfd_write(s->impl->system, source->fd, 1)) < 0))
|
||||
spa_log_warn(s->impl->log, "%p: failed to write event fd %d: %s",
|
||||
|
|
@ -657,6 +660,7 @@ loop_update_timer(void *object, struct spa_source *source,
|
|||
int flags = 0, res;
|
||||
|
||||
spa_assert(s->impl == object);
|
||||
spa_assert(source->func == source_timer_func);
|
||||
|
||||
spa_zero(its);
|
||||
if (SPA_LIKELY(value)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue