summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2019-12-24Revert "lib/curl/Global: remove lower bound on timeouts"Max Kellermann
This reverts commit 4475b8ca04b2798519d0f6eb68913c55cf3d1846. Further testing revealed that the threaded resolver still uses a timeout of 0ms. This revert however lowers the bound to a minimum of 1ms instead of 10ms.
2019-12-23lib/curl/Global: remove InvalidateSockets() call from Remove()Max Kellermann
curl_multi_remove_handle() calls our socket function, and there's no need to call curl_multi_socket_action().
2019-12-23lib/curl/Global: remove lower bound on timeoutsMax Kellermann
This was a problem 9 years ago, and apparently, it has been fixed long ago.
2019-12-23lib/curl: drop support for CURL versions older than 7.32.0Max Kellermann
For simplicity, this commit removes a workaround for an old CURL bug.
2019-12-16pcm/Convert, ...: add missing include for std::runtime_errorMax Kellermann
2019-12-16lib/gcrypt/MD5: add missing include for uint8_tMax Kellermann
2019-12-16lib/xiph: add missing meson dependencyJacob Vosmaer
2019-12-04util/PrintException, ...: update copyrightMax Kellermann
2019-11-04lib/sqlite: disable if -Ddatabase=falseMax Kellermann
Fixes build failure in StickerCommands.cxx.
2019-10-15lib/curl/Escape: add CurlUnescape()Max Kellermann
2019-10-15storage/curl: move code to EscapeUriPath()Max Kellermann
2019-10-15lib/curl/String: OO wrapper for allocated strings returned from CURLMax Kellermann
2019-10-07lib/icu: fix build with iconv()Andre Heider
2019-08-06input/cdio_paranoia: drop support for libcdio-paranoia older than 10.2+0.93+1Max Kellermann
Version 10.2+0.93+1 was released five years ago in 2014 and is the first version to feature cdio_cddap_free_messages(). There is no way to check the libcdio-paranoia version at compile time, so let's just remove support for older versions instead of attempting to fix the cdio_cddap_free_messages() check at build time. Closes https://github.com/MusicPlayerDaemon/MPD/issues/613
2019-08-02lib/xiph/OggVisitor: invoke OnOggPacket() with the "E_O_S" packetMax Kellermann
The "end of stream" packet is not special; it contains normal data, and thus we should pass it to OnOggPacket(). This fixes one part of https://github.com/MusicPlayerDaemon/MPD/issues/601
2019-08-02lib/xiph/OggVisitor: more API documentationMax Kellermann
2019-03-18src/lib/gcrypt/meson.build: use dependency() for quering linker flagsJörg Krause
Since version 0.49.0 the Meson build system has native support for finding and using the gcrypt library using the `dependency()` function. `dependency()` has the advantage over `find_library()` as it queries the required linker flags for proper linking with external libraries, e.g. libgpg-error. As the latest released version 1.8.4 of libgcrypt does not provide a .pc file, using `libgcrypt-config` is the only way to query the required linker flags. Unfortunately, there is an issue when cross compiling mpd and the user does not define `libgcrypt-config` in the cross file. If the user sets the qobuz feature to `auto` and the target does not have libgcrypt installed, the Meson build system will falsly assume libgcrypt is available for the target as it uses the native `libgcrypt-config` on the host and pretend is has found the library. Therefore, we still rely on `find_library()` to workaround this buggy behavior. This way, if qobuz feature detection is set to `auto`, the feature is disabled in case there is no target libgcrypt available. Fixes building mpd statically with the qobuz feature enabled. Otherwise the build fails with undefined references because of the missing libgpg-error dependency: ``` /sysroot/usr/lib/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_strerror': visibility.c:(.text+0x14): undefined reference to `gpg_strerror' ```
2019-03-17lib/xiph: disable Tremor detection if libvorbis was foundMax Kellermann
And disable libvorbis detection if Tremor was explicitly enabled. This fixes a crash bug caused by libvorbis/Tremor ABI conflict caused by commit 4f7d52dbf2eaee15a517363c846650d76f45739f
2019-03-17decoder/ogg: ignore the BOS packet after seek to the beginning of songMax Kellermann
Previously, MPD would skip the current song after attempting to seek to its beginnig, because that was a seek to offset 0. At offset 0, MPD will see the BOS packet again, which results in throwing StopDecoder in MPDOpusDecoder::OnOggEnd(). Closes https://github.com/MusicPlayerDaemon/MPD/issues/470
2019-02-23Ensure SEEK_SET is set on systems where stdio.h is not pulled in by accident.Thomas Zander
2019-02-21lib/dbus/udisks2: parse the MountPoints propertyMax Kellermann
2019-02-21lib/dbus/ReadIter: add dbus_message_iter_get_fixed_array() wrapperMax Kellermann
2019-02-19lib/cdio/Paranoia: add method GetDiscSectorRange()Max Kellermann
2019-02-15nfs: work around assertion failure on exception during program initMax Kellermann
Closes #477
2019-01-21input/CdioParanoia: C++ wrappers for libcdio typesMax Kellermann
2019-01-21python/build/libs.py: upgrade CURL to 7.63.0Max Kellermann
2019-01-21meson: add fixed-point Vorbis (Tremor) decoder supportJörg Krause
Re-add build support for the fixed-point Vorbis (Tremor) decoder, which was dropped when switching from Autotools to Meson. Note, that it is not possible to build both, the Vorbis and the Tremor decoder. Closes: #405
2018-12-28remove libwrap supportMax Kellermann
libwrap is an obscure artefact from a past long ago, when source IP address meant something. And its API is "interesting"; it requires the application to expose two global variables `allow_severity` and `deny_severity`. This led to bug #437. I don't want to declare those variables; instead, I'd like to remove libwrap support. Closes #437
2018-12-04alsa/NonBlock: throw on snd_pcm_poll_descriptors_revents() errorMax Kellermann
This function is sparsely documented and a look at the bluez-alsa source code shows that implementations make undocumented assumptions on the `struct pollfd` array parameter which can lead to strange effects.
2018-11-19check.h: remove obsolete headerMax Kellermann
Since we switched from autotools to Meson in commit 94592c14062d5afc9482d11baa401648082022c0, we don't need to include `config.h` early to properly enable large file support. Meson passes the required macros on the compiler command line instead of defining them in `config.h`. This means we can include `config.h` at any time, whenever we want to check its macros, and there are no ordering constraints.
2018-11-11song/StringFilter: support regular expressions with "=~" and "!~"Max Kellermann
This feature requires `libpcre`.
2018-11-11{output,mixer}/alsa: use snd_pcm_poll_descriptors_revents()Max Kellermann
This call was missing, causing very high CPU usage when the ALSA output plugin was used with dmix. Closes #391
2018-11-11lib/alsa/NonBlock: move the functions into a class managing the stateMax Kellermann
2018-11-07lib/zlib/meson.build: add zlib_dep to `declare_dependency`Max Kellermann
Fixes potential compiler error when zlib is installed in a non-standard directory.
2018-11-07lib/zlib/meson.build: define ENABLE_ZLIBMax Kellermann
Fixes #414
2018-11-04decoder/ffmpeg: require FFmpeg 3.1 or laterMax Kellermann
Drop some compatibility code.
2018-11-04lib/xiph/meson.build: the Vorbis encoder requires the Vorbis decoderMax Kellermann
Without the Vorbis decoder, `libvorbis` is never detected, leading to linker failures when attempting to build the Vorbis encoder.
2018-11-04lib/xiph/meson.build: fix typo, replace `and` with `or`Max Kellermann
Fixes linker failure when building without FLAC support. Closes #400
2018-11-01src/lib/ffmpeg/meson.build: copy dependencies into ffmpeg_depMax Kellermann
Apparently, Meson propagates the linker flags but not the compiler flags from a `static_library`'s dependencies list. Closes #392
2018-10-31*: copyright year 2018Max Kellermann
2018-10-31output/roar: removeMax Kellermann
Bugs in libroar which broke the MPD build have been annoying me for quite some time, and the newest bug has now hit my main build machine: https://github.com/MusicPlayerDaemon/MPD/issues/377 Problem is the usage of the typedef `_IO_off64_t` in libroar's `vio_stdio.h`: int roar_vio_to_stdio_lseek (void *__cookie, _IO_off64_t *__pos, int __w); This `_IO_off64_t` is an internal implementation detail of glibc and was removed in version 2.28. Nobody must ever use it. Why the **** did the RoarAudio developers use it? Not using internal typedefs isn't exactly rocket science. This annoys me enough to finally remove the plugin. Anyway, I've never heard of anybody using RoarAudio, so my best guess is that nobody will notice.
2018-10-14build with Meson instead of autotoolsMax Kellermann
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
2018-09-21decoder/Client: use std::chrono::duration<double> instead of raw `double`Max Kellermann
2018-09-02lib/dbus/ReadIter: switch off -Wshadow on GCC<8Max Kellermann
GCC 6.3.0 emits bogus warnings like this: In file included from src/lib/dbus/UDisks2.cxx:22:0: src/lib/dbus/ReadIter.hxx: In instantiation of 'ODBus::ReadMessageIter::ForEachProperty(F&&)::<lambda(auto:2&&)> [with auto:2 = ODBus::ReadMessageIter; F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]': src/lib/dbus/ReadIter.hxx:102:6: required from 'ODBus::ReadMessageIter::ForEachRecurse(int, F&&)::<lambda(auto:1&&)> [with auto:1 = ODBus::ReadMessageIter&; F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]' src/lib/dbus/ReadIter.hxx:92:5: required from 'void ODBus::ReadMessageIter::ForEach(int, F&&) [with F = ODBus::ReadMessageIter::ForEachRecurse(int, F&&) [with F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]::<lambda(auto:1&&)>]' src/lib/dbus/ReadIter.hxx:101:3: required from 'void ODBus::ReadMessageIter::ForEachRecurse(int, F&&) [with F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]' src/lib/dbus/ReadIter.hxx:114:3: required from 'void ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]' src/lib/dbus/UDisks2.cxx:71:30: required from here src/lib/dbus/ReadIter.hxx:114:53: error: declaration of 'ODBus::ReadMessageIter&& i' shadows a parameter [-Werror=shadow] ForEachRecurse(DBUS_TYPE_DICT_ENTRY, [&f](auto &&i){ ^ src/lib/dbus/ReadIter.hxx:101:33: note: shadowed declaration is here ForEach(arg_type, [&f](auto &&i){ ^
2018-08-20Compiler.h: move to util/Max Kellermann
2018-08-20lib/nfs/Connection: add LstatThomas Guillem
2018-08-20Merge branch 'v0.20.x'Max Kellermann
2018-08-20lib/nfs/Connection: use nfs_stat64_asyncThomas Guillem
Since nfs_stat_async is deprecated.
2018-08-17lib/curl/Easy: add curl_easy_escape() wrapperMax Kellermann
2018-08-09decoder/Thread, ...: log all exceptionsMax Kellermann