diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-08-16 09:28:15 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-16 09:39:32 -0700 |
commit | 44d9f62f34e0561d83ea32941f0ea1b529b1490d (patch) | |
tree | 5345eba046b6e3bcf8c063e7bae8b501b7a99f4a /src/inputStream_http.c | |
parent | f9f70860622613686e6ac0bf7ebd448f437d92a7 (diff) | |
download | mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.tar.gz mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.tar.xz mpd-44d9f62f34e0561d83ea32941f0ea1b529b1490d.zip |
core rewrite (decode,player,outputBuffer,playlist)
This is a huge refactoring of the core mpd process. The
queueing/buffering mechanism is heavily reworked.
The player.c code has been merged into outputBuffer (the actual
ring buffering logic is handled by ringbuf.c); and decode.c
actually handles decoding stuff.
The end result is several hundreds of lines shorter, even though
we still have a lot of DEBUG statements left in there for
tracing and a lot of assertions, too.
Diffstat (limited to 'src/inputStream_http.c')
-rw-r--r-- | src/inputStream_http.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 48972ac8b..a6c715459 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -252,7 +252,7 @@ static int trigger_action(struct http_data *data, goto out; } if (nonblocking) - cond_timedwait(&data->action_cond, 1); + cond_timedwait(&data->action_cond, 100); else cond_wait(&data->action_cond); ret = 0; @@ -279,7 +279,7 @@ static int take_action(struct http_data *data) xclose(data->fd); data->fd = -1; data->action = CONN_ACTION_NONE; - cond_signal_sync(&data->action_cond); + cond_signal(&data->action_cond); cond_leave(&data->action_cond); return 1; } @@ -436,7 +436,7 @@ static void await_buffer_space(struct http_data *data) static void feed_starved(struct http_data *data) { assert(pthread_equal(data->io_thread, pthread_self())); - cond_signal_async(&data->empty_cond); + cond_signal(&data->empty_cond); } static int starved_wait(struct http_data *data, const long sec) @@ -449,7 +449,7 @@ static int awaken_buffer_task(struct http_data *data) { assert(!pthread_equal(data->io_thread, pthread_self())); - return ! cond_signal_async(&data->full_cond); + return ! cond_signal_trysync(&data->full_cond); } static ssize_t buffer_data(InputStream *is) |