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
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
Max Kellermann
60fae87e59
doc/mpdconf.example: move "replaygain_limit" to user.rst
2024-04-15 18:58:53 +02:00
Max Kellermann
3145b10f51
doc/mpdconf.example: remove advanced replay gain settings
...
Keep the example file short, omit settings that are probably only used
by few users.
2024-04-15 18:55:03 +02:00
Max Kellermann
75047a26f8
doc/mpdconf.example: fix replaygain_limit description
...
The description (added by commit 43806d524d
) was wrong.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1977
2024-04-15 18:51:27 +02:00
Max Kellermann
1e4bf90c60
io, net, evnet: quote file names in error messages
2024-04-10 13:36:05 +02:00
Max Kellermann
b3a31b69ee
util/RedBlackTree: fix lost "right" child while swapping with successor
...
Fixes a tree corruption bug that led to assertion failures.
2024-04-10 13:35:31 +02:00
Max Kellermann
88475f2e2b
util/RedBlackTree: swap colors when swapping with successor
...
Swapping was incomplete without swapping the colors; this led to
assertion failures under certain conditions.
2024-04-10 13:35:28 +02:00
Max Kellermann
3cf0896998
test/util/TestIntrusiveTreeSet: add test with large randomized tree, erasing random elements
...
Test fails currently due to two bugs in the red-black tree
implementation.
2024-04-10 13:35:24 +02:00
Max Kellermann
e0a53d4747
util/IntrusiveTreeSet: add debug method Check()
...
Only for the unit test.
2024-04-10 13:35:21 +02:00