Commit Graph

18459 Commits

Author SHA1 Message Date
Max Kellermann 1c69498c58 .github/workflows/build.yml: do not install yajl on macOS
The Brew package of yajl is broken, it fails to build:

 In file included from ../src/lib/yajl/Handle.cxx:4:
 In file included from ../src/lib/yajl/Handle.hxx:6:
 /opt/homebrew/Cellar/yajl/2.1.0/include/yajl/yajl_parse.h:22:10: fatal error: 'yajl/yajl_common.h' file not found
 #include <yajl/yajl_common.h>
          ^~~~~~~~~~~~~~~~~~~~
 1 error generated.

Therefore, MPD cannot support building with yajl on macOS.
2024-05-06 13:39:02 +02:00
Max Kellermann 615f6f50ce lib/yajl: drop "yajl/" prefix from #include paths
According to the yajl API documentation, #include lines should have
the "yajl/" path prefix, but the actual pkg-config file contains:

 includedir=${dollar}{prefix}/include/yajl

.. which already contains this directory name, and thus the "yajl/"
prefix cannot work.  Unfortunately, the yajl project hasn't been
maintained for nearly 10 years, and there's little chance this bug
will ever be fixed.
2024-05-06 13:31:34 +02:00
Max Kellermann 79df6a646b Merge branch 'mpdlib' of https://github.com/DDRBoxman/MPD 2024-05-06 13:03:50 +02:00
Max Kellermann 89d68fb2af Merge branch 'debian-build-doc' of https://github.com/mxjeff/MPD 2024-05-06 13:03:05 +02:00
Max Kellermann 03b674ce73 net/meson.build: compile IPv[46]Address.cxx only if TCP is enabled 2024-05-06 12:57:55 +02:00
Max Kellermann 9c421997bf net/SocketDescriptor: WriteNoWait() uses MSG_NOSIGNAL 2024-05-06 12:55:02 +02:00
Max Kellermann 3813433e02 test/net/TestLocalSocketAddress: add unit tests for GetLocalRaw() 2024-05-06 12:54:45 +02:00
Max Kellermann 73509fc189 net/LocalSocketAddress: new class wrapping struct sockaddr_un 2024-05-06 12:54:45 +02:00
Max Kellermann 7c9b7fa311 net/SocketAddress: use std::string_view::find() instead of std::memchr() 2024-05-06 12:54:45 +02:00
Max Kellermann cbba22c947 net/SocketAddress: include IPv[46]Address.hxx only ifdef HAVE_TCP 2024-05-06 12:50:44 +02:00
Max Kellermann f8529d4fe6 net/{Allocated,Static}SocketAddress: inline GetLocalRaw() 2024-05-06 12:50:29 +02:00
Max Kellermann 2a206ef309 net/StaticSocketAddress: add method GetLocalPath() 2024-05-06 12:50:24 +02:00
Max Kellermann 6200c0dc46 net/StaticSocketAddress: include <string_view> only ifdef HAVE_UN 2024-05-06 12:50:19 +02:00
Max Kellermann 1760310123 Revert "util/IntrusiveList: allow the last disposer to destroy the IntrusiveList"
This reverts commit 669cbcd25a
("util/IntrusiveList: allow the last disposer to destroy the
IntrusiveList").  It was bad because it could lead to off-by-one crash
bugs when the last item was removed inside the previous item's
disposer.

We need a different solution for the other crash bug that was fixed by
the reverted commit.
2024-05-06 12:49:30 +02:00
Max Kellermann c8ed28e9c6 test/util/TestIntrusiveList: add test for clear_and_dispose() with modifying disposer 2024-05-06 12:49:04 +02:00
Max Kellermann 56d4784b11 util/IntrusiveList: add API documentation 2024-05-06 12:48:53 +02:00
Max Kellermann 4d3adaa557 event/SocketEvent: erase IMPLICIT_FLAGS in Cancel{Read,Write}()
Without this, calling CancelRead() after ScheduleRead() would leave
the HANGUP scheduled, and the caller could receive HANGUP events over
and over which are never properly handled, leading to a busy loop.

The semantics of this API are hard to get right, because the
IMPLICIT_FLAGS (a property of epoll) are somewhat weird.  But it seems
that this change repairs a side effect of the SocketEvent interface
that seemed counterintuitive.
2024-05-06 12:48:42 +02:00
Max Kellermann 6830cf9dcf net/AllocatedSocketAddress: add SetLocal() overload with std::string_view 2024-05-06 12:48:42 +02:00
Max Kellermann 4ba288501d .github/workflows/build.yml: install ccache manually
This eliminates the additionoal "apt-get install" call by
ccache-action.
2024-05-06 12:46:44 +02:00
Colin Edwards 9dcd0604f2 android: Install the libmpd.so output on android
libmpd.so was getting written as a file called `arm64-v8a` instead of `arm64-v8a/libmpd.so`
2024-05-04 00:13:25 -05:00
kaliko 5a9b0c7142 doc: debian build, add pkconf build dep.
Build dep on pkconf is not explicitly needed because other dependencies
pull pkconf indirectly (ie libid3tag0-dev), but explicit declaration of
a direct MPD build dep is better IMHO.
2024-04-28 15:06:27 +02:00
Max Kellermann 823d6c9c0f Merge branch 'android_deps' of https://github.com/DDRBoxman/MPD 2024-04-24 14:52:31 +02:00
Colin Edwards 57e26eb832 android: Always force wrap deps
This ensures that android is always built with the deps we build
with wrap.

Also put back the asm disable for openssl since the version we use needs
that flag
2024-04-23 17:58:43 -05:00
jcorporation f9c2c2b558 Remove deprecation flag for volume command 2024-04-23 20:37:55 +02:00
Colin Edwards a0e9dfbec2 android: null check intent in onStartCommand
For some reason the type annotations here show @NonNull but that is
actually false according to the documentation under service.

This may be null if the service is being restarted after its process has gone away, and it had previously returned anything except START_STICKY_COMPATIBILITY.
2024-04-23 00:24:32 -05:00
Colin Edwards cb6f61cf37 android: Update to NDK 27 2024-04-22 22:34:34 -05:00
kaliko 964e18ab49 doc: debian build, add libpipewire 2024-04-16 19:51:46 +02:00
kaliko 709acd8920 doc: debian build, add libsystemd 2024-04-16 19:18:57 +02:00
kaliko 6f0aecbfb3 doc: debian build, fixed libexpat-dev 2024-04-16 19:05:23 +02:00
Max Kellermann 7ebe56fdd9 util/SpanCast: allow ToStringView() only with integral char types
This avoids std::string_view specialization that make no sense.
2024-04-16 12:37:08 +02:00
Max Kellermann fae235197f util/SpanCast: allow ReferenceAsBytes() only with trivially-copyable
Addd the std::has_unique_object_representations_v constraint so we
cast stuff to std::byte only if this would make sense.
2024-04-16 12:33:36 +02:00
Max Kellermann 141f518bdd .github/workflows/build.yml: add missing backslashes 2024-04-16 12:10:32 +02:00
Max Kellermann d9fefbbc5a .github/workflows/build.yml: run Meson manually without BSFishy/meson-build
This eliminates the options duplication in the "build" and "tests" steps.
2024-04-16 12:07:50 +02:00
Max Kellermann 122d71a05d .github/workflows/build.yml: build only on Ubuntu 22.04 2024-04-16 12:03:24 +02:00
Max Kellermann 3b4825dd29 .github/workflows/build.yml: do not install outdated libfmt-dev 2024-04-16 11:51:19 +02:00
Max Kellermann 0c1ecc96a8 *: let libfmt quote strings 2024-04-16 11:50:18 +02:00
Max Kellermann 39c9e92f42 lib/fmt: require libfmt 9
Version 9 added the "debug format" which I'd like to use.
2024-04-16 11:50:18 +02:00
Max Kellermann 08810991c2 .github/workflows/build.yml: install ccache manually
This eliminates the additionoal "apt-get install" call by
ccache-action.
2024-04-16 11:39:40 +02:00
Max Kellermann f8581c4d6a doc/user.rst: switch to Debian Bookworm 2024-04-16 11:33:00 +02:00
Max Kellermann 0d8498f1d1 lib/fmt/SocketAddressFormatter: simpler template syntax 2024-04-16 11:02:36 +02:00
Max Kellermann 7198db758d lib/fmt/PathFormatter: eliminate AllocatedPath specialization with std::convertible_to<Path> 2024-04-16 11:00:21 +02:00
Max Kellermann 7a4743d00e config/File: add missing include 2024-04-16 11:00:21 +02:00
Max Kellermann ae85c2a979 db/Configured: log debug message when there is no cache directory
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1525
2024-04-16 10:57:28 +02:00
Max Kellermann de4bdfcd1f python/build/libs.py: disable the FFmpeg "LEAD MCMP" decoder
This decoder causes linker failures and MPD has no use for it anyway.
2024-04-15 22:28:03 +02:00
Max Kellermann 9c7b930f8f Merge branch 'alsa-drain-recovery' of https://github.com/borine/MPD 2024-04-15 22:21:53 +02:00
Max Kellermann 9e8bca4879 python/build/libs.py: update FFmpeg to 7.0 2024-04-15 22:05:08 +02:00
Max Kellermann 5bd3934c00 python/build/libs.py: update WildMidi to 0.4.6 2024-04-15 22:05:08 +02:00
Max Kellermann 57212d5a35 player/Thread: remove unnecessary StartDecoder() call
Let Run() do this in the next loop iteration.
2024-04-15 21:49:11 +02:00
Max Kellermann 7236f83999 player/Thread: do not start the decoder twice
Upon receiving PlayerCommand::QUEUE, call StartDecoder() only if the
decoder is not already starting.  Checking just
DecoderControl::IsIdle() is not enough because the decoder may already
have finished decoding the song before the player has started playing
it and before it had a chance to call CheckDecoderStartup().

Omitting the StartDecoder() call now means it will be started later in
the Run() main loop, after CheckDecoderStartup() has succeeded (which
effectively switches to the song that has already been decoded by the
current decoder).

This fixes an assertion failure when compiled in debug mode
(`-Db_ndebug=false`) and random noise playback in non-debug mode
(`-Db_ndebug=true`).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/1900
2024-04-15 21:39:53 +02:00
Max Kellermann c8ece786dd player/Thread: add assert() to StartDecoder()
StartDecoder() must not be called when a decoder is still being
started.  This detects the bug
https://github.com/MusicPlayerDaemon/MPD/issues/1900 earlier.
2024-04-15 21:36:11 +02:00