input/async: pass EventLoop& to constructor
This commit is contained in:
@@ -76,7 +76,7 @@ public:
|
||||
const char *_uri, Mutex &_mutex, Cond &_cond,
|
||||
const char *_device,
|
||||
snd_pcm_t *_handle, int _frame_size)
|
||||
:AsyncInputStream(_uri, _mutex, _cond,
|
||||
:AsyncInputStream(loop, _uri, _mutex, _cond,
|
||||
ALSA_MAX_BUFFERED, ALSA_RESUME_AT),
|
||||
MultiSocketMonitor(loop),
|
||||
DeferredMonitor(loop),
|
||||
|
||||
@@ -74,8 +74,9 @@ struct CurlInputStream final : public AsyncInputStream, CurlResponseHandler {
|
||||
/** parser for icy-metadata */
|
||||
IcyInputStream *icy;
|
||||
|
||||
CurlInputStream(const char *_url, Mutex &_mutex, Cond &_cond)
|
||||
:AsyncInputStream(_url, _mutex, _cond,
|
||||
CurlInputStream(EventLoop &event_loop, const char *_url,
|
||||
Mutex &_mutex, Cond &_cond)
|
||||
:AsyncInputStream(event_loop, _url, _mutex, _cond,
|
||||
CURL_MAX_BUFFERED,
|
||||
CURL_RESUME_AT),
|
||||
icy(new IcyInputStream(this)) {
|
||||
@@ -420,7 +421,8 @@ CurlInputStream::DoSeek(offset_type new_offset)
|
||||
inline InputStream *
|
||||
CurlInputStream::Open(const char *url, Mutex &mutex, Cond &cond)
|
||||
{
|
||||
CurlInputStream *c = new CurlInputStream(url, mutex, cond);
|
||||
CurlInputStream *c = new CurlInputStream(curl_global->GetEventLoop(),
|
||||
url, mutex, cond);
|
||||
|
||||
try {
|
||||
BlockingCall(c->GetEventLoop(), [c](){
|
||||
|
||||
@@ -48,7 +48,7 @@ class NfsInputStream final : public AsyncInputStream, NfsFileReader {
|
||||
|
||||
public:
|
||||
NfsInputStream(const char *_uri, Mutex &_mutex, Cond &_cond)
|
||||
:AsyncInputStream(_uri, _mutex, _cond,
|
||||
:AsyncInputStream(io_thread_get(), _uri, _mutex, _cond,
|
||||
NFS_MAX_BUFFERED,
|
||||
NFS_RESUME_AT),
|
||||
NfsFileReader(io_thread_get()),
|
||||
|
||||
Reference in New Issue
Block a user