summaryrefslogtreecommitdiff
path: root/src/input
AgeCommit message (Collapse)Author
2021-01-21input/curl: disable verify_peer on Android by defaultMax Kellermann
I havn't yet figured out how to use Android's system CA certificates with CURL/OpenSSL, so a temporary workaround is to disable verify_peer by default. The data MPD transfers isn't extremely important, so the servers's authenticity isn't extremely important either.
2021-01-01copyright year 2021Max Kellermann
2020-12-01input/{tidal,qobus}: add missing includes for assert()Max Kellermann
2020-12-01input/tidal: add missing include for assert()Max Kellermann
2020-10-08event/TimerEvent: add type alias for std::chrono::steady_clock::durationMax Kellermann
2020-09-23input/uring: safe cancellationMax Kellermann
My concept with `class CancellableOperation` doesn't work properly, because the kernel may continue to write to the given buffer as soon as the read finishes. To fix this, this commit adds `class ReadOperation` which owns the buffer and the `struct iovec`. Instances of this class persist until the read really finishes, even if the operation is canceled.
2020-09-21input/ffmpeg: add "hls+http://" to the list of supported protocolsMax Kellermann
Same as e10b867fe6ffbac1ac37a333dbd69597e4fc9f03 but it got lost in the merge, because the v0.22 branch uses a different way to detect supported protocols at runtime.
2020-09-21input/Plugin: add `noexcept`Max Kellermann
2020-09-04Merge branch 'v0.21.x' into masterMax Kellermann
2020-08-14input/uring: add `noexcept`Max Kellermann
2020-07-20input/smbclient: close handle on stat errorMax Kellermann
2020-07-20input/smbclient: remove mutex lockingMax Kellermann
This is no longer necessary with the new API.
2020-07-20*/smbclient: use the new API with SMBCCTX parameterMax Kellermann
As a side effect, the input plugin closes the SMB/CIFS connection after closing the file. This solves one part of https://github.com/MusicPlayerDaemon/MPD/issues/916
2020-07-20lib/smbclient/Context: new wrapper for SMBCCTXMax Kellermann
2020-07-16input/Init: downgrade PluginUnconfigured to LogLevel::DEBUGMax Kellermann
`LogLevel::INFO` is logged by default, but this message shall only appear with `--verbose`. This finally solves https://github.com/MusicPlayerDaemon/MPD/issues/430
2020-07-06PluginUnavailable: backport class PluginUnconfigured from masterMax Kellermann
Stop bothering people about the Tidal/Qobuz plugins.
2020-07-01system/ByteOrder: move to util/Max Kellermann
2020-07-01Merge branch 'v0.21.x'Max Kellermann
2020-07-01input/file: detect premature end of fileMax Kellermann
A bug report (https://github.com/MusicPlayerDaemon/MPD/issues/912) suggests that on Linux, reading on `cifs` files may rarely return 0 (= end of file) before the end of the file has really been reached. But that's just a theory which I need to validate, so this runtime check shall catch this condition before the assertion in DecoderBridge::Read() crashes MPD. Let's see. Closes https://github.com/MusicPlayerDaemon/MPD/issues/912
2020-05-30use std chr functionsRosen Penev
The ones in std have overloads for const char/char. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-27archive/ArchiveList, input/Registry: avoid zero-sized arrayMax Kellermann
Some more `-Wpedantic` fixups.
2020-05-05input/uring: new input plugin using io_uringMax Kellermann
This is the final piece of the series to establish io_uring support on Linux. MPD doesn't need io_uring for its efficient bulk I/O support, but to allow file I/O to be cancelled. This is a big problem on CIFS/NFS mounts where processes sleep uninterruptable if the file server disappears, deadlocking MPD. With io_uring, a flaky NFS connection allows MPD to continue to work (even though there are still deadlocks inside MPD which need to be addressed). This plugin does not yet use cancellable `open()` using `IORING_OP_OPENAT`. This will be implemented later. Lots of other optimization opportunities for io_uring are still missing as well - for example the database update could benefit a lot, but unfortunately, io_uring doesn't have `readdir()` support just yet.
2020-05-05*/plugins/meson.build: define feature macros in Features.hMax Kellermann
This makes ccache more efficient when recompiling with different plugins.
2020-05-05system/FileDescriptor: move to io/Max Kellermann
2020-04-08input/Plugin: copy protocols() to stack before using itMax Kellermann
Fixes regression by commit 015cbff93da causing a crash bug because the iterators of two different temporaries were used.
2020-04-08[cppcheck] convert several functions to use std::all_ofRosen Penev
std::all_of becomes constexpr in C++20. I'm not sure it results in better performance. Found with useStlAlgorithm Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26[clang-tidy] change integer prefixes to uppercaseRosen Penev
Found with readability-uppercase-literal-suffix Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26event/*, ...: make GetEventLoop() constMax Kellermann
2020-03-16add two extra noreturn that clang picked upRosen Penev
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16Merge remote-tracking branches 'neheb/fwhfggwe', 'neheb/nvm2', ↵Max Kellermann
'neheb/nvm22', 'neheb/bvm' and 'neheb/cl2'
2020-03-16fix implicit-fallthrough warnings under clangRosen Penev
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16fix missing overridesRosen Penev
Found with clang's -Winconsistent-missing-destructor-override Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16remove gcc_unusedRosen Penev
[[maybe_unused]] (introduced in C++17) is standard C++. https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused says that this is equivalent to the GNU unused attribute. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-13util/ASCII: migrate to std::string_viewMax Kellermann
2020-03-12replace stdint.h with cstdintRosen Penev
The former is deprecated by C++14. The standard says they are the same: The header defines all types and macros the same as the C standard library header<stdint.h>. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12replace stddef.h with cstddefRosen Penev
The former is deprecated with C++14. The standard says both are the same: The contents and meaning of the header<cstddef>are the same as the C standard library header<stddef.h>,except that it does not declare the type wchar_t, that it also declares the type byte and its associated operations (21.2.5), and as noted in 21.2.3 and 21.2.4. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12replace assert.h with cassertRosen Penev
The former was deprecated with C++14. According to the C++11 and C++17 standards, both files are identical. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12[clang-tidy] use nodiscardRosen Penev
Introduced in C++17. It replaces gcc's warn_unused_result. Found with modernize-use-nodiscard. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-16[clang-tidy] add ending namespace commentsRosen Penev
Found with llvm-namespace-comment Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-16input/cache/Manager: add method Flush()Max Kellermann
2020-02-04[clang-tidy] change integer prefixes to uppercaseRosen Penev
Found with readability-uppercase-literal-suffix Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-02[clang-tidy] convert several functions to const &Rosen Penev
Found with performance-unnecessary-value-param Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-02Merge remote-tracking branches 'neheb/uniq', 'neheb/bool', 'neheb/loop', ↵Max Kellermann
'neheb/bool2', 'neheb/perf', 'neheb/void' and 'neheb/value'
2020-02-01[clang-tidy] remove pointless void argRosen Penev
Found with modernize-redundant-void-arg Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01[clang-tidy] convert several loops to const auto&Rosen Penev
Found with performance-for-range-copy Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01*: add `explicit`Max Kellermann
2020-02-01*: use `auto`Max Kellermann
2020-02-01*: use nullptr instead of NULLMax Kellermann
2020-02-01*: use defaulted destructorsMax Kellermann
2020-01-31[clang-tidy] use override instead of virtualRosen Penev
Found with modernize-use-override Signed-off-by: Rosen Penev <rosenp@gmail.com>