Commit 1ca1269a authored by Max Kellermann's avatar Max Kellermann

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).
parent 6681b14b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment