event_pipe: added pipe_event enum and callbacks

Make the event_pipe (formerly main_notify) send/receive a set of
events, with a callback for each one.

The default event PIPE_EVENT_SIGNAL does not have a callback.  It
is still there for waking up the main thread, when it is waiting for
the player thread.
This commit is contained in:
Max Kellermann
2009-01-01 18:22:11 +01:00
parent 22bb5a5856
commit b3e2635ac1
8 changed files with 114 additions and 27 deletions

View File

@@ -66,7 +66,7 @@ idle_add(unsigned flags)
idle_flags |= flags;
g_mutex_unlock(idle_mutex);
event_pipe_signal();
event_pipe_emit(PIPE_EVENT_IDLE);
}
unsigned