input_stream: non-blocking I/O
Add GMutex, GCond attributes which will be used by callers to conditionally wait on the stream. Remove the (now-useless) plugin method buffer(), wait on GCond instead. Lock the input_stream before each method call. Do the same with the playlist plugins.
This commit is contained in:
@@ -168,7 +168,7 @@ mp3_data_init(struct mp3_data *data, struct decoder *decoder,
|
||||
|
||||
static bool mp3_seek(struct mp3_data *data, long offset)
|
||||
{
|
||||
if (!input_stream_seek(data->input_stream, offset, SEEK_SET, NULL))
|
||||
if (!input_stream_lock_seek(data->input_stream, offset, SEEK_SET, NULL))
|
||||
return false;
|
||||
|
||||
mad_stream_buffer(&data->stream, data->input_buffer, 0);
|
||||
|
Reference in New Issue
Block a user