input/curl: use class MaybeBufferedInputStream
For remote files (not streams), this downloads as quickly as possible to a large buffer instead of throttling the stream during playback. Throttling can make the server impatient and it may then disconnect. This is what Qobuz and Tidal do, and this commit attempts to solve this by not letting the Qobuz/Tidal server wait (closes #241).
This commit is contained in:
1
NEWS
1
NEWS
@@ -8,6 +8,7 @@ ver 0.21 (not yet released)
|
||||
* player
|
||||
- "one-shot" single mode
|
||||
* input
|
||||
- curl: download to buffer instead of throttling transfer
|
||||
- qobuz: new plugin to play Qobuz streams
|
||||
- tidal: new plugin to play Tidal streams
|
||||
* tags
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "lib/curl/Request.hxx"
|
||||
#include "lib/curl/Handler.hxx"
|
||||
#include "lib/curl/Slist.hxx"
|
||||
#include "../MaybeBufferedInputStream.hxx"
|
||||
#include "../AsyncInputStream.hxx"
|
||||
#include "../IcyInputStream.hxx"
|
||||
#include "IcyMetaDataParser.hxx"
|
||||
@@ -458,7 +459,7 @@ CurlInputStream::Open(const char *url,
|
||||
c->StartRequest();
|
||||
});
|
||||
|
||||
return std::make_unique<IcyInputStream>(std::move(c), std::move(icy));
|
||||
return std::make_unique<MaybeBufferedInputStream>(std::make_unique<IcyInputStream>(std::move(c), std::move(icy)));
|
||||
}
|
||||
|
||||
InputStreamPtr
|
||||
|
Reference in New Issue
Block a user