Commit Graph

306 Commits

Author SHA1 Message Date
Max Kellermann 41cdc4e14b input/Offset: add macro PRIoffset 2018-07-06 19:06:05 +02:00
Max Kellermann 87dfca0477 input/curl: remove obsolete Windows sprintf() fallback
See commit be137a191e
2018-07-06 19:05:09 +02:00
Max Kellermann 1ca1269a59 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).
2018-06-22 22:33:16 +02:00
Max Kellermann d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
Max Kellermann 01d8eb6290 input/rewind: move sources out of the "plugins" directory
This is not a plugin.
2018-06-22 19:31:06 +02:00
Max Kellermann a8568d7246 Merge branch 'v0.20.x' 2018-05-03 20:15:11 +02:00
Max Kellermann ac61fd1d78 {input,output}/alsa: work around -Wswitch due to SND_PCM_STATE_PRIVATE1 2018-05-03 11:59:18 +02:00
Max Kellermann b7dc3fae7c Merge branch 'v0.20.x' 2018-03-15 20:08:13 +01:00
Max Kellermann 73013a3c04 input/thread: move code to Stop()
Fixes crash due to "pure virtual method called" in the "mms" input
plugin.  Closes #253
2018-03-15 19:29:55 +01:00
Max Kellermann 65bbb0e0aa Merge tag 'v0.20.17'
release v0.20.17
2018-02-11 13:22:43 +01:00
Max Kellermann 6ba918b203 input/file: don't use posix_fadvise() on Android
Requires Android API 21, but we want to support older versions as
well.
2018-02-09 22:54:22 +01:00
Max Kellermann 88bc3a9271 input/qobuz: implement InputPlugin::scan_tags() 2018-01-26 20:08:01 +01:00
Max Kellermann 2e32cf7b87 input/tidal: implement InputPlugin::scan_tags() 2018-01-26 20:08:01 +01:00
Max Kellermann ec31e8df1d input/qobuz: remove obsolete prototypes 2018-01-26 19:29:38 +01:00
Max Kellermann b56bfbae26 input/tidal: add setting "audioquality" 2018-01-26 19:18:13 +01:00
Max Kellermann f55b1415d4 input/qobuz: move code to ExtractQobuzTrackId() 2018-01-26 18:48:15 +01:00
Max Kellermann 67693c6ad0 input/qobuz: add setting "format_id" 2018-01-26 17:30:28 +01:00
Max Kellermann fce061b544 input/tidal: move code to ExtractTidalTrackId() 2018-01-26 17:29:58 +01:00
Max Kellermann 93765fcb30 input/{tidal,qobuz}: remove unused list_base_hook 2018-01-26 16:56:56 +01:00
Max Kellermann b221bd7472 input/qobuz: remove bogus "noexcept"
This change was missing in 47fa8c4cf6
2018-01-25 15:19:33 +01:00
Max Kellermann 47fa8c4cf6 input/{tidal,qobus}: add bogus "noexcept"
The CurlRequest constructor can throw exceptions, therefore we must
not use "noexcept".
2018-01-25 12:58:58 +01:00
Max Kellermann 7640609b41 input/tidal: retry if session is expired 2018-01-24 15:35:02 +01:00
Max Kellermann e8e6357b73 input/tidal/Error: add method IsInvalidSession() 2018-01-24 15:34:59 +01:00
Max Kellermann 4398101706 input/tidal: parse subStatus in error responses 2018-01-24 15:34:57 +01:00
Max Kellermann 2e1481f49d input/tidal: add exception class TidalError
Allows catchers to inspect the HTTP status.
2018-01-24 15:34:54 +01:00
Max Kellermann c7c087a0d2 input/tidal: add some debug logging 2018-01-24 15:29:30 +01:00
Max Kellermann 97f670658f util/StringFormat: new utility library 2018-01-24 13:28:28 +01:00
Max Kellermann 4324fb2fbe input/Offset: add macro PRIoffset 2018-01-24 13:26:43 +01:00
Max Kellermann e4cb74cf7b input/curl: remove obsolete Windows sprintf() fallback
See commit be137a191e
2018-01-24 13:26:18 +01:00
Max Kellermann 4a330a4c33 input/qobuz: use class DelegateCurlResponseHandler to eliminate duplicate code 2018-01-24 11:33:01 +01:00
Max Kellermann 75e60669a7 input/tidal: include cleanup 2018-01-24 11:33:01 +01:00
Max Kellermann 1da64fb79c lib/curl/Delegate: helper class for response body parsers
Eliminate duplicate code.
2018-01-23 16:48:43 +01:00
Max Kellermann d084950b1a input/qobuz: dispose the TidalLoginRequest earlier 2018-01-21 20:17:50 +01:00
Max Kellermann 2ce10f2fed input/qobuz: dispose the QobuzTrackRequest 2018-01-21 19:59:17 +01:00
Max Kellermann 036094799b input/qobuz: pass std::string by value to OnQobuzTrackSuccess() 2018-01-21 19:58:21 +01:00
Max Kellermann 2da6ab2a45 input/qobuz: dispose the QobuzLoginRequest earlier 2018-01-21 19:45:03 +01:00
Max Kellermann 91a512606b input/qobuz: remove unused variable 2018-01-21 15:01:31 +01:00
Max Kellermann 542bbb0889 input/qobuz: parse and report message from error responses 2018-01-21 12:52:54 +01:00
Max Kellermann 714e69e708 input/qobuz: create JSON parser on demand 2018-01-21 12:49:10 +01:00
Max Kellermann cb87ed29d8 input/tidal: invoke login handlers on second request
Fixes a freeze bug.
2018-01-21 12:41:19 +01:00
Max Kellermann 570c6765b0 input/tidal: parse and report userMessage from error responses 2018-01-21 12:30:46 +01:00
Max Kellermann 12a2285ba5 input/tidal: create JSON parser on demand 2018-01-21 12:29:52 +01:00
Max Kellermann 27e4656515 input/{file,archive}: remove the dummy InputPlugin instances
These have no use, exception for creating an artificial dependency
from input_plugins[] to all archive plugins.
2018-01-20 19:07:34 +01:00
Max Kellermann e0a09dbd69 input/thread: add "noexcept" 2018-01-20 18:54:29 +01:00
Max Kellermann 20d01be1ad input/mms: use class ScopeUnlock 2018-01-20 18:51:00 +01:00
Max Kellermann d6b62d7512 input/tidal: delete request objects upon completion 2018-01-20 00:34:44 +01:00
Max Kellermann ab9d9541a8 input/tidal: pass std::string by value
Don't keep any references to the owner, as the handler method may
delete the owner.
2018-01-20 00:33:01 +01:00
Max Kellermann 2fed3b5e5b input/Tidal*Request: add Start() method
The caller should be able to safely store the instance pointer before
his callback is invoked.
2018-01-19 16:03:05 +01:00
Max Kellermann 1ecad094bd input/tidal: add API documentation 2018-01-19 16:03:03 +01:00
Max Kellermann bbc5212436 fs/AllocatedPath: make the nullptr_t constructor public 2018-01-17 12:17:41 +01:00