3a02588fbf
fixup! WIP: rtkit support
2025-03-17 21:01:28 +01:00
27d430d9cf
WIP: rtkit support
2025-03-17 21:01:28 +01:00
b84ffa265c
Add nix-shell
2025-03-17 21:01:27 +01:00
Frank Dana
af649ae85f
Document SELinux-blocked io_uring failures
2025-03-14 22:15:29 -04:00
Camille Scholtz
30e1cbbcba
fs/glue/StandardDirectory: Add standard directories for macOS
2025-03-14 08:25:30 +01:00
Camille Scholtz
86ab4bc62c
config/Path: Always allow getting of XDG... variables
2025-03-13 22:22:14 +01:00
Camille Scholtz
a34bf3588e
fs/glue/StandardDirectory: Remove double import
2025-03-13 22:21:15 +01:00
Max Kellermann
64c9e5a2d4
.gitignore: remove tool-specific patterns
...
If somebody uses tools that create these files, they should put them
in their global gitignore.
2025-03-13 14:55:09 +01:00
Max Kellermann
9f02a88d19
.github/workflows: add more paths-ignore
2025-03-13 14:53:17 +01:00
Max Kellermann
e6a25e7e0b
doc/conf.py: use "sphinx_rtd_theme" only if it is installed
...
Don't fail at build time only because the RTD scheme is not installed.
Such a problem should be detected at configure time.
2025-03-13 14:44:23 +01:00
Max Kellermann
f6337dd95e
doc/conf.py: remove the "~git" version suffix in the 0.24 stable branch
2025-03-13 14:19:32 +01:00
Max Kellermann
42fc26cc6d
.github/workflows/build_android.yml: switch to the installed NDK r27
2025-03-13 11:33:46 +01:00
Max Kellermann
1b6567b31b
test/net/TestIPv[46]Address: initialize WinSock for some of the tests
...
Not necessary with WINE, but the "real" Windows seems to be picky
about this.
2025-03-13 11:26:05 +01:00
Max Kellermann
171bb9b737
test/TestStringFilter: enable another failing test on Windows
2025-03-13 11:25:57 +01:00
Max Kellermann
3626d4ec9a
Revert "lib/icu/Compare: add LINGUISTIC_IGNORECASE [Windows]"
...
This reverts commit 1bd204527e . This
fixes a test on WINE, but fails many others on Windows. D'oh!
2025-03-13 11:22:02 +01:00
Max Kellermann
71c8f4de40
test/TestStringFilter: disable two failing checks on Windows
2025-03-13 10:37:01 +01:00
Max Kellermann
1bd204527e
lib/icu/Compare: add LINGUISTIC_IGNORECASE [Windows]
...
This fixes one check in the "StringFilterTest.Normalize" unit test.
2025-03-13 10:35:42 +01:00
Max Kellermann
9b25d59120
test/TestStringFilter: re-enable two tests on Windows
...
These don't fail anymore. I don't know what has changed since these
`#ifndefs` were added by commit d7f545721b
2025-03-13 10:35:33 +01:00
Max Kellermann
ca5580a560
test/util/TestIntrusiveTreeSet: do not add duplicates in the LargeRandom tests
...
This can fail randomly if the order of identical values is different
in the std::deque and the IntrusiveTreeSet.
2025-03-13 09:55:01 +01:00
Max Kellermann
dd59db2be2
fs/LookupFile: check for empty file name on Windows
...
Fixes crash bug in the (synthetic) unit test. See code comment.
2025-03-13 09:21:04 +01:00
Max Kellermann
c290e0b965
LogBackend: remove the colon after the time stamp
...
This colon with spaces around it looked weird and was somewhat
redundant. Let's use a space only. This looks better if we replace
the space between date and time with a 'T', so it's mostly the ISO8601
format only in local time instead of UTC.
2025-03-13 09:02:01 +01:00
Max Kellermann
689d231809
LogBackend: include year in time stamp
...
Also use a numeric month instead of the month name.
2025-03-13 09:00:37 +01:00
Max Kellermann
84ff3c6a0d
LogBackend: use %T
2025-03-13 08:58:36 +01:00
Max Kellermann
093122aaeb
LogBackend: use fmt to format the time stamp
2025-03-13 08:57:23 +01:00
Max Kellermann
4f981adb97
lib/fmt/Unsafe: new library
2025-03-13 08:55:12 +01:00
Max Kellermann
3945b808a2
CommandLine: update copyright year
2025-03-13 08:30:28 +01:00
Max Kellermann
a171a588cf
queue/QueuePrint: switch to SPDX header
2025-03-13 08:30:28 +01:00
Max Kellermann
2388f38d7d
NEWS: mention the id3tag build failure fix merged from the obsolete v0.23.x branch
2025-03-13 08:30:28 +01:00
Jzavrk
dac2c4df9b
output/plugins/SndioOutputPlugin: Fix sndio volume calculation
...
This commit addresses issues #2226 and MusicPlayerDaemon/ncmpc#95 .
MPD and sndio volume ranges being different, the formula to transform a
value from one set to the other is in the form of `(a * x + b) / c`
where:
- a = output set max value
- b = adjustment term
- c = input set max value
Previous calculation formula had `b = 0`, scaling values too low and
rendering increment impossible. Having `b = out_maxval / 2` balances the
transformation, ensuring a better spread of values across the output
range.
Closes #2226
2025-03-12 12:24:00 +01:00
Max Kellermann
843cb1604d
net: delete UniqueSocketDescriptor.hxx.orig
...
This got committed accidently.
2025-03-11 17:16:58 +01:00
Max Kellermann
59c289c7d8
README.md: update manual and forum links
...
It's on readthedocs and GitHub now.
2025-03-11 13:03:28 +01:00
Max Kellermann
4b85bb57cc
Merge branch 'v0.23.x'
2025-03-11 12:52:05 +01:00
Max Kellermann
a19b6919e0
increment version number to 0.24.1
2025-03-11 11:24:59 +01:00
Max Kellermann
1caeb9b418
release v0.24
2025-03-11 11:05:29 +01:00
Max Kellermann
d3717c5b81
test/util/TestIntrusiveTreeSet: add test with all-zero items
2025-03-11 10:45:33 +01:00
Max Kellermann
90987194cb
.github/workflows/build.yml: run unit tests on Windows
...
The unit tests currently fail on Windows. That needs to be fixed, but
good to know that there are problems currently.
2025-03-11 10:18:19 +01:00
Max Kellermann
2953737478
.github/workflows/build.yml: remove "warning_level=3", it is the default
2025-03-11 10:11:06 +01:00
Max Kellermann
ac3a5e27ec
.github/workflows/build.yml: split "Compile and Test" into two steps
2025-03-11 10:11:06 +01:00
Max Kellermann
4ae89b7b4a
.github/workflows/build.yml: enable ccache for Windows builds
2025-03-11 10:11:06 +01:00
Max Kellermann
568494440f
.github/workflows/build.yml: add matrix.os to ccache key
2025-03-11 10:11:06 +01:00
Max Kellermann
5d0aeda4e9
.github/workflows/build.yml: run unit tests with "--print-errorlogs"
...
With this option, Meson prints errors instead of logging them to a
file (that would be inaccessible).
2025-03-11 10:11:06 +01:00
Max Kellermann
d89b9d1683
test/fs/TestParsePath: include "fs/XDG.hxx" for USE_XDG
2025-03-11 10:09:52 +01:00
Max Kellermann
c7c4e7a6bf
python/build/libs.py: update libopenmpt to 0.7.13
2025-03-11 09:26:13 +01:00
Max Kellermann
1c7c2026db
config/Path: check for empty XDG variables
2025-03-11 09:23:33 +01:00
Max Kellermann
a9805db500
config/Path: move code to GetVariable()
2025-03-11 09:19:20 +01:00
Max Kellermann
e8a4317f31
config/Path: simplify tilde expansion
2025-03-11 09:17:01 +01:00
Max Kellermann
f4f5e94a36
config/Path: pass std::string_view to ParsePath()
2025-03-11 09:15:18 +01:00
Max Kellermann
b2326b9a98
test/fs/TestParsePath: unit test for ParsePath()
2025-03-11 09:13:31 +01:00
Max Kellermann
1dc8cd8eef
config/Path: allow expanding $HOME even without XDG
2025-03-11 08:45:04 +01:00
Max Kellermann
147fe18ad6
config/Path: adjust error message (not an environment variable)
2025-03-11 08:44:18 +01:00
Max Kellermann
6fd6a5110c
config/Path: use string_view literals
2025-03-11 08:36:57 +01:00
JoanVC
e8ce417150
Initial support for $HOME and some XDG variables inside the configuration file
...
This commit tries to address issues #263 and #476 . It enables the path expansion of HOME, XDG_CONFIG_HOME, XDG_MUSIC_DIR, XDG_CACHE_HOME and XDG_RUNTIME_DIR by using the glue functions already available in MPD.
Signed-off-by: Joan Vilardaga <github-91yu@joanvc.cat >
2025-03-10 22:21:03 +01:00
Max Kellermann
da40483666
event/Loop: destroy the UringWake instance in DisableUring()
2025-03-10 19:14:10 +01:00
Max Kellermann
06bc373ace
event/Loop: read eventfd with io_uring
...
This eliminates a roundtrip to epoll.
2025-03-10 18:59:08 +01:00
Max Kellermann
7797158ea6
event/Loop: auto-restart io_uring_prep_poll_multishot()
...
Applications need to check the `IORING_CQE_F_MORE` flag to see whether
the kernel is still polling, or whether it has stopped for some reason.
2025-03-10 18:52:31 +01:00
Max Kellermann
01a04baf7b
util/DivideString: remove unused library
2025-03-10 18:35:20 +01:00
Max Kellermann
46b461df42
playlist/pls: migrate the line parser to use std::string_view
2025-03-10 18:35:20 +01:00
Max Kellermann
898e0a2bc4
test/playlist: unit tests for the playlist plugins
...
Only "pls" for now.
2025-03-10 18:35:20 +01:00
Max Kellermann
2d3271859f
input/memory: new implementation (for unit tests)
2025-03-10 18:17:33 +01:00
Max Kellermann
b6672004bc
util/StringCompare: add SkipPrefixIgnoreCase()
2025-03-10 18:17:33 +01:00
Max Kellermann
eafca183a6
input/meson.build: add libinput_basic.a
...
This is the middle ground between libinput_api.a (the raw API) and
libinput_glue.a (dependencies on all plugins).
2025-03-10 17:13:51 +01:00
Max Kellermann
59f9e0ca70
input/meson.build: do not compile ProxyInputStream.cxx twice
2025-03-10 17:11:12 +01:00
Max Kellermann
800a03f0dc
playlist/plugins/meson.build: add missing dependencies
2025-03-10 14:33:41 +01:00
Max Kellermann
55c11448ff
util/NumberParser: add ParseIntegerTo()
...
An version of the function without the `std::optional` overhead.
2025-03-10 14:04:50 +01:00
Max Kellermann
e9c1ea684b
util/NumberParser: add std::from_chars() wrapper taking std::string_view
2025-03-10 14:04:50 +01:00
Max Kellermann
103487e8ad
event/InotifyEvent: add method IsDefined()
2025-03-10 14:04:50 +01:00
Max Kellermann
fb59bbc481
python/build/libs.py: update FFmpeg to 7.1.1
2025-03-10 14:04:50 +01:00
Max Kellermann
d0f6aa5b87
subprojects: update libnpupnp to 6.2.1-1
2025-03-10 14:04:12 +01:00
Max Kellermann
fdb8874803
python/build/libs.py: update libnfs to 6.0.2
2025-02-28 19:47:57 +01:00
Max Kellermann
c9a22b3404
meson.build: disable unnecessary libsndfile features
2025-02-28 19:41:19 +01:00
Max Kellermann
fc5d10b776
subprojects: add libsndfile.wrap
2025-02-28 19:37:17 +01:00
Max Kellermann
4cefb30dd9
decoder/flac: ignore FLAC__STREAM_DECODER_END_OF_LINK (FLAC 1.5)
...
Fixes -Wswitch compiler warning when building with FLAC 1.5.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2219
2025-02-28 10:32:47 +01:00
Max Kellermann
36482f5e6a
subprojects: update gtest to 1.15.2-2
2025-02-28 09:59:07 +01:00
Jochen Sprickerhof
d822685c53
config/File: support resetting repeatable params
...
This allows resetting bind_to_address to override the default value in a
included config.
2025-02-21 13:52:44 +01:00
Max Kellermann
9d87fb5e09
subprojects: update sqlite3 to 3.49.1-1
2025-02-20 13:59:06 +01:00
Max Kellermann
85014b5fa2
event/Loop: move code to Wait()
2025-02-13 16:54:36 +01:00
Max Kellermann
aff929dbd6
event/Loop: rename Wait() to Poll()
...
Preparing to have another Wait() method wrapping Poll() and io_uring.
2025-02-13 16:53:49 +01:00
Max Kellermann
dda85e02bf
io/Open: add TryOpen(struct open_how), Open(struct open_how)
2025-02-13 16:09:12 +01:00
Max Kellermann
5b393052ee
event/Loop: pass timeout=nullptr to io_uring if there is no timer
2025-02-13 16:04:07 +01:00
Max Kellermann
624da8ce5b
event/Loop: use io_uring_prep_poll_multishot() on the epoll fd
...
This wraps epoll and io_uring the other way: previously, we had the
io_uring file descriptor registered in epoll and when it became ready,
we could query its completion ring. The problem is that the poll
wakeups cause considerable overhead in the Linux kernel, see
https://lore.kernel.org/io-uring/20250128133927.3989681-9-max.kellermann@ionos.com/
By wrapping epoll inside io_uring using
io_uring_prep_poll_multishot(), the "outer" loop is io_uring and
inside it, we have epoll. This adds another system call for epoll,
but that will go away as soon as most operations are going through
io_uring. Previously, io_uring had this extra system call.
2025-02-13 16:02:40 +01:00
Max Kellermann
bca9e3e347
io/uring/Queue: dispatch all completions in SubmitAndWaitDispatchOneCompletion()
...
io_uring_submit_and_wait_timeout() can return multiple completions,
even if we wait for only one. We should dispatch them all or we miss
wakeups.
2025-02-13 14:53:30 +01:00
Max Kellermann
2276ebd70f
io/uring/Queue: add DispatchCompletions() overload using io_uring_for_each_cqe()
2025-02-13 14:53:24 +01:00
Max Kellermann
a9bee1c64b
io/uring/Ring: add io_uring_for_each_cqe() wrapper
2025-02-13 14:53:17 +01:00
Max Kellermann
c8e88408b2
io/uring/Ring: ignore EINTR
2025-02-13 14:53:11 +01:00
Max Kellermann
45644759fe
io/uring/CancellableOperation: invoke OnUringCompletion() in destructor
...
This is important for operations that have complex cancellation
procedures (e.g. if they need to free buffers). They might leave an
Operation instance in the queue.
2025-02-13 14:52:52 +01:00
Max Kellermann
e014d31972
io/uring/Ring: add io_uring_submit_and_wait_timeout() wrapper
2025-02-13 14:52:37 +01:00
Max Kellermann
b7655d38f7
io/uring/Queue: support IORING_CQE_F_MORE
2025-02-13 14:52:30 +01:00
Max Kellermann
268f737ac4
meson.build: suppress -Wmissing-field-initializers
...
There's nothing wrong with initializing only some fields.
2025-02-13 14:21:38 +01:00
Max Kellermann
80ff0a062a
system/EpollFD: add method GetFileDescriptor()
2025-02-13 14:19:28 +01:00
Max Kellermann
24bcf44a47
subprojects: update sqlite to 3.49.0-1
2025-02-13 14:12:53 +01:00
gd
f1e43cb498
android: Loader - load early (before service thread) both in activity and service.
...
Loader converted from java to kotlin.
Instead of loading libmpd when the service thread is started,
the service will not start the the thread if libmpd failed to load.
The loader is also accessed by the view data to let
the ui adjust if failed to load, by showing the failure reason
and disabling the Start MPD button.
2025-02-06 14:23:26 +02:00
gd
ae1c5e3424
android: build.gradle - added build flavor "fail-test" to test System.loadLibrary("mpd") failure
2025-02-06 14:11:06 +02:00
gd
9eb5879542
android: IntentUtils - added license comment
2025-02-06 14:06:53 +02:00
gd
038759506f
android: added 'universal' flavor that includes both both arm64-v8a and x86_64 versions of libmpd.so
2025-02-05 20:31:43 +02:00
gd
2bf9fdf10e
android: migrated build to version catalogs
...
For easier management of dependencies versions: https://developer.android.com/build/migrate-to-catalogs
2025-02-05 20:15:58 +02:00
gd
0bf77f4eb3
android: converted Main from java to kotlin
2025-02-05 11:20:39 +02:00
gd
034bcf4f44
android: added product flavors to separatly build apk for arm64-v8a or x86_64
2025-02-04 10:23:26 +02:00
gd
834d6dcf46
android: build version of kotlin and compose updated.
...
Changed to compatible versions according to https://developer.android.com/jetpack/androidx/releases/compose-kotlin#kts
2025-02-04 10:22:57 +02:00
gd
8a642c8a83
android: MainScreen - use Icons.AutoMirrored.Filled.List instead of deprecated Icons.Default.List
2025-02-04 10:22:57 +02:00
gd
fe42ad2439
android: .gitignore - added previously misspelled app/src/main/jniLibs/
2025-02-04 10:22:57 +02:00
gd
51242be72b
android: changed permissions handling UI in status screen when show rationale is false
...
Android will ignore permission request and will not show the request dialog
if the user's action implies "don't ask again."
This leaves the app in a crippled state and the user confused.
Google says "don't try to convince the user", so it returns false for `shouldShowRequestPermissionRationale`.
To help the user proceed, we show the `Request permission` button only if `shouldShowRequestPermissionRationale == true`
because there's a good chance the premission request dialog will not be ignored.
If `shouldShowRequestPermissionRationale == false` we instead show the "rationale" message and a button to open
the app info dialog where the user can explicitly grand the permission.
2025-02-04 10:22:57 +02:00
gd
cb62aff43e
android: added missing package declaration in SettingsScreen.kt
2025-02-04 10:22:57 +02:00
gd
491e726540
android: manifest - added sdk version to legacy permission READ_EXTERNAL_STORAGE, added permission READ_MEDIA_AUDIO
...
Change fo r SDK version 33 and above
2025-02-04 10:22:57 +02:00
gd
7404be41dc
android: git ignoring .idea directory completely until a good reason emerges not to
2025-02-04 10:22:57 +02:00
Camille Scholtz
b8289ae923
input/meson.build: Add missing dependency
2025-02-03 23:07:58 +01:00
Max Kellermann
6b92b7adb9
util/PacketBigEndian: add operator|
2025-02-01 19:30:17 +01:00
Max Kellermann
00a352ffcd
event/Loop: explicit io_uring initialization
...
Log the io_uring initialization error at MPD startup.
2025-02-01 19:20:50 +01:00
Max Kellermann
63cc07b8a7
event/Loop: add method SetThread()
...
Require to call it before calling Run(); remove the setter from Run().
This gives class EventThread more control over when it is initialized.
2025-02-01 19:19:59 +01:00
Max Kellermann
b2bf95009b
event/Thread: use inline initializers
2025-02-01 18:24:02 +01:00
gd
7df041310c
android: build.gradle.kts - updated dependencies versions. Updated compile sdk to 35, and target sdk to 34
2025-02-01 18:09:12 +01:00
gd
cd9522c1d1
android: manifest - added android:foregroundServiceType=mediaPlayback and permission FOREGROUND_SERVICE_MEDIA_PLAYBACK
...
Required by newer android sdk.
2025-02-01 18:09:07 +01:00
gd
59bd0fe0f0
android: added README.md for notes and resources for MPD android maintainers.
2025-02-01 18:09:02 +01:00
gd
0872a761c8
android: gradle build - add ndk.abiFilters to package the prebuilt arm64-v8a/libmpd.so with the apk
2025-02-01 18:08:58 +01:00
gd
996e158f56
android: updated gradle version
2025-02-01 18:08:55 +01:00
gd
7fb195bc0b
android: Context.cxx - in GetExternalFilesDir removed assert type != nullptr
...
May be null for the root of the files directory.
2025-02-01 18:08:52 +01:00
gd
2fabaa2e95
android: meson.build - changed output dir name from jnilibs to jniLibs
...
It is the default name: https://developer.android.com/studio/projects/gradle-external-native-builds#jniLibs
2025-02-01 18:08:48 +01:00
Camille Scholtz
e3cf9bb0a1
Fix deamon mode on macos
2025-02-01 18:05:49 +01:00
Camille Scholtz
407db96d4a
Install some more dependencies in the macos workflow
2025-02-01 18:05:42 +01:00
Camille Scholtz
3689200b78
Add prcr2 dependency to macos workflow
2025-02-01 18:05:34 +01:00
Camille Scholtz
6c16430a85
Remove whitespace
2025-02-01 18:05:24 +01:00
Camille Scholtz
ff37d11610
Workflow fixes for macOS
2025-02-01 18:05:17 +01:00
Camille Scholtz
509786cbf1
Revert "remove macOS support"
...
This reverts commit 518ce0187a .
2025-02-01 18:05:13 +01:00
allixx
148050898a
doc/user: update windows build meson version
2025-02-01 12:16:38 +03:00
Max Kellermann
a29d3eb975
Merge branch 'id3tag-meson-fix' of https://github.com/allixx/MPD into v0.23.x
2025-02-01 08:23:12 +01:00
allixx
1247ee5347
subprojects/packagefiles/id3tag/meson.build: fix meson errors
2025-02-01 09:59:40 +03:00
gd
f15b6a43d3
Logging: curl - write debug output through MPD log instead of curl writing directly to stderr.
...
The output gets the standard MPD log format with domain curl and a timestamp.
Using CURLOPT_DEBUGFUNCTION that is only called when CURLOPT_VERBOSE is in effect
when MPD log level is verbose.
2025-02-01 08:53:38 +02:00
Max Kellermann
bddfff9c2b
meson.build: fix typo
2025-01-31 19:51:00 +01:00
allixx
cdc99812c9
python/build/libs.py: replace broken Boost 1.81.0 url
2025-01-31 19:17:28 +03:00
Max Kellermann
63ad12bb89
storage/nfs: MapUTF8("") returns the full URL including parameters
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2154
2025-01-30 20:04:19 +01:00
Max Kellermann
7c4ddb5943
input/uring: initialize uring_input_queue lazily
...
The BlockingCall() in InitUringInputPlugin() did not work because the
EventThread was not yet started. This was never noticed until commit
e309941646 which enabled `IORING_SETUP_SINGLE_ISSUER`, and suddenly
the kernel refused to accept io_uring_submit() calls from the
io_thread because io_uring_setup() had been called from the main
thread.
2025-01-30 20:00:57 +01:00
Max Kellermann
3cf5354e3f
Revert "Main: start IO threads before initializing the rest"
...
This reverts commit abc8420697 . This
was a bad idea, too, because it broke daemonization.
2025-01-30 19:58:15 +01:00
Max Kellermann
838398103c
Revert "event/Thread: start the thread in the constructor"
...
This reverts commit b49cfe96f4 . It was
a bad idea because it broke signal handlers. I need to find a better
way to fix io_uring intialization.
2025-01-30 19:58:15 +01:00
Max Kellermann
30bd70939a
lib/nfs/Connection: remove unnecessary include
2025-01-30 17:24:20 +01:00
Max Kellermann
275cd9d1d0
lib/nfs/Connection: give up connection after NFS4ERR_EXPIRED
...
Once a NFS request fails with NFS4ERR_EXPIRED, the whole connection is
broken and we need to open a new one. I wish libnfs would report this
to us as a connection-level error, but instead only the one request
fails; therefore this workaround is an ugly kludge.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2175
2025-01-30 17:23:39 +01:00
Max Kellermann
5b001957c7
input/async: skip resume and seek if there is a pending error
...
The resume/seek was received asynchronously and meanwhile an error
might have occurred that needs to be handled.
This fixes another NFS-related crash bug.
2025-01-30 16:47:51 +01:00
Max Kellermann
d1e5c90c3b
decoder/flac: do not seek when DecoderCommand::STOP is received
...
libFLAC tries to keep on seeking a stream even after a (fatal) read
error has occurred. Let the DecoderClient decide whether proceeding
is possible.
This fixes a crash bug when playing a file over NFS and the NFS
connection fails.
2025-01-30 16:46:04 +01:00
Max Kellermann
715ef846b6
input/Plugin: pass URI as std::string_view
2025-01-30 13:38:30 +01:00
Max Kellermann
aee49d1c1c
input/cdio: pass std::string_view to parse_cdio_uri()
2025-01-30 13:17:47 +01:00
Max Kellermann
459390cd56
input/alsa: use std::string_view in class SourceSpec
2025-01-30 13:03:52 +01:00
Max Kellermann
7ca8dedb35
pcm/AudioParser: use std::string_view
2025-01-30 12:27:20 +01:00
Max Kellermann
f6cee35896
fs/Traits: add IsAbsolute(string_view)
2025-01-30 11:55:44 +01:00
gd
66ee03741d
Logging: enable log timestamp to stdout logging
...
When running with stdout output to debug the server
or misbehaving clients, it is useful to have the timestamp
to detect timing issues and response times.
Especially when opening and playing online sources that
block the connection thread sometime for a significantly
long time that makes the client-server unresponsive
and cause timeouts in clients.
2025-01-30 11:33:21 +01:00
Max Kellermann
b49cfe96f4
event/Thread: start the thread in the constructor
...
This is the proper fix for the e309941646 regression; see
commit abc8420697
2025-01-30 10:58:34 +01:00
Max Kellermann
ae112fe077
Merge branch 'sticker_errors' of https://github.com/jcorporation/MPD
2025-01-30 10:48:18 +01:00
Max Kellermann
a1cbfa1623
Merge branch 'sticker_set' of https://github.com/jcorporation/MPD
2025-01-30 10:46:23 +01:00
Max Kellermann
e06d775af5
util/CircularBuffer: add method MoveTo()
...
This implements wraparound, so AsyncInputStream and ThreadInputStream
can now return all of the buffer contents in one Read() call.
2025-01-29 21:28:28 +01:00
Max Kellermann
950f5f4d32
input/{async,thread}: move code to ReadFromBuffer()
2025-01-29 21:26:05 +01:00
Max Kellermann
abc8420697
Main: start IO threads before initializing the rest
...
This fixes a regression triggered by commit e309941646 -
IORING_SETUP_SINGLE_ISSUER broke because io_uring_setup() was called
fromm the main thread, yet io_uring_submit() in the I/O thread. This
is because the I/O thread was not yet started when
InitUringInputPlugin() was called, and BlockingCall() was invoked
synchronously in the main thread. This has always been wrong, but was
never noticed.
2025-01-29 21:25:59 +01:00
Max Kellermann
e309941646
event/Loop: initialize io_uring with IORING_SETUP_SINGLE_ISSUER
...
This might give tiny kernel-side optimizations.
2025-01-29 20:29:42 +01:00
Max Kellermann
ea2ced6b9f
event/UringManager: replace with new Uring::Manager class
...
From https://github.com/CM4all/libcommon - the new class is mostly
identical, and I want to maintain only one of them.
2025-01-29 20:27:13 +01:00
Max Kellermann
f1d06396a7
client: replace num with a name string
...
This logs the client address (or the process id and uid for local
connections) in each log line instead of the number.
2025-01-29 20:24:05 +01:00
Max Kellermann
95c0e2505c
client/New: pass SocketPeerCredentials to client_new()
2025-01-29 19:36:47 +01:00
Max Kellermann
7adda0aa66
event/ServerSocket: move GetPeerCredentials() call to ClientListener::OnAccept()
2025-01-29 19:32:53 +01:00
Max Kellermann
a0825e6ce0
net/PeerCredentials: add getpeereid() support
2025-01-29 19:28:09 +01:00
Max Kellermann
c7621ec0e4
net/PeerCredentials: wrapper for struct ucred
2025-01-29 19:28:03 +01:00
Max Kellermann
2c7ca16c4e
lib/fmt/ToBuffer: add constexpr
2025-01-29 18:12:08 +01:00
Max Kellermann
ad8c2577c4
util/PackedBigEndian: add class PackedSignedBE16
2025-01-29 18:11:47 +01:00
Max Kellermann
7c9a460786
io/uring/Ring: add method SetMaxWorkers()
2025-01-29 18:10:59 +01:00
Max Kellermann
c644b7616a
io/uring/Ring: add ctor wrapping io_uring_queue_init_params()
2025-01-29 18:10:20 +01:00
Max Kellermann
badf7101e2
io/uring/Ring: use if with initializer
2025-01-29 18:10:04 +01:00
Max Kellermann
6fb91e661c
io/uring/Queue: DispatchCompletions() returns bool
2025-01-29 18:09:57 +01:00
Max Kellermann
ed819a05e3
io/uring/Ring: add SubmitAndGetEvents()
2025-01-29 18:09:52 +01:00
Max Kellermann
2e3a51a5da
io/uring/Close: use IOSQE_CQE_SKIP_SUCCESS
...
We don't want to get any completion events for "close". It's
fire-and-forget.
2025-01-29 18:09:29 +01:00
Max Kellermann
e682940c54
event/PipeEvent: add GetScheduledFlags(), [GS]etReadyFlags()
2025-01-29 18:09:10 +01:00
Max Kellermann
fa375cbaeb
event/uring/Manager: un-inline the ctor
2025-01-29 18:09:06 +01:00
Max Kellermann
3f638bfa03
io/uring/Operation: add method GetUringData()
2025-01-29 18:07:55 +01:00
Max Kellermann
0ba0c64093
event/uring/Manager: add flags parameter
2025-01-29 18:07:46 +01:00
Max Kellermann
5e107c33d9
event/DeferEvent: add ScheduleNext()
2025-01-29 18:05:50 +01:00
Max Kellermann
4bb379a218
event/ServerSocket: use SocketDescriptor::GetPeerCredentials()
2025-01-29 17:56:26 +01:00
Max Kellermann
3710b54d43
event/ServerSocket: pass SocketDescriptor to get_remote_uid()
2025-01-29 17:56:26 +01:00
Max Kellermann
70f1f9cff8
subprojects: update gtest to 1.15.2
2025-01-29 17:41:24 +01:00
Max Kellermann
9787d39c3f
subprojects: update expat to 2.6.4
2025-01-29 17:41:11 +01:00
Max Kellermann
54527068d5
.github/workflows/build.yml: fix matrix name
...
Regression by commit ab011adf77
2025-01-29 17:35:33 +01:00
Max Kellermann
0186f73c7a
client/Process: let libfmt quote the command string
2025-01-29 17:32:42 +01:00
gd
88594c81d6
Logging: added seconds to log time string.
...
Time was only in minutes before.
Seconds is more useful in analyzing the log for example
with issues of timeouts, and reponse times.
2025-01-29 17:31:21 +01:00
Max Kellermann
f6bd49ba61
Merge branch 'tag-compare' of https://github.com/geneticdrift/MPD
2025-01-29 17:21:54 +01:00
Max Kellermann
a404e5754e
Merge tag 'v0.23.17'
...
release v0.23.17
2025-01-29 17:20:02 +01:00
Max Kellermann
b080ca8627
release v0.23.17
2025-01-29 17:11:53 +01:00
Max Kellermann
0e8cd3b961
client/Process: explicitly disallow "idle" and "noidle" in command lists
...
These commands cannot possibly work with command lists because command
lists are supposed to be atomic, but suspended command execution
conflicts with that.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2167
2025-01-29 17:08:53 +01:00
Max Kellermann
8fcb6e148f
decoder/list: probe "ffmpeg" before "sndfile" and "audiofile"
...
For FFmpeg's DTS-WAV support, see code comment.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2158
2025-01-29 15:42:54 +01:00
gd
ce9ee38304
decoder/Bridge: DecoderBridge::UpdateStreamTag - return false if stream tag not changed.
...
Some streams send the same tags frequently, causeing unnecessary update
events.
2025-01-29 16:02:20 +02:00
gd
f9d47502d8
player/Thread: update song tag from remote stream only if changed.
...
Some streams send the same tags frequently, causing unnecessary player queue update events.
2025-01-29 16:00:37 +02:00
gd
f15014b6af
tag/Item: made TagItem constructor private and friend TagPoolItem
...
To only allow construction as part of TagPoolItem with its special var size allocator in TagPoolItem::Create.
2025-01-29 16:00:37 +02:00
gd
2a9c3a2e50
tag/Tag: added operator==(Tag&)
2025-01-29 16:00:37 +02:00
gd
3e9c2cce71
tag/Item: added operator== to TagItem
2025-01-29 16:00:37 +02:00
gd
93bf99f639
util/DereferenceIterator, TerminatedArray: added operator-(const IteratorType&) to DereferenceIterator and TerminatedArray::iterator
...
It is required by std::distance and some std algos.
2025-01-29 16:00:20 +02:00
Max Kellermann
c0a9434f34
command/file: "albumart" tries to send larger chunks if available
...
If we only receive very little data from the InputStream, try a second
Read() call to get more data. This works around tiny reads at input
buffer boundaries with the io_uring input plugin. These tiny reads
are inefficient, and we can afford to wait one more low-level I/O
iteration to finish (but not more).
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2186
2025-01-29 13:07:05 +01:00
Max Kellermann
d7212624b0
input/{async,thread}: clear the CircularBuffer when it becomes empty
...
First step towards fixing https://github.com/MusicPlayerDaemon/MPD/issues/2186
2025-01-29 13:05:24 +01:00
Max Kellermann
70a0a781c8
input/async: move the IsEOF() check to a separate block
2025-01-29 12:59:04 +01:00
Max Kellermann
ab011adf77
meson.build: require GCC 12 or clang 14
...
GCC 10 doesn't have std::make_unique_for_overwrite(), so let's drop it.
2025-01-29 12:24:48 +01:00
Max Kellermann
8ea3f86f43
Revert "meson.build: disable -Wsuggest-override with GCC 8"
...
This reverts commit 56c0733b42 . GCC 8
is no longer supported.
2025-01-29 12:22:11 +01:00
Max Kellermann
bd78307940
input/{async,thread}: add an additional Cond field
...
This eliminates the ScopeExchangeInputStreamHandler kludge.
2025-01-29 12:14:42 +01:00
Max Kellermann
3cc7b7dbf9
Merge branch 'v0.23.x'
2025-01-29 12:09:18 +01:00
Max Kellermann
57e7fb3f62
tag/Id3Load, ...: use std::make_unique_for_overwrite()
...
Don't zero-initialize the buffers. This removes some useless
overhead.
2025-01-29 12:01:27 +01:00
Max Kellermann
687475cf3c
db/update/InotifyUpdate: handle IN_CREATE without IN_ISDIR
...
A new symlink causes `IN_CREATE`. Usually, we catch `IN_CREATE` only with
IN_ISDIR to watch the new directory, but otherwise `IN_CREATE` is not
handled. Regular files are "created" but they have usable content
only with `IN_CLOSE_WRITE`. Yet symlinks have only `IN_CREATE` and
they are immediately usable.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2192
2025-01-29 09:41:08 +01:00
Max Kellermann
c48dbd5dd4
lib/nfs/meson.build: reject libnfs 6
...
libnfs version 6 has major API changes and MPD 0.23 has never been
adapted to these. This additional configure-time check fixes
potential compile-time failures.
2025-01-29 09:04:55 +01:00
Max Kellermann
37049aab36
lib/nfs/Connection: remove EnableCloseOnExec() call
...
SOCK_CLOEXEC has been added to libnfs version 2, and since we require
at least version 4, we can safely remove this call.
2025-01-29 09:02:05 +01:00
Max Kellermann
18495fbb4e
lib/nfs/meson.build: require libnfs 4.0
...
All Linux distributions have at least version 4, and thus I cannot
test with older versions.
2025-01-29 09:00:37 +01:00
Max Kellermann
cdcee16738
client/File: improve error message
...
Users are confused by "Access denied". Let's write an error message
that is more clear.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2184
2025-01-29 08:28:30 +01:00
Max Kellermann
83c2d9c964
test/meson.build: add another missing dependency on libevent.a
...
Necessary for including Client.hxx.
2025-01-28 19:52:25 +01:00
Max Kellermann
074a041760
test/meson.build: add missing dependencies on libevent.a
2025-01-28 19:47:36 +01:00
Max Kellermann
083d39ea80
decoder/plugins/meson.build: add missing dependency to libid3tag
2025-01-28 19:38:50 +01:00
Max Kellermann
a5da7fd51a
Merge branch 'v0.23.x'
2025-01-28 19:33:19 +01:00
Max Kellermann
cf9a2eb508
.github/workflows/build.yml: disable yajl on macOS
...
This yajl on Homebrew comes with broken headers:
/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>
^~~~~~~~~~~~~~~~~~~~
2025-01-28 19:31:35 +01:00
Max Kellermann
0aeda01ba6
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.
2025-01-28 19:27:46 +01:00
Max Kellermann
3798d11a8d
.github/workflows/build.yml: disable NFS support
...
Homebrew comes with libnfs 6 which is not supported by MPD 0.23.
2025-01-28 19:23:36 +01:00
Max Kellermann
fab03f800a
subprojects: remove libmicrohttpd
...
This one will be pulled in by libnpupnp automatically. No need to
have it here.
2025-01-28 19:17:06 +01:00
Max Kellermann
5b5b101c56
subprojects: add id3tag
2025-01-28 19:15:43 +01:00
Max Kellermann
7770accee0
python/build/libs.py: remove libmad (unused)
2025-01-28 19:14:03 +01:00
Max Kellermann
eb3cd7bed3
subprojects: add lame
2025-01-28 19:13:59 +01:00
Max Kellermann
56cc2f4c65
subprojects: add libmpdclient wrap
2025-01-28 19:13:46 +01:00
Max Kellermann
9723af3f35
subprojects: add openssl
2025-01-28 19:13:45 +01:00
Max Kellermann
dcf3cf4216
subprojects: add ogg, flac, opus
2025-01-28 19:13:19 +01:00
Max Kellermann
578c94081f
subprojects: add curl
2025-01-28 19:12:57 +01:00
Max Kellermann
efa8304d2d
subprojects/.gitignore: sort
2025-01-28 19:12:42 +01:00
Max Kellermann
2752f67877
lib/nfs/meson.build: add missing dependency on libevent.a
2025-01-28 19:05:09 +01:00
Max Kellermann
f55e0df614
lib/curl/meson.build: add missing internal dependency on libevent.a
2025-01-28 18:52:37 +01:00
Max Kellermann
177ffde90f
Merge branch 'v0.23.x'
2025-01-28 18:45:02 +01:00
Max Kellermann
0d1fb9a02c
meson.build: build libnpupnp and libmicrohttpd statically as submodules
2025-01-28 18:43:23 +01:00
Max Kellermann
a0a39ae828
.github/workflows/build.yml: update actions/checkout to v4
2025-01-28 18:39:17 +01:00
Max Kellermann
e57c60e3d8
.github/workflows/build.yml: update hendrikmuhs/ccache-action to v1.2
2025-01-28 18:38:59 +01:00
Max Kellermann
53090e3745
.github/workflows/build.yml: update actions/setup-python to v5
2025-01-28 18:37:06 +01:00
Max Kellermann
93eb3da48a
subprojects: add liburing
2025-01-28 18:35:21 +01:00
Max Kellermann
75a3d9340e
python/build/libs.py: update FFmpeg to 7.1
2025-01-28 18:34:29 +01:00
Max Kellermann
9445ea1565
subprojects: add libnpupnp
2025-01-28 18:34:29 +01:00
Max Kellermann
a5a26d304b
subprojects: update sqlite3 to 3.48.0-1
2025-01-28 18:34:29 +01:00
Max Kellermann
1d8d298a22
subprojects: update fmt to 11.1.1-2
2025-01-28 18:34:28 +01:00
Max Kellermann
508bfbe334
pipewire/meson.build: add "include_type:system"
...
This suppresses a compiler warning due to sloppy code in PipeWire:
/usr/include/spa-0.2/spa/utils/json-core.h:440:29: error: implicit conversion increases floating-point precision: 'float' to 'double' [-Werror,-Wdouble-promotion]
440 | return spa_dtoa(str, size, val);
| ~~~~~~~~ ^~~
2025-01-28 18:34:12 +01:00
Max Kellermann
1385212572
io/uring/meson.build: detect liburing with include_type=system
...
This avoids breakages due to `-Wgnu-anonymous-struct`.
2025-01-28 18:34:07 +01:00
Max Kellermann
8dcd6ea2b4
increment version number to 0.23.17
2025-01-28 18:13:07 +01:00
Max Kellermann
75d0914373
Merge branch 'fix-handle-status' of https://github.com/geneticdrift/MPD
2025-01-28 06:18:19 +01:00
Max Kellermann
35dc1fc589
io/UniqueFileDescriptor: use AdoptTag in the constructors that adopt ownership
2025-01-23 16:57:39 +01:00
Max Kellermann
765a6a2f20
net/UniqueSocketDescriptor: use AdoptTag in the constructors that adopt ownership
...
This makes it a little bit harder to use the ownershop-adopting
constructors accidently.
2025-01-23 16:56:57 +01:00
Max Kellermann
131263cbe3
util/TagStructs: add struct AdoptTag
2025-01-23 16:56:00 +01:00
Max Kellermann
936611b47c
util/ShallowCopy: rename header to TagStructs.hxx
...
This new header will be a collection of more structs like ShallowCopy.
2025-01-23 16:55:51 +01:00
gd
266eb393eb
fix: output of command status broken by a misplaced comma in the format arguments
2025-01-21 14:03:41 +02:00
Michael Herstine
194ecd69e0
lib/fmt: remove even more now-broken uses of FMT_STRING
...
MPD stopped building since fmt 11.1.0; see
<https://github.com/fmtlib/fmt/issues/4304 >. The first commit
fixing this was 9db7144 , followed by 5de0909 (both on the
unstable branch).
This commit removes what the author believes to be the remaining
uses in the MPD codebase.
2025-01-20 19:54:41 -08:00
Michael Herstine
b24b3c1054
Merge remote-tracking branch 'upstream/v0.23.x'
2025-01-20 09:44:07 -08:00
Alfred Wingate
5de0909ae5
lib/fmt: remove the rest of the broken use of FMT_STRING
...
Fixes: 9db7144d0f
Signed-off-by: Alfred Wingate <parona@protonmail.com >
2025-01-18 03:29:14 +02:00
Rudi Heitbaum
da6efd6361
plugins/meson.build: revert unintentional static link change
...
Minor revert of 9db7144d0f
- no change was to be done to meson.build.
2025-01-13 22:39:12 +00:00
Rudi Heitbaum
9db7144d0f
lib/fmt: drop use of FMT_STRING
...
When compiling with libfmt-11.1.0 and newer the following compile errors occur:
In file included from ../src/decoder/DecoderPrint.cxx:23:
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
../src/decoder/DecoderPrint.cxx:38:7: required from here
38 | r.Fmt(FMT_STRING("plugin: {}\n"), plugin.name);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:86:28: error: cannot convert 'const decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING' to 'fmt::v11::string_view' {aka 'fmt::v11::basic_string_view<char>'}
86 | return VFmt(format_str,
| ~~~~^~~~~~~~~~~~
87 | fmt::make_format_args(args...));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/client/Response.hxx:81:36: note: initializing argument 1 of 'bool Response::VFmt(fmt::v11::string_view, fmt::v11::format_args)'
81 | bool VFmt(fmt::string_view format_str, fmt::format_args args) noexcept;
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
../src/client/Response.hxx: In instantiation of 'bool Response::Fmt(const S&, Args&& ...) [with S = decoder_plugin_print(Response&, const DecoderPlugin&)::<lambda()>::FMT_COMPILE_STRING; Args = {const char* const&}]':
The error is due to the use of FMT_STRING. The libfmt team shared the following:
The correct way of using FMT_STRING is to wrap a format string when passing to a
function with compile-time checks (i.e. that takes format_string) as documented
in https://fmt.dev/11.1/api/#legacy-compile-time-checks .
Noting that FMT_STRING is a legacy API and has been superseded by consteval-based
API starting from version 8: https://github.com/fmtlib/fmt/releases/tag/8.0.0 . It
looks like MPD is trying to emulate {fmt}'s old way of implementing compile-time
checks which was never properly documented because it was basically a hack. So the
correct fix is to switch to format_string and, possibly, remove usage of FMT_STRING.
The old way of doing compile-time checks (fmt::make_args_checked) was documented
in https://fmt.dev/7.1/api.html#argument-lists but it looks like MPD is not using
that API so the problematic uses of FMT_STRING have no effect and can just be removed.
The FMT_STRING has been removed in this change based on the fmt-7.1 API and now MPD is
successfully compile against the current libfmt-11.1.0 which highlighted the issue that
had been present in the codebase as it is now triggering the error, is legacy and was
not using the API for which FMT_STRING was aligned with.
2025-01-13 06:17:01 +00:00
jcorporation
bd36b5e310
Response with error for sticker set,inc,dec and add missing asserts
2024-12-12 19:40:06 +01:00
jcorporation
015870ac71
Replace STICKER_SQL_INSERT and STICKER_SQL_UPDATE with STICKER_SQL_SET that lets handle sqlite insertion or update of the sticker value.
2024-12-12 19:15:22 +01:00
Max Kellermann
b1677bf79c
Merge branch 'sticker_inc_dec' of https://github.com/jcorporation/MPD
2024-12-12 08:38:58 +01:00
jcorporation
1078c1c1bf
Add sticker sub-commands inc and dec
...
Let sqlite do the work for incrementing or decrementing a sticker value.
This sub-commands are usefull to track playcounts with sticker values and
saves us one roundtrip.
2024-12-11 21:41:24 +01:00
Max Kellermann
9a8579d956
event/ServerSocket: do not close all listeners before rethrowing
...
If binding one address fails, we don't need to close all listeners.
For fatal errors, this will be done automatically and implicitly; and
for non-fatal errors (e.g. binding to the default port failed, but
there is an XDG listener), this closes the good listeners which are
supposed to be used.
Closes https://github.com/MusicPlayerDaemon/MPD/pull/2157
2024-12-04 14:25:42 +01:00
Max Kellermann
b6e187efd8
Merge tag 'v0.23.16'
...
release v0.23.16
2024-12-03 13:01:15 +01:00
Max Kellermann
b5bd294e5c
release v0.23.16
2024-12-03 12:56:57 +01:00
Max Kellermann
ac60bd47f0
thread/WindowsFuture: add missing include for std::error_category
2024-12-03 12:54:12 +01:00
Max Kellermann
b7248f0333
filter/ffmpeg: fill AVFrame::pts
...
Some libavfilter plugins don't produce any output if `pts` is never
set, e.g. the `lowpass` plugin.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2114
2024-12-03 12:52:15 +01:00
Marius Feraru
8a5b5378e6
db/update/Walk:FindAncestorLoop: uint64_t inode & device
...
Previously, inode numbers were truncated to 32 bits, which could lead
to problems on XFS where inodes are 64 bit; this could lead to bogus
"recursive directory found" errors during database update.
[mk: added commit description and NEWS line]
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2000
2024-12-03 12:49:02 +01:00
Michael Cho
4a49f75799
meson.build: support building with ICU 76
...
ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
add `icu-uc` when linking to shared libraries. This results in failure:
```
src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'
```
[^1]: 199bc82702
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2151
2024-12-03 12:47:55 +01:00
Max Kellermann
9d2666f293
subprojects: update sqlite3 to 3.47.1-1
2024-12-03 12:46:33 +01:00
Max Kellermann
e63fcc5982
python/build/libs: update libnfs to 5.0.3
2024-12-03 12:45:05 +01:00
Max Kellermann
4c37c17f2e
python/build/libs.py: update WildMidi to 0.4.6
2024-12-03 12:44:33 +01:00
Max Kellermann
722820a375
python/build/libs: update zlib to 1.3.1
2024-12-03 12:44:14 +01:00
Max Kellermann
688023eb9e
python/build/libs.py: update libopenmpt to 0.7.9
2024-12-03 12:43:34 +01:00
Max Kellermann
5771aeaddd
subprojects: update fmt to 11.0.2-1
2024-12-03 12:42:02 +01:00
Rudi Heitbaum
a42da90042
lib/fmt: support build with libfmt-11.0.0
...
Upstream libfmt commit fmtlib/fmt@d707292
now requires the format function to be const.
Adjust the function prototype so it is const and can compile.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com >
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2141
2024-12-03 12:42:02 +01:00
Max Kellermann
d7d32ed6fc
meson.build: suppress -Wnan-infinity-disabled (clang 18) due to libfmt
2024-12-03 12:40:21 +01:00
Max Kellermann
4715acf27e
Log: add missing include for std::back_inserter()
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2071
2024-12-03 12:38:00 +01:00
Max Kellermann
8780db5ee8
increment version number to 0.23.16
2024-12-03 12:34:01 +01:00
Max Kellermann
30d2a31473
command/sticker: remove unreachable code
2024-12-03 12:32:33 +01:00
Max Kellermann
9a7a8ec137
io: always pass O_NONBLOCK to open()
...
Opening a FIFO may block indefinitely (until a writer connects). This
is dangerous because it may be a DoS vulnerability in many programs
that do not expect open() to block.
This obsoletes the method FileDescriptor::OpenNonBlocking() which
wasn't used anyway.
2024-12-03 12:28:17 +01:00
Max Kellermann
88fa68f030
net/SocketDescriptor: add GetPeerPidfd()
2024-12-03 12:27:20 +01:00
borine
78e643150f
output/Source: fix Close()
...
Close the filter before cancelling when closing a source.
Fixes #2148
2024-11-19 10:59:35 +00:00
Max Kellermann
eb1463fd7c
test/util/TestIntrusiveTreeSet: add constant_time_size test
2024-11-13 10:44:28 +01:00
Max Kellermann
6dce8dcaa5
io/FileDescriptor: add readv()/writev() wrappers
2024-11-13 10:44:03 +01:00
Max Kellermann
fc4a579d83
io/FileDescriptor: remove Read()/Write() with void pointers
...
Obsolete and unsafe.
2024-11-13 10:43:34 +01:00
Max Kellermann
263b9916c2
unix/PidFile: pass std::span to FileDescriptor::Read()
2024-11-13 10:43:33 +01:00
Max Kellermann
16604997d6
system/{Event,Signal}FD: pass std::span to FileDescriptor::Read()
2024-11-13 10:43:08 +01:00
Max Kellermann
77226bc0d8
test/ReadFrames: pass std::span to FileDescriptor::Read()
2024-11-13 10:42:35 +01:00
Max Kellermann
7a6672b7ed
util/IntrusiveTreeSet: update the counter, fixing constant_time_size
2024-11-13 10:36:57 +01:00
Max Kellermann
8db14c9cb3
Instance: add method FindOutput()
...
Move code from handle_moveoutput().
2024-11-11 19:08:45 +01:00
Max Kellermann
370df37596
io/uring/Ring: add more API documentation
2024-11-11 19:04:24 +01:00
Max Kellermann
84e3501084
io/uring/Queue: remove redundant include
2024-11-11 19:04:21 +01:00
Max Kellermann
a7d41a99a1
util/ForeignFifoBuffer: pass std::span to constructor
2024-11-11 19:03:31 +01:00
Max Kellermann
c9c5e84119
util/ForeignFifoBuffer: store buffer as std::span
2024-11-11 19:02:58 +01:00
Max Kellermann
8a3b48754e
util/ForeignFifoBuffer: use Read() in MoveBuffer() and Shift()
2024-11-11 19:02:43 +01:00
Max Kellermann
849c4012c0
filter/Filter: add method ReadMore()
...
This allows FilterPCM() to return more data, which some
implementations may need to do (e.g. FFmpeg).
2024-11-08 19:31:16 +01:00
Max Kellermann
d8bb833ba3
output/Source: convert runtime check to assert()
...
Flush() may only be called if the source is open.
2024-11-08 19:09:31 +01:00
Max Kellermann
4d8a2ea688
output/Source: add assert(filter)
2024-11-08 18:50:48 +01:00
Max Kellermann
a7a61e9e41
output/Source: add inline
2024-11-08 18:34:22 +01:00
Max Kellermann
415cf096e9
output/Thread: add another inline
2024-11-08 18:24:48 +01:00
Max Kellermann
7774c3369e
filter/two: check empty() instead of data()==nullptr
...
See bcab29d53a
2024-11-05 22:37:36 +01:00
Max Kellermann
bcab29d53a
filter/Filter: Flush() returns empty span, not nullptr
2024-11-05 13:19:25 +01:00
Max Kellermann
d6195025fb
filter/Filter: clarify Flush() documentation
2024-11-05 13:11:25 +01:00
Max Kellermann
d7ae512b5e
filter/Filter: clarify that the FilterPCM() return value may be empty
...
And adjust TwoFilter accordingly.
2024-11-05 12:35:10 +01:00
Max Kellermann
b7b4c6b4ea
filter/Filter: Flush() also invalidates the returned buffer
...
Just API documentation.
2024-11-05 12:35:09 +01:00
Max Kellermann
f59f17013d
MusicChunk: add method ReadData()
2024-11-05 12:34:35 +01:00
Max Kellermann
4beedec3ad
MusicChunk: add missing include
2024-11-05 12:31:30 +01:00
Max Kellermann
950888d161
output/Source: fix indent
2024-11-05 12:28:41 +01:00
Max Kellermann
76562fc093
test/run_{filter,output}: use fmt
2024-11-05 11:48:37 +01:00
Max Kellermann
0676ab7f47
filter/two: use if with initializer
2024-11-02 22:48:02 +01:00
Max Kellermann
fc5d258890
filter/ffmpeg: fill AVFrame::pts
...
Some libavfilter plugins don't produce any output if `pts` is never
set, e.g. the `lowpass` plugin.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2114
2024-11-02 22:24:53 +01:00
Max Kellermann
7dce7ad32d
Merge branch 'tagtypes_reset' of https://github.com/jcorporation/MPD
2024-11-02 20:58:06 +01:00
Max Kellermann
fa29693550
filter/ffmpeg: implement method Flush()
2024-11-02 20:55:04 +01:00
Pascal Nkornyui
2c881c63ba
doc/plugins.rst: fix spelling
2024-11-02 19:37:13 +00:00
jcorporation
fd7d251358
Add "reset" subcommand to tagtypes.
...
This subcommand combines "clear" and "enable" in one command.
2024-11-01 18:07:06 +01:00
Max Kellermann
acb9ee9792
filter/ffmpeg: move code to ReadOutput()
2024-10-30 22:49:20 +01:00
Max Kellermann
3d99f1d8a6
filter/ffmpeg: use if with initializer
2024-10-30 22:47:21 +01:00
Max Kellermann
2ef36af68d
test/run_filter: add command line parser
2024-10-30 22:17:42 +01:00
Max Kellermann
d7b4634e5e
io/FileLineReader: add missing include
2024-10-30 21:47:37 +01:00
Max Kellermann
2bc57c38d2
meson.build: set cpp_std=c++20
...
Meson supports this since version 0.57.0.
2024-10-30 21:37:49 +01:00
Max Kellermann
744308bfff
python/build/libs.py: update FFmpeg to 7.1
2024-10-30 21:31:17 +01:00
Max Kellermann
7db93fb20b
subprojects: update sqlite3 to 3.47.0-1
2024-10-30 21:29:57 +01:00
Max Kellermann
95db2db736
subprojects: update curl to 8.10.1-1
2024-10-30 21:29:47 +01:00
Max Kellermann
f807345022
event/Loop: use std::chrono::ceil()
...
Thanks to C++17, we don't need our custom implementation anymore.
2024-10-30 21:29:16 +01:00
Max Kellermann
b745d1f226
util/StringCompare: add constexpr
2024-10-30 21:29:16 +01:00
Max Kellermann
52e2130d51
util/StringCompare: simplify StringIsEqual() using operator==
2024-10-30 21:28:15 +01:00
Max Kellermann
1930ed16cb
Merge branch 'icu76-support' of https://github.com/cho-m/MPD
2024-10-27 15:22:04 +01:00
Michael Cho
1a063fee7e
meson.build: support building with ICU 76
...
ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
add `icu-uc` when linking to shared libraries. This results in failure:
```
src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'
```
[^1]: 199bc82702
2024-10-27 09:57:22 -04:00
jcorporation
51e0fefda7
Fix order of commands
2024-10-26 11:32:36 +02:00
Max Kellermann
449f8af7d0
Merge branch 'protocol_features' of https://github.com/jcorporation/MPD
2024-10-26 08:18:56 +02:00
Max Kellermann
38b46e680a
Merge branch 'stickernames-types' of https://github.com/jcorporation/MPD
2024-10-26 08:16:53 +02:00
Max Kellermann
17d0cd0abd
Merge branch 'queue_loaded_playlist' of https://github.com/jcorporation/MPD
2024-10-26 08:15:23 +02:00
Max Kellermann
98bc63251e
Merge branch 'searchplaylist_pos' of https://github.com/jcorporation/MPD
2024-10-26 08:14:31 +02:00
Max Kellermann
030bac441f
Merge branch 'playlistlength_fix' of https://github.com/jcorporation/MPD
2024-10-26 08:13:14 +02:00
Max Kellermann
f82a385be2
Merge branch 'tagtypes_available' of https://github.com/jcorporation/MPD
2024-10-26 08:10:07 +02:00
jcorporation
052719c0e4
Fix integer overflow calculating length of very large playlists
2024-10-20 12:12:50 +02:00
jcorporation
bfbff31860
Store last loaded playlist
...
Stores the last loaded playlist uri in the queue struct.
Last loaded playlist is set on load command and cleared with the clear command.
The last loaded playlist is printed in the status command and saved / restored from the partition state file.
Resolves issue #938
2024-10-20 12:03:31 +02:00
jcorporation
b1067333dc
Print positions in the search playlist functions.
2024-10-20 11:55:52 +02:00
jcorporation
35bdf74952
Mention contains and starts_with for "sticker find"
2024-09-28 22:43:20 +02:00
jcorporation
23c2bba483
This commit adds a new protocol command to toggle protocol features
...
for a client connection. It works like the tag_mask and the associated
tagtypes command.
New commands:
- protocol
Shows enabled protocol features.
- protocol available
Show all available protocol features.
- protocol enable {feature...}
Enables protocol features.
- protocol disable {feature...}
Disables protocol features.
- protocol all
Enables all available protocol features.
- protocol clear
Disables all protocol features.
This commit adds also the first protocol feature.
hide_playlists_in_root
Disables the listing of playlists in the root folder
for the lsinfo command.
2024-09-28 22:41:35 +02:00
jcorporation
25e8ce2d37
New command tagtypes available
...
Shows the list of tag types configured by the ``metadata_to_use`` setting.
2024-09-28 22:40:29 +02:00
Max Kellermann
124c0e66ee
subprojects: update libnpupnp to 6.2.0-1, libmicrohttpd to 0.9.77-3
2024-09-27 08:53:01 +02:00
Max Kellermann
202bb4f90f
subprojects: update fmt to 11.0.2-1
2024-09-27 08:52:22 +02:00
Max Kellermann
5ee42ada67
subprojects: update curl to 8.10.0-1
2024-09-27 08:52:10 +02:00
Max Kellermann
752c6c1f03
lib/fmt/ExceptionFormatter: move the exception_ptr
2024-09-27 08:48:30 +02:00
Max Kellermann
def2221dfd
Merge branch 'searchplaylist_syntax' of https://github.com/jcorporation/MPD
2024-09-27 08:47:02 +02:00
Max Kellermann
9ff8e02e54
net/Resolver: use StringIsEqual()
2024-09-04 17:26:45 +02:00
Max Kellermann
32dd9704ce
util/DeleteDisposer: add const and noexcept
2024-09-04 17:24:42 +02:00
Max Kellermann
523519182a
util/IntrusiveHashSet: add concept checks
2024-09-04 17:24:24 +02:00
jcorporation
3f718e8924
Change the semantic of the searchplaylist protocol command
...
Old: searchplaylist {NAME} {FILTER} [{START:END}]
New: searchplaylist {NAME} {FILTER} [window {START:END}]
This is more similar to the other search commands and we can reuse search specific functions in libmpdclient.
2024-08-30 21:06:50 +02:00
jcorporation
26c4211cd4
New command stickernamestypes
...
Lists sticker names with their types and optionally filters by type
2024-08-30 20:14:55 +02:00
Max Kellermann
a3a07280e8
Merge branch 'mpd-2100-nested-and' of https://github.com/m7a/mpd
2024-08-30 12:57:20 +02:00
Max Kellermann
ed755f04e9
lib/fmt/meson.build: suppress -Warray-bounds with GCC 14
...
The bug is still present in GCC 14.
2024-08-30 12:48:41 +02:00
Max Kellermann
2809db8b40
Merge branch 'searchplaylist' of https://github.com/jcorporation/MPD
2024-08-30 12:47:24 +02:00
Max Kellermann
c866199d4c
net/SocketError: cast to socket_error_t to fix -Wsign-compare
...
Only relevant on Windows where socket_error_t is a `DWORD` (unsigned).
2024-08-30 12:45:10 +02:00
Max Kellermann
39937be2e1
Merge branch 'stickertypes' of https://github.com/jcorporation/MPD
2024-08-30 12:43:54 +02:00
Max Kellermann
d207c144d6
lib/curl/Multi: remove the Wait() overload with "int" timeout
...
Enforce type-safety.
2024-08-30 12:30:18 +02:00
Max Kellermann
435f1eb6cc
lib/curl/Multi: remove default timeout value
...
-1 is an illegal value and leads to CURLM_BAD_FUNCTION_ARGUMENT. Our
API shouldn't imply this value.
2024-08-30 12:30:15 +02:00
Max Kellermann
c7b80b0828
io/FileDescriptor: add method WriteAt()
2024-08-30 12:29:32 +02:00
Max Kellermann
59199b5620
io/FileDescriptor: pass std::span to ReadAt()
2024-08-30 12:29:27 +02:00
Max Kellermann
ebfc83dac5
io/FileDescriptor: add method SetPipeCapacity()
2024-08-30 12:28:51 +02:00
Max Kellermann
f535ccf9bf
net/UniqueSocketDescriptor: add UniqueFileDescriptor constructor
2024-08-30 12:28:19 +02:00
Max Kellermann
75eb2c257c
net/SocketError: add IsSocketError() overload with socket_error_t
2024-08-30 12:27:19 +02:00
Max Kellermann
314667259e
net/SocketDescriptor: add Duplicate() method
...
The the Duplicate() method we inherited from class FileDescriptor
returns a UniqueFileDescriptor, but we really want to return a
UniqueSocketDescriptor.
2024-08-30 12:27:13 +02:00
Max Kellermann
dbb2b29271
net/IPv6Address: add method GetPortBE()
2024-08-30 12:24:12 +02:00
Max Kellermann
7f25ede888
net/AddressInfo: add method Cast()
2024-08-30 12:23:45 +02:00
Max Kellermann
4a2fff019a
util/DisposablePointer: suppress -Wuninitialized
...
I pretend to know what I'm doing :-)
2024-08-30 12:23:45 +02:00
Max Kellermann
fae5d16d43
subprojects: update curl to 8.9.1-1
2024-08-30 12:23:41 +02:00
Max Kellermann
7bc2259b35
subprojects: update sqlite3 to 3.46.1-1
2024-08-30 12:23:27 +02:00
Max Kellermann
f66aed921c
python/build/libs: update FFmpeg to 7.0.2
2024-08-30 12:22:37 +02:00
Linux-Fan, Ma_Sys.ma
6db4b818e6
song/Filter: Fix spacing error on nested AND
...
Previously, `AND` expressions were the only filters which used `++s` instead
of `s = StripLeft(s + 1)` making them sensitive to spacing issues. This caused
nested AND expressions (like e.g. `(((A) AND (B)) AND (C))`) to needlessly be
rejected with the following error message: `{find} Word expected` due to the
fact that the inner AND expression would leave the cursor `s` at a space rather
than the beginning of the next word (remainder was ` AND (C))` rather than
`AND (C)`).
This commit fixes this by consistently using `s = StripLeft(s + 1)` instead
of `++s` when parsing AND expressions. Although it is not strictly necessary
to resolve the AND nesting bug, the case of trivial AND expressions (consisting
basically of only superfluous parentheses) is also changed to the new handling.
This should be more robust although I expect that case to be even less common
than the direct nesting of AND expressions.
see MusicPlayerDaemon/MPD#2100
2024-08-23 21:36:53 +02:00
jcorporation
f94caa96b8
Add command stickertypes
...
Prints all available stickertypes like tagtypes for tags.
2024-08-14 21:07:14 +02:00
Max Kellermann
965c466e9b
Merge branch 'mpg-duration-fix' of https://github.com/boedy/MPD
2024-08-10 16:54:48 +02:00
boedy
731f20111a
Override the value for file size in bytes. Useful for getting sensible track length values in feed mode or for HTTP streams.
...
https://www.mpg123.de/api/group__mpg123__status.shtml#gad0301e80dbc3f48e47e27d39cd328755
2024-08-08 18:43:15 +02:00
jcorporation
d62f7cdc34
New command searchplaylist
2024-08-02 23:46:17 +02:00
Max Kellermann
f7790430a0
lib/curl/Multi: add SetSocketFunction(), SetTimerFunction()
2024-07-31 10:06:29 +02:00
Max Kellermann
959826d1d1
input/ffmpeg: offload FFmpeg calls to thread
...
Prepare for interruptible I/O.
2024-07-30 12:43:05 +02:00
Max Kellermann
ec30716e01
input/thread: implement size and seek
2024-07-30 12:33:44 +02:00
Max Kellermann
dc51015c75
input/mms: move MMS_BUFFER_SIZE into the class
2024-07-30 12:33:30 +02:00
Max Kellermann
72b0eeb7b1
input/mms: invoke Start() in constructor
2024-07-30 12:31:58 +02:00
Max Kellermann
b050e0132e
input/{async,thread}: add an additional Cond field
...
This eliminates the ScopeExchangeInputStreamHandler kludge.
2024-07-29 23:17:33 +02:00
Max Kellermann
cf962d94c7
input/thread: remove bogus inline
2024-07-29 23:14:16 +02:00
Max Kellermann
c29d23b4c3
input/thread: use notify_one() instead of notify_all()
...
There's only ever one waiter, and notify_one() may be faster than
notify_all().
2024-07-29 23:09:07 +02:00
Max Kellermann
61e8df913d
input/thread: check IsEOF() in IsAvailable()
2024-07-29 23:05:00 +02:00
Max Kellermann
4a55e3e8bd
input/thread: check buffer.empty() in IsEOF()
2024-07-29 23:03:00 +02:00
Max Kellermann
2e78bd430c
input/thread: use pass std::span<std::byte> to ThreadRead()
2024-07-29 22:32:52 +02:00
Max Kellermann
dbaa72cb40
util/CircularBuffer: use std::span internally
2024-07-29 22:24:54 +02:00
Max Kellermann
596d2d93dd
util/CircularBuffer: use using instead of typedef
2024-07-29 22:21:38 +02:00
Max Kellermann
10311b3a65
util/CircularBuffer: explicitly forbid the copy operator
2024-07-29 22:20:15 +02:00
Max Kellermann
332ba42073
util/HugeAllocator: add std::span cast operator
2024-07-29 22:20:12 +02:00
Max Kellermann
4262d29965
util/HugeAllocator: add constexpr
2024-07-29 22:19:28 +02:00
Max Kellermann
0899d80ae0
util/CircularBuffer: add noexcept and constexpr
2024-07-29 22:14:59 +02:00
Max Kellermann
9fe6493fc2
util/CircularBuffer: use inline initializer
2024-07-29 22:13:50 +02:00
Max Kellermann
902cb8efac
input/thread: use std::byte instead of uint8_t
2024-07-29 22:13:50 +02:00
Max Kellermann
f54210bf68
input/async: move enum definition down
2024-07-29 22:13:42 +02:00
Max Kellermann
fb151c8662
lib/fmt/meson.build: suppress -Warray-bounds with GCC 13
2024-07-29 22:13:11 +02:00
Max Kellermann
323517753d
lib/fmt/meson.build: remove obsolete clang 14 workaround
...
Android NDK r27 has clang 18 and I don't feel like supporting clang 14.
2024-07-29 22:11:20 +02:00
Max Kellermann
5726d9f06a
mixer/Memento: include cleanup
2024-07-29 17:04:53 +02:00
Max Kellermann
0992fab1c8
filter/ReplayGain: include cleanup
2024-07-29 17:04:30 +02:00
Max Kellermann
b546ddc54c
client/Idle: include cleanup
2024-07-29 17:03:59 +02:00
Max Kellermann
d45b7cc972
IdleFlags: move to procool/
2024-07-29 17:02:33 +02:00
Max Kellermann
12eaaef210
output/Thread: allow Delay() to return duration::max()
...
Eliminate the periodic wakeups while paused in some output plugins.
2024-07-29 16:52:36 +02:00
Max Kellermann
5b8ef9a62b
python/build/__init__.py: add missing file
2024-07-29 16:51:40 +02:00
Max Kellermann
196258ea13
.github/workflows/build_android.yml: update NDK to r27
2024-07-29 16:38:26 +02:00
Max Kellermann
0a035f3ce0
output/alsa: add option "close_on_pause"
...
This allows keeping the ALSA PCM open even if playback is paused. As
a side effect, this allows using the "always_on" option with ALSA
outputs, because "always_on" pauses the output.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1623
2024-07-29 16:31:09 +02:00
Max Kellermann
7ab789fbaf
doc/user.rst: add clarification to the "always_on" option
2024-07-29 16:30:15 +02:00
Max Kellermann
9c8f4aaf99
lib/alsa/meson.build: require libasound 1.2 or later
...
This allows us to drop the 1.1.4 snd_pcm_drain() bug workaround (added
by commit f85d4d28d1 ).
2024-07-29 15:42:46 +02:00
Max Kellermann
3bef4f839a
output/alsa: fix coding style
2024-07-29 15:40:52 +02:00
Max Kellermann
1dfda3a5e1
output/alsa: reorder fields to improve packing
2024-07-29 15:38:02 +02:00
Max Kellermann
9d9c4045e2
output/alsa: move redundant code to UnregisterSockets()
2024-07-29 15:28:58 +02:00
Max Kellermann
d466deedad
output/alsa: fix lambda indent
2024-07-29 15:28:27 +02:00
Max Kellermann
bbbbf5f4bd
event/MultiSocketMonitor: reschedule epoll/EPERM workaround forever
...
Fixes a regression by commit 3558317dc9 which caused the ALSA null
plugin to cease to work because the workaround timer was never rescheduled.
2024-07-25 20:16:53 +02:00
Max Kellermann
f030b22bec
player/thread: wait for the first chunk in CheckCrossFade()
...
This fixes MixRamp problems which occur because CheckCrossFade() is
called before the decoder has parsed MixRamp tags after
DecoderClient::Ready().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2084
2024-07-25 20:07:52 +02:00
Max Kellermann
a693052f2c
Merge branch 'feat/showmovement' of https://github.com/mayanez/MPD
2024-07-25 14:01:19 +02:00
Miguel A. Arroyo
e3809bd4f0
feat: Add ShowMovement Tag
...
This commit adds the `SHOWMOVEMENT` [tag](https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#show-work-movement-4 ). Historically, this tag originates from iTunes' MP4, but has since become widely used. It is created by Picard's Classical music [plugins](https://picard-docs.musicbrainz.org/en/variables/variables_classical.html ) (such as "Classical Extras" or "Work & Movement").
The reasoning behind this tag is to display Work & Movement titles without redundant information and in a more uniform way. Moreover, it additionally serves as an implicit marker denoting classical music tracks (genre tags aren't sufficient).
If the client so chooses to support this tag, they can display `Work` and `Movement` instead of the track title allowing for cleaner display. Other clients can continue to display the `%title%` as before without any fuss.
2024-07-23 21:09:31 -07:00
Max Kellermann
41cc695848
Instance: fix io/rtio thread mixup
...
Fixes regression by commit 43d633f560
2024-07-23 15:12:30 +02:00
Max Kellermann
3558317dc9
event/MultiSocketMonitor: remove force-refresh on every iteration
...
libasound guarantees that the file descriptors never change for a
"prepared" PCM device, thus we can omit this defensive kludge.
2024-07-23 15:08:55 +02:00
Max Kellermann
18cb34825d
input/alsa: use libfmt instead of std::string concatenation
2024-07-23 15:04:49 +02:00
Max Kellermann
4c4a3c8664
event/TimerList: use FineTimerEvent::GetDue()
...
Avoid accessing the private field from an inner class of the friend
class, because some compilers apparently don't like it (Apple clang).
2024-07-23 13:38:05 +02:00
Max Kellermann
b4374ddb35
python/build/libs.py: update libopenmpt to 0.7.9
2024-07-23 13:08:04 +02:00
Max Kellermann
d24e7763f6
net/AddressInfo: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:05:19 +02:00
Max Kellermann
49ad4e9f3c
io/FileDescriptor: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:05:02 +02:00
Max Kellermann
ea96b321dc
net/SocketAdddress: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:04:48 +02:00
Max Kellermann
bc758cece0
util/StringPointer: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:04:37 +02:00
Max Kellermann
0e4885c1fa
util/IterableSplitString: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:04:30 +02:00
Max Kellermann
9944c97203
util/AllocatedString: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:04:20 +02:00
Max Kellermann
58a5550439
util/AllocatedArray: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-23 13:04:10 +02:00
Max Kellermann
8e42467bd2
decoder/mpg123: relax mpg123_length() check in Scan()
...
Do not fail the Scan() function completely if libmpg123 cannot
determine the duration.
2024-07-12 16:11:08 +02:00
Max Kellermann
e00e7802c8
decoder/mpg123: report unknown duration if mpg123_length()<0
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2058
2024-07-12 16:09:35 +02:00
Max Kellermann
55d0bbade2
decoder/mpg123: move code to GetDuration()
2024-07-12 16:08:11 +02:00
Max Kellermann
de9f0dc910
playlist/Plugin: convert _init() and _finish() to methods
2024-07-12 16:00:42 +02:00
Max Kellermann
cf5970a6e1
output/Registry: replace output_plugins_for_each() with a container class
2024-07-12 15:55:01 +02:00
Max Kellermann
29747a213f
playlist/Registry: replace playlist_plugins_for_each() with a container class
2024-07-12 15:52:05 +02:00
Max Kellermann
c64b4838dc
encoder/List: replace encoder_plugins_for_each() with a container class
2024-07-12 14:59:18 +02:00
Max Kellermann
040c4a8560
archive/ArchiveList: replace archive_plugins_for_each() with a container class
2024-07-12 09:58:19 +02:00
Max Kellermann
90dfa437e0
lib/alsa/NonBlock: use a persistent pollfd array
...
This implements the semantic API change introduced by commit
cd04da2bcf
2024-07-11 21:47:15 +02:00
Max Kellermann
4486b2eded
lib/alsa/NonBlock: add common base class
2024-07-11 21:38:45 +02:00
Max Kellermann
3db8a4f41b
lib/alsa/NonBlock: embed in "namespace Alsa"
2024-07-11 21:33:03 +02:00
Max Kellermann
9704cf3dcb
lib/alsa/NonBlock: fix lambda indent
2024-07-11 21:12:18 +02:00
Max Kellermann
9aa6b03ba8
event/MultiSocketMonitor: pass std::span to ReplaceSocketList()
2024-07-11 21:09:27 +02:00
Max Kellermann
45f92f0ef0
event/MultiSocketMonitor: fix lambda indent
2024-07-11 21:06:33 +02:00
Max Kellermann
23a3278b4e
event/MultiSocketMonitor: make ctor protected and explicit
2024-07-11 21:05:11 +02:00
Max Kellermann
951f916440
mixer/alsa: add noexcept
2024-07-11 21:03:41 +02:00
Max Kellermann
fb87e19bae
input/Registry: replace the input_plugins_for_each macros with a container class
2024-07-11 20:52:44 +02:00
Max Kellermann
49edb16de0
decoder/Thread: add enum DecodeResult, log better diagnostics
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2076
2024-07-11 16:47:43 +02:00
Max Kellermann
8671896e4c
decoder/Thread: throw StopDecoder if command==STOP in decoder_run_stream()
...
Everybody else is doing that, so let's do the same and not pretend
playback was successful.
2024-07-11 16:28:57 +02:00
Max Kellermann
c2470ebd9c
decoder/List: eliminate decoder_plugins_try()
...
Migrate callers to GetEnabledDecoderPlugins(). By not using lambdas,
we can switch to enums as return value for better diagnostics.
2024-07-11 16:15:38 +02:00
Max Kellermann
a27fb71c4c
decoder/List: add iterable container for decoder plugins
2024-07-11 15:30:31 +02:00
Max Kellermann
f6a687dc2b
util/FilteredContainer: new class
2024-07-11 15:30:30 +02:00
Max Kellermann
9210705598
util/TerminatedArray: new class
2024-07-11 15:30:30 +02:00
Max Kellermann
3d995bba5f
util/DereferenceIterator: add class DereferenceContainerAdapter
2024-07-11 14:55:35 +02:00
Max Kellermann
c77f5095d6
util/DereferenceIterator: allow comparing with sentinel end iterators
2024-07-11 14:55:35 +02:00
Max Kellermann
3701378449
util/DereferenceIterator: fix operator- and operator+ return types
2024-07-11 14:29:10 +02:00
Max Kellermann
cb9f3c1a5b
util/DereferenceIterator: optimize and simplify increment/decrement operators
2024-07-11 14:27:23 +02:00
Max Kellermann
fe66cde616
util/DereferenceIterator: add constexpr
2024-07-10 20:13:24 +02:00
Max Kellermann
0cc9ef0aee
util/DereferenceIterator: remove unnecessary operator!=()
...
The compiler must generate this implicitly from operator==().
2024-07-10 20:13:19 +02:00
Max Kellermann
68a424d9e1
util/DereferenceIterator: add missing const
2024-07-10 20:11:55 +02:00
Max Kellermann
13576b8a2e
lib/curl/Easy: use pass std::chrono::duration to SetTimeout()
2024-07-10 16:58:16 +02:00
Max Kellermann
7c21d57953
config/Block: add method GetDuration()
2024-07-10 16:58:16 +02:00
Max Kellermann
1e9e182a32
config/Data: merge the two duration parser methods, pass minimum value
2024-07-10 16:49:18 +02:00
Max Kellermann
3733bc57b7
config/{Block,Data,Param}: add concept checks to With()
2024-07-10 16:38:08 +02:00
Max Kellermann
a196d1ddf2
decoder/Thread, ...: quote log strings
2024-07-10 15:40:04 +02:00
Max Kellermann
8861279add
Merge branch 'explicit_case_sensitivity' of https://github.com/geneticdrift/MPD
2024-07-10 15:33:47 +02:00
Max Kellermann
f2f6dc5897
subprojects: update fmt to 11.0.1
2024-07-10 09:32:11 +02:00
Max Kellermann
00c4abfd2e
Merge branch 'opus' of https://github.com/neheb/MPD
2024-07-10 09:27:16 +02:00
Rosen Penev
2d1feb78b5
subprojects: opus: update to 1.5.2
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-07-09 15:04:43 -07:00
Rosen Penev
266deaaef1
subprojects: libnpupnp: update to 6.1.3
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-07-09 14:48:37 -07:00
gd
d2382e8de9
ParseStringFilter: when failed to parse the operator, indicate the unknown operator in the error message
2024-07-09 17:25:45 +03:00
gd
c39d8e5813
Added explicitly case sensitive/insensitive filter operators.
...
The default case sensitivity is hard coded for each command.
These operators allow to override the this default case sensitivity.
2024-07-09 17:25:45 +03:00
Max Kellermann
bd59c889f3
util/StringVerify: new library
2024-07-08 16:02:40 +02:00
Max Kellermann
553c2e9e2b
output/Command: trigger IDLE_OUTPUT only for the current partition
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1622
2024-07-08 15:54:14 +02:00
Max Kellermann
bdc5602244
meson.build: update the required GCC/clang versions
2024-07-08 15:44:45 +02:00
Max Kellermann
3229da48e3
tag/Mask: pass 64 bit integer to constructor, prevent truncation
...
Commit f49d4ef4ad changed the bit mask size to 64 bit, but I forgot
to change the constructor as well.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2057
2024-07-08 15:34:27 +02:00
Max Kellermann
e380ae90eb
Log: add missing include for std::back_inserter()
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2071
2024-07-07 10:10:27 +02:00
Max Kellermann
8d15e0fed3
Merge branch 'meson' of https://github.com/leigh123linux/MPD
2024-07-06 13:43:28 +02:00
Leigh Scott
b459fd3910
Fix bin install location on linux.
...
For Linux, Meson's default value for bindir is 'bin' [1].
This commit restores mpd's previous functionality of installation in ${prefix}/bin.
[1] https://mesonbuild.com/Builtin-options.html
Fixes https://github.com/MusicPlayerDaemon/MPD/issues/2043
2024-07-06 09:43:01 +01:00
Max Kellermann
8790f2469c
lib/fmt/SocketAddressFormatter: switch to the new net/FormatAddress library
2024-07-05 18:39:10 +02:00
Max Kellermann
d3ef4ab234
net/FormatAddress: new library to replace ToString.cxx
...
This library writes to a caller-specified buffer instead of
allocating a std::string which can be faster by avoiding heap
allocations.
2024-07-05 18:38:17 +02:00
Max Kellermann
fcddab84c6
subprojects: add libnpupnp/GCC14 fix
2024-07-05 18:26:51 +02:00
Max Kellermann
28c030c0f0
lib/fmt/SocketAddressFormatter: add const for fmt 11 support
...
See d70729215f
2024-07-05 18:21:38 +02:00
Max Kellermann
175103e8d4
lib/fmt/ExceptionFormatter: un-inline to reduce header dependencies
2024-07-05 18:20:31 +02:00
Max Kellermann
3f638eeed6
lib/fmt/SocketAddressFormatter: un-inline to reduce header dependencies
2024-07-05 18:20:31 +02:00
Max Kellermann
df2be0a75f
Log: add missing include for GetFullMessage()
2024-07-05 18:20:31 +02:00
Max Kellermann
608c2a8c93
.github/workflows/build.yml: add clang build
...
Due to linker failures, we need to build our own libfmt and
googletest.
2024-07-05 18:05:56 +02:00
Max Kellermann
2d918bf2c9
.github/workflows/build.yml: add matrix.packages
2024-07-05 17:50:46 +02:00
Max Kellermann
0bd1289371
.github/workflows/build.yml: remove the forced fallback for libfmt
...
Ubuntu 24.04 has fmt 9.1.0, so we don't need that anymore.
2024-07-05 17:50:44 +02:00
Max Kellermann
b2e2d36d79
.github/workflows/build.yml: add Meson option "--wrap-mode nofallback"
...
The library setup should be well-defined without implicit downloads.
2024-07-05 17:43:39 +02:00
Max Kellermann
11bb2ad0fd
.github/workflows/build_android.yml: update NDK to 27rc1
2024-07-05 17:35:54 +02:00
Max Kellermann
f37b699349
.github/workflows/build_android.yml: switch to Ubuntu 24.04 as well
...
Since 24.04 comes with Meson 1.3.2, we can install it with "apt-get"
instead of "pip".
2024-07-05 17:29:37 +02:00
Max Kellermann
044280c538
meson.build: require Meson 1.0
...
Debian Bookworm (the current stable) has 1.0.1 and Ubuntu LTS 24.04
has 1.3.2. It's acceptable to require at least version 1.0 now.
2024-07-05 17:23:52 +02:00
Max Kellermann
473fb4e19f
.github/workflows/build.yml: update GCC 11 build to GCC 14
...
We only need the oldest supported compiler (i.e. GCC 10) and the
newest one available in the runner (i.e. GCC 14).
2024-07-05 17:21:31 +02:00
Max Kellermann
404e1c3912
.github/workflows/build.yml: update ubuntu-22.04 to ubuntu-24.04
2024-07-05 17:12:34 +02:00
Max Kellermann
3648475f87
Merge branch 'libfmt' of https://github.com/heitbaum/MPD
2024-07-05 16:47:04 +02:00
Rudi Heitbaum
1402869715
lib/fmt: support build with libfmt-11.0.0
...
Upstream libfmt commit fmtlib/fmt@d707292
now requires the format function to be const.
Adjust the function prototype so it is const and can compile.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com >
2024-07-05 14:33:07 +00:00
Max Kellermann
a64ea486e8
Merge branch 'albumart_doc' of https://github.com/jcorporation/MPD
2024-07-05 16:27:47 +02:00
Max Kellermann
ffa917e9b5
Merge branch 'stickernames_cmd' of https://github.com/jcorporation/MPD
2024-07-05 16:26:58 +02:00
Max Kellermann
ac1265b9cc
output/alsa: set up the ALSA channel map
...
This is necessary for proper multi-channel support because many ALSA
drivers do not use the channel maps from surround*.conf.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2063
2024-06-27 21:52:38 +02:00
Max Kellermann
2ce8310448
time/Convert: forward-declare struct tm
2024-06-25 20:33:13 +02:00
Max Kellermann
a739eefb01
lib/zlib/Error: derive from std::system_error
2024-06-25 20:32:33 +02:00
Max Kellermann
432bfa15f4
net/SocketError: move check to IsSocketError()
2024-06-25 20:29:27 +02:00
Max Kellermann
7b938b4d14
util/Exception: sanitize message strings
...
This should prevent leaking unsanitized strings from libraries.
2024-06-25 20:29:07 +02:00
Max Kellermann
abb23ba894
event/EpollEvents: add mapping for EPOLLPRI
2024-06-25 20:28:34 +02:00
Max Kellermann
cd64f9c422
subprojects: update curl to 8.8.0-1
2024-06-25 20:08:45 +02:00
Max Kellermann
c65d0cefc1
subprojects: update sqlite3 to 3.46.0-1
2024-06-25 20:08:45 +02:00
Max Kellermann
799e89af9e
python/build/libs.py: update FFmpeg to 7.0.1
2024-06-25 20:08:00 +02:00
Max Kellermann
381215fd73
*: use std::scoped_lock with implicit template parameter
2024-05-23 20:54:49 +02:00
Max Kellermann
4fc3230fe6
event/Loop: use std::scoped_lock with implicit template parameter
2024-05-23 20:44:12 +02:00
Max Kellermann
64bdaa46fb
lib/curl/Init: use std::scoped_lock with implicit template parameter
2024-05-23 20:44:12 +02:00
Max Kellermann
6e16eaebba
lib/fmt/SystemError: include <array> only on Windows
2024-05-23 20:31:56 +02:00
Max Kellermann
a67f7f88e4
util/MimeType: add missing include
2024-05-23 20:31:10 +02:00
Max Kellermann
ec8f467585
util/Intrusive*: add IWYU pragmas
2024-05-23 20:30:50 +02:00
Max Kellermann
9e3a66d5bf
util/djb_hash: make inline and constexpr
...
Allows calculating hashes at compile time.
2024-05-23 20:30:17 +02:00
Max Kellermann
c7409d1e04
util/AllocatedString: add missing include
2024-05-23 20:22:44 +02:00
Max Kellermann
b64d01677b
storage/nfs: optimize OpenFile()
2024-05-17 13:39:42 +02:00
Max Kellermann
9e8128ecb5
lib/nfs/FileReader: convert path to std::string
2024-05-17 12:54:08 +02:00
Max Kellermann
131dcce0a1
playlist/Mapper: use Storage::OpenFile()
2024-05-17 12:54:08 +02:00
Max Kellermann
6dfdd8c1c2
db/update/Walk: use Storage::OpenFile()
2024-05-17 12:54:08 +02:00
Max Kellermann
1b6c279850
db/update/Paylist: use Storage::OpenFile()
2024-05-17 12:54:08 +02:00
Max Kellermann
81c778a529
SongUpdate: use Storage::OpenFile()
2024-05-17 12:54:08 +02:00
Max Kellermann
f578a1cb2b
storage/Interface: add virtual method OpenFile()
...
This should replace most InputStream::Open() calls because it is a
chance to reuse existing resources (e.g. the NFS connection). No such
optimization is implemented, currently (and the method is not yet used
by anybody).
2024-05-17 12:54:08 +02:00
Max Kellermann
2576e66a55
input/nfs: cancel the pending read operation on seek
2024-05-17 12:54:08 +02:00
Max Kellermann
58e3b830e9
lib/nfs/FileReader: clear the read_buffer in CancelRead()
...
Fixes assertion failure with libnfs 6.
2024-05-17 12:53:35 +02:00
Max Kellermann
1d35031024
lib/nfs/Connection: merge CancelAndClose() into Cancel()
2024-05-17 12:53:30 +02:00
Max Kellermann
96b61755da
lib/nfs/FileReader: fix doc typo
2024-05-15 21:31:30 +02:00
Max Kellermann
9f174c56ce
playlist/Mapper: postpone the stored playlist error
...
Fixes another regression by commit
f53cd44c7a - an exception thrown by
playlist_open_in_playlist_dir() would skip over
playlist_open_in_storage().
2024-05-15 21:08:46 +02:00
Max Kellermann
c8be9662bb
playlist/Print: add missing exception handler
...
This went missing in commit f53cd44c7a
2024-05-15 20:53:55 +02:00
Max Kellermann
f53cd44c7a
playlist/{Stream,Mapper,Any}: propagate exceptions, do not catch&log them
...
Let the caller handle all the exceptions.
2024-05-15 20:19:57 +02:00
Max Kellermann
9303764a83
playlist/Print: throw PlaylistError::NoSuchList instead of returning false
2024-05-15 20:19:09 +02:00
Max Kellermann
a5456a89dc
playlist/Length: throw PlaylistError::NoSuchList instead of returning false
2024-05-15 20:15:16 +02:00
Max Kellermann
c974fc664c
playlist/Plugin: add noexcept
2024-05-15 20:02:12 +02:00
Max Kellermann
eceead671e
playlist/Stream: add API documentation
2024-05-15 19:59:57 +02:00
Max Kellermann
4e7b554605
TagAny, playlist/Mapper: use if with initializer
2024-05-15 15:02:59 +02:00
Max Kellermann
a701da6386
db/update/InotifyUpdate: use OpenLocalInputStream()
2024-05-15 14:48:32 +02:00
Max Kellermann
1f47fe47c7
input/Open: move code to WaitReady()
2024-05-15 14:39:40 +02:00
Max Kellermann
5dd07ac040
test/run_storage: use the OptionParser class for command-line options
...
Introducing the option "--verbose".
2024-05-15 14:11:25 +02:00
Max Kellermann
ca8a2aeb7b
test/run_storage: print a combined usage text for all commands
2024-05-15 11:17:30 +02:00
Max Kellermann
57fad1d4b2
test/run_storage: move initialization to class GlobalInit
2024-05-15 10:15:12 +02:00
Max Kellermann
5c2720a931
.github/workflows/build.yml: drop MINGW32 build
...
The MINGW32 build has been failing for a while because the MSYS2
repository has dropped MINGW32 versions of various packages in commit
6866be94df
I suppose nobody really uses 32 bit anymore. I'd like to have a 32
bit test of MPD, just to verify code correctness, but on the other
hand, I don't like solving problems like this MSYS2 packaging problem.
2024-05-15 06:20:57 +02:00
Max Kellermann
31e583e9f8
lib/nfs: initial support for libnfs API 2
...
Commit
5e8f7ce273
introduced the libnfs API version 2 which may eventually become libnfs
version 6.
This version detection depends on my pull request
https://github.com/sahlberg/libnfs/pull/468
2024-05-15 06:01:42 +02:00
Max Kellermann
0ac24e5a24
lib/nfs/FileReader: move code to ReadCallback()
2024-05-15 06:00:37 +02:00
Max Kellermann
98f53b6d3d
lib/nfs/Connection: add DisposablePointer parameter to CancelAndClose()
...
Just in case somebody needs to free a buffer after the NFS
cancellation has completed.
2024-05-15 06:00:35 +02:00
Max Kellermann
f5092cb73d
util/DisposablePointer: new class
2024-05-15 05:58:23 +02:00
Max Kellermann
48d3bd1cca
lib/nfs/Connection: add API documentation
2024-05-14 19:57:50 +02:00
Max Kellermann
5cffd4f673
lib/nfs/Connection: remove EnableCloseOnExec() call
...
SOCK_CLOEXEC has been added to libnfs version 2, and since we require
at least version 4, we can safely remove this call.
2024-05-14 19:51:52 +02:00
Max Kellermann
416f65fe01
util/RoundPowerOfTwo: new library
2024-05-13 20:25:57 +02:00
Max Kellermann
64c291ba78
lib/nfs/Connection: suppress bogus clang warning
...
We do need to capture "this" because we use "this->active_leases", but
clang 18 is too dumb to understand this.
2024-05-13 18:30:05 +02:00
Max Kellermann
dcde2a0bae
lib/nfs/Connection: fix -Wunused-lambda-capture
2024-05-13 18:27:38 +02:00
Max Kellermann
f0ac0c19b7
lib/nfs/Connection: remove obsolete debug field "in_destroy"
...
This is obsolete because PrepareDestroyContext() no longer calls
nfs_destroy_context().
2024-05-13 16:53:18 +02:00
Max Kellermann
ba1b8533a5
lib/nfs/Connection: fix assertion failure on mount timeout
...
When nfs_destroy_context() is called while nfs_mount_async() is in
progress, libnfs invokes MountCallback(-EINTR) (but only if a NFS RPC
call is in progress; if the TCP connect is in progress, that callback
is not invoked).
If the mount operation had timed out, OnMountTimeout() set
mount_state=FINISHED, which triggered an assertion failure in
MountCallback(); this commit adds a check on whether the mount has
timed out and ignores the MountCallback.
2024-05-13 16:51:44 +02:00
Max Kellermann
84e8927b1b
lib/nfs/FileReader: remove obsolete stat64 cast
...
Obsoleted (and broken) by commit 9947d3e67f
2024-05-13 12:33:03 +02:00
Max Kellermann
556300d59a
input/InputStream: add [[nodiscard]]
2024-05-13 12:29:16 +02:00
Max Kellermann
34f7b38f39
input/InputStream: pass std::span<std::byte> to Read()
2024-05-13 12:28:40 +02:00
Max Kellermann
f28d10d934
decoder/dsdiff: convert pointers to references
2024-05-13 11:34:05 +02:00
Max Kellermann
d6adc59265
test/run_storage: use FormatISO8601()
2024-05-13 10:37:33 +02:00
Max Kellermann
c154dc00d7
test/run_storage: use StringIsEqual()
2024-05-13 10:37:25 +02:00
Max Kellermann
6d5dab38dd
input/async: pass std::string_view to constructor
2024-05-13 10:18:18 +02:00
jcorporation
480f4d4cf1
Fix filename list for albumart
2024-05-12 22:17:13 +02:00
jcorporation
f8271fec12
command_available return stickernames only if stickerdb is enabled
2024-05-12 21:23:29 +02:00
Max Kellermann
4800f1d8f2
storage/Interface: add [[nodiscard]]
2024-05-10 19:08:57 +02:00
Max Kellermann
48ce8e9fb7
subprojects: update sqlite3 to 3450300
2024-05-10 18:18:04 +02:00
Max Kellermann
f746e5b7d7
subprojects: update liburing to 2.5
2024-05-10 18:17:52 +02:00
Max Kellermann
cdce257512
subprojects: update libnpupnp to 6.1.2
2024-05-10 18:17:42 +02:00
Max Kellermann
227ab998bc
lib/nfs/Connection: pass status and data to the NfsClientError ctor
...
This way, we avoid calling the FormatNfsClientError() which crashes
when nfs_get_error() returns nullptr; that can happen on RPC errors:
then, libnfs's check_nfs4_error() doesn't call nfs_set_error().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2040
2024-05-10 16:36:29 +02:00
Max Kellermann
9384bff6f9
lib/nfs/Manager: add method MakeConnection()
...
This uses the libnfs function nfs_parse_url_dir() which means MPD
gains support for the libnfs arguments like "version".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2039
2024-05-07 21:22:43 +02:00
Max Kellermann
9947d3e67f
lib/nfs/Connection: use nfs_fstat64_async()
...
This is 64-bit-safe and anyway, nfs_fstat_async() doesn't work with
NFSv4.
2024-05-07 21:22:40 +02:00
Max Kellermann
67f01fbdb6
db/plugins/simple/Song: pass StorageFileInfo to UpdateFile()
...
Eliminates a redundant GetInfo() call.
2024-05-07 21:22:39 +02:00
Max Kellermann
164b5b0cf3
db/Song, SongUpdate: remove unnecessary c_str() calls
...
Just case implicitly to std::string_view, which is both simpler and
safer.
2024-05-07 21:13:38 +02:00
Max Kellermann
56bb1dddd7
lib/nfs/Connection: simplify error handling in OnSocketReady()
2024-05-06 18:35:58 +02:00
Max Kellermann
e6b1cf540b
lib/nfs/Connection: remove unnecessary initializers from MountInternal()
2024-05-06 18:24:36 +02:00
Max Kellermann
d61c83ace8
lib/nfs/Connection: create the nfs_context in the constructor
...
Another lifetime simplification.
2024-05-06 18:22:23 +02:00
Max Kellermann
4139024b3d
lib/nfs/Connection: return from OnSocketReady() after error
2024-05-06 18:20:42 +02:00
Max Kellermann
48fe8666c9
lib/nfs/Connection: call nfs_destroy_context() only in the destructor
...
This simplifies the lifetime of the nfs_context object.
2024-05-06 18:16:11 +02:00
Max Kellermann
90a44a0c07
lib/nfs/Connection: replace flag "mount_finished" with enum
2024-05-06 18:16:11 +02:00
Max Kellermann
e013c19223
storage/nfs: remove unused method EnsureConnected()
2024-05-06 18:16:11 +02:00
Max Kellermann
4684d05fa6
player/Thread: reset the decoder_starting flag in StopDecoder()
...
Fixes crash bug (assertion failure) if a new "play" command is handled
while the player thread waits for decoder startup.
2024-05-06 17:38:58 +02:00
Max Kellermann
1c3a1c842d
lib/nfs/Lease: use InstrusiveList instead of std::list
2024-05-06 17:22:36 +02:00
Max Kellermann
f5127686fe
lib/nfs/Connection: pass std::exception_ptr by value
2024-05-06 17:03:21 +02:00
Max Kellermann
2b0275a1c8
lib/nfs/Connection: pass server and export_name as std::string_view
2024-05-06 17:01:15 +02:00
Max Kellermann
028693c380
lib/nfs/Manager: forward-declare class ManagedConnection
2024-05-06 16:58:41 +02:00
Max Kellermann
63920be17e
lib/nfs/Connection: make server and export_name const
2024-05-06 16:55:57 +02:00
Max Kellermann
96888cce9c
storage/nfs: pass std::string_view to the NfsStorage ctor
2024-05-06 15:28:01 +02:00
Max Kellermann
bcc39be784
lib/nfs/Base: use std::string_view
2024-05-06 15:25:55 +02:00
Max Kellermann
b6314b4c4b
lib/nfs/Base: use std::array
2024-05-06 15:22:49 +02:00
Max Kellermann
23d895415a
lib/nfs/meson.build: require libnfs 4.0
...
All Linux distributions have at least version 4, and thus I cannot
test with older versions.
2024-05-06 14:54:04 +02:00
Max Kellermann
518ce0187a
remove macOS support
...
There were a few macOS related bug reports on the bug tracker which
have been open for years without a volunteer caring for them. The
GitHub actions build has also been broken for a long time due to bugs
in the ancient LLVM toolchain shipped with macOS, making macOS an
unsuitable non-Linux target for testing MPD's portability.
All of this makes macOS support an annoying liability for me. To
avoid more frustration, I'm hereby dropping macOS support completely
from MPD. Maybe this causes enough pain for a new maintainer to
spawn, but maybe nobody cares, so... let's see.
2024-05-06 14:11:50 +02:00
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
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
Max Kellermann
669cbcd25a
util/IntrusiveList: allow the last disposer to destroy the IntrusiveList
...
Fixes a use-after-free bug in Co::MultiAwaitable::SetReady() when the
last callback frees the Co::MultiAwaitable owner.
2024-04-10 13:35:09 +02:00
Max Kellermann
2f7c19f139
util/SpanCast: rewrite ToStringView(std::span<std::byte>) to avoid cast ambiguities
2024-04-10 13:34:51 +02:00
Max Kellermann
e131f22642
util/SpanCast: merge two ToStringView() using std::remove_const_t
2024-04-10 13:34:25 +02:00
Max Kellermann
a09e33bf8e
Merge branch 'RoboSchmied-AGfixT118' of https://github.com/RoboSchmied/MusicPlayerDaemon-MPD
2024-04-08 08:23:48 +02:00
Max Kellermann
cd3c34e7b9
Merge branch 'intents' of https://github.com/DDRBoxman/MPD
2024-04-08 08:23:25 +02:00
Max Kellermann
b3733ef32a
Merge branch 'sticker_filters' of https://github.com/jcorporation/MPD
2024-04-08 08:20:28 +02:00
RoboSchmied
f3b9674fed
Fix: 1 typo
...
Co-authored-by: RoAGmer <no-reply@github.com >
Signed-off-by: RoboSchmied <github@roboschmie.de >
2024-04-07 18:59:40 +02:00
Colin Edwards
b0cd456753
android: Button to jump to bottom of log view
...
This adds a button that can jump to the bottom of the log view.
If the user scrolls up we now disable the auto scroll down and show the
down button. When the down button is clicked the auto scroll resumes and
the button is removed.
2024-04-06 20:11:01 -05:00
jcorporation
c613d25f29
Add operators contains and starts_with to sticker find
2024-04-06 20:08:59 +02:00
Colin Edwards
fff9ceccc2
android: Add intents for service start and stop
...
org.musicpd.action.StartService
org.musicpd.action.StopService
You can test these actions like:
adb shell am broadcast -a org.musicpd.action.StartService org.musicpd
Calling these from an app like tasker should allow for automation
2024-04-05 23:46:14 -05:00
Colin Edwards
4bcbeae1e0
android: Move service client into it's own file
...
The service file was getting harder to read so lets pull the client code
into it's own file
2024-04-05 23:27:41 -05:00
Max Kellermann
4c56e87e36
lib/curl/Global: remove empty line
2024-04-04 09:18:34 +02:00
Max Kellermann
011b96ff98
net/UniqueSocketDescriptor: add method MoveToFileDescriptor()
2024-04-04 09:16:44 +02:00
Max Kellermann
d563f5fc87
decoder/mpg123: use mpg123_ssize_t only on MPG123_API_VERSION >= 47
2024-04-03 23:21:54 +02:00
Max Kellermann
9c2df5ce19
decoder/mpg123: implement stream_decode
2024-04-03 23:12:26 +02:00
Max Kellermann
1745c485f3
decoder/mpg123: move code to Scan()
2024-04-03 22:52:56 +02:00
Max Kellermann
a53db82ae4
decoder/mpg123: move code to Decode()
2024-04-03 22:49:43 +02:00
Max Kellermann
a20a83eb76
decoder/mpg123: move code to GetAudioFormat()
2024-04-03 22:37:29 +02:00
Max Kellermann
65e5a43e46
decoder/List: prefer "mpg123" over "mad"
...
libmad hasn't been maintained for many many years, while libmpg123 is
still maintained.
Our "mad" plugin can't do streams, but MPD will automatically fall
back to "mad" (or "ffmpeg") for streams.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1954
2024-04-03 22:25:34 +02:00
Max Kellermann
b6afdf1201
util/UriUtil: disable path segment stripping
...
This bug introduced by commit 49ed9dae34
and activated by commit acc1bd6297
caused leading spaces to disappear from the beginning of all file
names.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1961
2024-04-03 22:00:36 +02:00
Max Kellermann
08a00ee21b
config/PartitionConfig: clip the max_playlist_length setting
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1932
2024-04-03 21:43:39 +02:00
Max Kellermann
41a1e98cb9
subprojects: update sqlite3 to 3.45.2-1
2024-04-03 21:34:40 +02:00
Max Kellermann
99da022775
util/IntrusiveSortedList: remove unused class
2024-04-03 21:31:08 +02:00
Max Kellermann
1ee25b4234
event/TimerList: remove option NO_BOOST
...
Always use the new IntrusiveTreeSet class.
2024-04-03 21:30:59 +02:00
Max Kellermann
c5e607a310
event/TimerList: use IntrusiveTreeSet instead of boost::intrusive::multiset
2024-04-03 21:30:31 +02:00
Max Kellermann
5a0bad3b2f
util/IntrusiveTreeSet: new class
2024-04-03 21:29:34 +02:00
Max Kellermann
6a99f20828
util/IntrusiveHashSet: add concept checks to *Operators
...
This requires adding another template argument and reordering the others.
2024-04-03 21:27:37 +02:00
Max Kellermann
91ca502e10
output/httpd/Client: pass std::string_view to HandleLine()
2024-04-03 21:06:11 +02:00
Max Kellermann
1e5c37ee78
util/SpanCast: add ToStringView() with non-const std::byte
...
Without this, we would get std::string_view<std::byte> which makes no
sense.
2024-04-03 20:58:03 +02:00
Max Kellermann
ef2cdc0c6a
output/httpd/Client: remove duplicate API docs
2024-04-03 20:50:31 +02:00
Max Kellermann
c94c08c6b4
event/BufferedSocket: pass std::span to OnSocketInput()
2024-04-03 20:43:40 +02:00
Max Kellermann
5de8edced6
output/httpd/HttpdClient: convert metaint to a compile-time constant
...
After all these years, we had this as a field but there was never a
way to change the value. So let's just hard-code it until we actually
have a reason to make it variable at runtime.
2024-04-03 20:30:53 +02:00
Max Kellermann
8906ce07de
output/httpd/IcyMetaDataServer: pass metaint as std::size_t
2024-04-03 20:29:47 +02:00
Max Kellermann
9d66fc491c
output/httpd/Client: fix API doc syntax
2024-04-03 20:21:18 +02:00
Max Kellermann
f8a838db5d
output/httpd/Client: convert variable to std::string_view
...
In all cases, we already know the length, and casting the C string to
std::string_view has to call strlen() again.
2024-04-03 20:20:33 +02:00
Max Kellermann
e4ba736d03
input/{async,rewind}, decoder/dsdiff: use std::cmp_*() for safer integer comparisons
2024-03-15 18:45:46 +01:00
Max Kellermann
cc291e8c98
Merge branch 'extend-robustness-of-cdda-playback' of https://github.com/lazypingu/MPD
2024-03-15 18:39:45 +01:00
lazypingu
c00d217a53
Skip track if returned LSNs are negative which indicates track errors or if track is not an audio track
2024-03-12 20:39:51 +01:00
lazypingu
9d853897cd
Use track and disc functions from libcdio-paranoia to enable playback of hidden tracks and audio tracks on multisession CDs
2024-03-12 20:37:50 +01:00
lazypingu
88c77f9c8a
Add debug logging if setting speed failed
2024-03-12 20:37:50 +01:00
lazypingu
1a7278f1d3
Move cddap_speed_set below cddap_open to make sure that the drive was initialized and opened before attemting to set the speed
2024-03-12 20:36:28 +01:00
Max Kellermann
9916d455f9
python/build/libs: fix libnfs 5.0.3 path
2024-03-11 15:55:25 +01:00
Max Kellermann
541707f9a8
lib/curl/Easy: add SetRequestBody() overload with std::span
2024-03-11 15:32:24 +01:00
Max Kellermann
00cf036d58
lib/avahi/Client: relax assertion after COLLISION/REGISTERING
...
Turns out that `AVAHI_CLIENT_S_COLLISION` can occur after
`AVAHI_CLIENT_S_RUNNING`, and `connected==true`. Relaxing this fixes
a bogus assertion failure.
2024-03-11 15:32:24 +01:00
Max Kellermann
9c68f24cfc
net/SocketError: fix typo
...
Whoops. This function has never been used.
2024-03-11 15:32:24 +01:00
Max Kellermann
02c4512b00
util/CharUtil: add IsLowerHexDigit()
2024-03-11 15:32:24 +01:00
Max Kellermann
be84b189dc
util, io, net, ...: use "#pragma once"
2024-03-11 15:32:24 +01:00
Max Kellermann
313f2a1894
python/build/libs: update libnfs to 5.0.3
2024-03-11 15:32:24 +01:00
Max Kellermann
a1ae1a1e95
python/build/libs: update FFmpeg to 6.1.1
2024-03-11 15:32:24 +01:00
Max Kellermann
4874bcf8e8
python/build/libs: update libopenmpt to 0.7.4
2024-03-11 15:32:24 +01:00
Max Kellermann
280ff9211f
python/build/libs: update zlib to 1.3.1
2024-03-11 15:32:24 +01:00
Max Kellermann
494f658dee
meson.build: suppress -Wnan-infinity-disabled (clang 18) due to libfmt
2024-03-11 15:32:24 +01:00
Max Kellermann
c144d0a00d
meson.build: build fmt in C++20 mode
...
Enables `char8_t` support which eliminates clang 18's
`-Wdeprecated-declarations` warning about fmt's use of
`std::string_view<unsigned char>`.
2024-03-11 15:32:24 +01:00
Max Kellermann
696a36bd5a
subprojects: update sqlite3 to 3.45.1-1
2024-03-11 15:32:24 +01:00
Max Kellermann
3a3fc5e13a
subprojects: update openssl to 3.0.8-3
2024-03-11 15:32:24 +01:00
Max Kellermann
0b89cc306e
subprojects: update fmt to 10.2.0-2
2024-03-11 15:32:24 +01:00
Max Kellermann
dbc68047ad
subprojects: update flac to 1.4.3-2
2024-03-11 15:32:24 +01:00
Max Kellermann
2fdfe3a854
subprojects: update curl to 8.6.0
2024-03-11 15:10:41 +01:00
Max Kellermann
d685d693e8
input/rewind, archive/iso9660: use use std::cmp_*() for safe integer comparison
2024-03-11 15:09:57 +01:00
Max Kellermann
b0cfdfa257
client/Idle: consume only idle flags that were subscribed to
...
Since the very beginning when idle subscriptions where introduced
(commit 0bad84066b ), waiting for a certain idle mask would clear
all other idle flags as well. This would cause idle events to get
lost.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1998
2024-03-11 15:07:07 +01:00
Marius Feraru
7b6909f2c0
db/update/Walk:FindAncestorLoop: uint64_t inode & device
...
Previously, inode numbers were truncated to 32 bits, which could lead
to problems on XFS where inodes are 64 bit; this could lead to bogus
"recursive directory found" errors during database update.
[mk: added commit description and NEWS line]
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2000
2024-03-11 13:34:27 +01:00
jcorporation
45553c5f61
This commit adds the sort and window parameter to "sticker find"
...
The three new compare operators "eq", "gt" and "lt" are casting the values to int.
Sort supports:
- uri: sort by uri
- value: sort by value as string
- value_int: casts value to int
Closes #1894
2024-03-07 20:52:11 +01:00
naglis
1efb9d41db
doc/protocol.rst: clarify message event
...
The term "queue" is used in MPD to refer to the current playlist;
clarify that in this case it refers to the client's message queue.
2024-02-25 19:59:26 +01:00
naglis
9292b39cf5
doc/protocol.rst: document max number of subscriptions
2024-02-18 12:42:53 +02:00
Max Kellermann
9eb26ab90c
Merge branch 'countplaylist' of https://github.com/jcorporation/MPD
2024-02-15 11:28:11 +01:00
jcorporation
f801f299c9
New command playlistlength
...
Count the number of songs and their total playtime in the playlist.
2024-02-15 11:25:34 +01:00
Max Kellermann
7f18cae2e4
Merge branch 'skidoo23-patch-1' of https://github.com/skidoo23/MPD
2024-02-13 08:06:16 +01:00
jcorporation
a3794f8c3b
Allow range in listplaylist and listplaylistinfo
2024-02-08 21:26:28 +01:00
skidoo23
31a88e7ccc
Update Templates.cxx
...
Remove Spotify leftovers
2024-01-26 14:34:58 +01:00
skidoo23
4074e3a9e4
Update Option.hxx
2024-01-26 14:31:08 +01:00
Max Kellermann
c71e586c53
.readthedocs.yaml: install sphinx-rtd-theme
2024-01-19 10:31:50 +01:00
Max Kellermann
1039fb5582
.readthedocs.yaml: add
2024-01-19 10:22:36 +01:00
Max Kellermann
7f60acdfdd
util/CharUtil: add IsUpperAlphaNumericASCII()
2024-01-18 18:53:05 +01:00
Max Kellermann
aef2c5dc14
lib/avahi/Service: add field visible
...
Now individual services can be hidden or shown at any time.
2024-01-18 18:50:06 +01:00
Max Kellermann
8d02986b0e
lib/avahi/Publisher: add missing defer_register_services.Cancel() calls
2024-01-18 18:50:01 +01:00
Max Kellermann
461da92064
lib/avahi/Publisher: make the service list dynamic
...
This allows editing the list of services at any time instead of
passing a constant list at construction time. To do this, Service
instances are now caller-owned and managed in an IntrusiveList instead
of Publisher-owned in a std::forward_list.
2024-01-18 18:48:27 +01:00
Max Kellermann
b20b773189
zeroconf/avahi/Helper: embed the Avahi::Publisher without std::unique_ptr
2024-01-18 18:45:51 +01:00
Max Kellermann
74125c0922
test/meson.build: suppress compiler warnings in GTest headers
2024-01-18 18:42:56 +01:00
Max Kellermann
5023432802
lib/avahi/Publisher: use DeferEvent for RegisterServices()
...
Prepares making the service list dyammic; the DeferEvent not only
moves the operation out of the current stack frame, but also allows
combining several AddService() calls.
2024-01-18 18:24:08 +01:00
Max Kellermann
4a14248004
lib/avahi/Publisher: move code to RegisterServices(AvahiEntryGroup)
2024-01-18 18:24:04 +01:00
Max Kellermann
1b241fc97a
lib/avahi/Publisher: allow RegisterServices() to throw
2024-01-18 18:24:01 +01:00
Max Kellermann
09d1ab7abe
lib/avahi/Publisher: move try/catch in GroupCallback() to the top level
2024-01-18 18:23:57 +01:00
Max Kellermann
d28cb93835
lib/avahi/Client: add method IsConnected()
...
Publish only if the client is really connected.
2024-01-18 18:23:52 +01:00
Max Kellermann
6b43338e06
lib/avahi/Client: add assert()
2024-01-18 18:23:48 +01:00
Max Kellermann
9a7a49350c
lib/avahi/Client: free the AvahiClient on AVAHI_CLIENT_FAILURE
...
Previously the AvahiClient was only freed when AVAHI_ERR_DISCONNECTED
was detected, but all other error conditions would lead to a memory
leak.
2024-01-18 18:23:45 +01:00
Max Kellermann
f85629afa6
lib/avahi/Client: is if with initializer
2024-01-18 18:23:42 +01:00
Max Kellermann
a39473a912
lib/avahi/Service: add API docs
2024-01-18 18:23:37 +01:00
Max Kellermann
05d0e9b8bb
lib/avahi/Publisher: reuse the AvahiEntryGroup
...
The libavahi-client documentation recommends reusing AvahiEntryGroup
instances instead of freeing them and creating new ones.
2024-01-18 18:23:30 +01:00
Max Kellermann
b68c3b7f55
net/SocketDescriptor: disable msghdr methods on Windows
2024-01-18 15:44:44 +01:00
Max Kellermann
0fbed6dec1
net/SocketDescriptor: remove misplaced [[nodiscard]]
2024-01-18 15:44:43 +01:00
naglis
16af2a2998
CommandLine: fix typo
...
I believe this is a typo since all other sections have the form
"<Singular> plugins", e.g. "Encoder plugins".
2024-01-18 14:23:41 +02:00
Max Kellermann
7a40ac52a8
Merge branch 'bottombar' of https://github.com/DDRBoxman/MPD
2024-01-18 09:59:48 +01:00
Max Kellermann
6352d1b1ca
Merge branch 'sdkcheck' of https://github.com/DDRBoxman/MPD
2024-01-18 09:59:17 +01:00
Max Kellermann
c93fc161dc
Merge branch 'next_prev_fix' of https://github.com/DDRBoxman/MPD
2024-01-18 09:58:39 +01:00
Colin Edwards
5b7de2bc2f
android: Refactor settings UI into screens and add a bottom bar.
...
This puts Status, logs, and settings all on different tabs. This gives us plenty more room to work to improve these views going forward
2024-01-18 01:23:31 -06:00
Colin Edwards
04ba7eb987
android: Use build tools and SDK 34
...
The gradle config for the app is already compiling with the 34 SDK
so lets bump it for the bridge build too
2024-01-17 23:55:01 -06:00
Colin Edwards
5a2267bdb4
Android: Look for license to verify Android SDK folder
...
The `android` command was depricated and has been removed from new installs of the sdk
The license file existing is about all that is stable between different sdk versions and
cli vs Android studio installs
2024-01-17 23:46:17 -06:00
Colin Edwards
0075c57bd4
android: Check playlist state before changing track
...
Playlist will throw an exception if we call next or previous track when it is not in the "playing" state
2024-01-13 23:23:29 -06:00
Colin Edwards
87873c9a73
android: Support play / pause from media session
2024-01-13 23:15:56 -06:00
Max Kellermann
380e0abbe4
python/build/libs.py: fix libopenmpt source path
...
Fixes regression by commit ea23ea28ce
2024-01-13 22:51:07 +01:00
Max Kellermann
e4cc89b2d9
Merge branch 'jg' of https://github.com/neheb/MPD
2024-01-13 22:38:34 +01:00
Max Kellermann
14dea04ee9
test/util: use unsigned integer literals for -Wsign-compare
2024-01-13 22:33:23 +01:00
Max Kellermann
6f6cbeba80
net/SocketDescriptor: add Send()/Receive() overloads with iovec
2024-01-13 22:32:35 +01:00
Max Kellermann
974ed0166c
net/SocketDescriptor: add sendmsg(), recvmsg() wrappers
2024-01-13 22:31:58 +01:00
Max Kellermann
a91920a8ff
net/SocketDescriptor: pass span<byte> to Read()/Write()
2024-01-13 22:31:34 +01:00
Max Kellermann
7cd38dde09
net/SocketDescriptor: add [[nodiscard]]
2024-01-13 22:31:24 +01:00
Max Kellermann
b63a794fbe
io/FileDescriptor: add [[nodiscard]]
2024-01-13 22:31:16 +01:00
Max Kellermann
3e862b85d4
Merge branch 'mediasession' of https://github.com/DDRBoxman/MPD
2024-01-13 22:27:00 +01:00
Max Kellermann
85bca660d1
Merge branch 'update-failure-response-example' of https://github.com/naglis/MPD
2024-01-13 22:25:00 +01:00
Max Kellermann
87704f49c9
Merge branch 'NEWS-update' of https://github.com/mxjeff/MPD
2024-01-13 22:24:31 +01:00
Max Kellermann
9f9cbb8823
Merge branch 'logging' of https://github.com/DDRBoxman/MPD
2024-01-13 22:24:22 +01:00
kaliko
fa6ef6f1c7
Add NEWS entry about the switch to sphinx_rtd_theme
...
Change introduced in 6913148d99
2024-01-13 11:32:55 +01:00
naglis
db354f5e53
doc/protocol.rst: update failure response example
...
The commands in the example currently result in `ACK_ERROR_ARG`.
2024-01-10 21:03:26 +02:00
Max Kellermann
d3335f9947
db/simple: make more fields const
2024-01-08 13:55:15 +01:00
Max Kellermann
1a67062e1e
db/simple: reorder fields to reduce padding
2024-01-08 13:54:15 +01:00
Max Kellermann
fec1a4ac32
db/simple: pass hide_playlist_targets to sub-instance
2024-01-08 13:53:59 +01:00
Max Kellermann
7f439b01a3
net/SocketAddress: move code to IsInet()
2024-01-08 13:48:13 +01:00
Max Kellermann
0fd6f83766
net/StaticSocketAddress: add constexpr
2024-01-08 13:48:05 +01:00
Max Kellermann
b15b2125e2
net/AddressInfo: add methods IsInet(), IsTCP()
2024-01-08 13:47:59 +01:00
Colin Edwards
3711bd0d24
android: Implement basic media session handling for next and previous track
...
This starts a Media3 MediaSession when the service starts. A custom player class gets passed into that session to receive commands from other apps and the android os.
Currently we pad out some dummy items to make SimpleBasePlayer think we can do next and previous tracks.
MPD handles the threading for the native calls so we can just directly call the bridge from the player class.
2024-01-05 18:23:16 -06:00
Colin Edwards
e086f09d48
android: add next and previous track to the jni bridge
...
This will allow the android client to directly make calls to the mpd process to change tracks
I went with camel case on the function names here, if you use an underscore
javac generates a function tht looks like this:
JNIEXPORT void JNICALL Java_org_musicpd_Bridge_play_1previous
I figured what we ended up with looks a little nicer:
JNIEXPORT void JNICALL Java_org_musicpd_Bridge_playPrevious
2024-01-05 18:21:46 -06:00
Colin Edwards
324bd95c91
android: Move logging into it's own repository class.
...
Logs will be maintained and appended even when the main UI is not bound to the service.
This also lets us log without filling a Handler with a bunch of messages we might just throw away anyway.
2024-01-04 17:44:49 -06:00
Colin Edwards
5d122c3bc8
android: Add dependencies and new application class for dagger / hilt support
...
Dagger and hilt give us dependency injection which makes it easier to split up parts of the app. This lets us easily split out things like logging and paves the way to migrate off preferences to DataStore
This also remove the process name on the service to pull eveything into one process so we don't have to do IPC to pass logs around. This lets us use the same instances of injected classes between the UI and the service side.
2024-01-04 17:44:43 -06:00
Rosen Penev
8e123e7fc9
test: archive: fix compilation with Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:25 -08:00
Rosen Penev
e8163124e3
mpg123: fix compilation under Windows
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:25 -08:00
Rosen Penev
0651be8366
fluidsynth: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:25 -08:00
Rosen Penev
4957035be6
mikmod: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:25 -08:00
Rosen Penev
bcd55c0b75
sidplay: fix compilation under Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:25 -08:00
Rosen Penev
914ee92015
wavpack: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:25 -08:00
Rosen Penev
fb9194b537
tests: fix ChromaPrint test on Windows
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 14:22:24 -08:00
Max Kellermann
c04490bd52
storage/curl: eliminate std::strings, parse string_view directly
2024-01-04 21:11:07 +01:00
Max Kellermann
b601f4dc15
util/CNumberParser: remove unused function ParseInt64()
2024-01-04 21:07:50 +01:00
Max Kellermann
4086190c80
decoder/OpusTags: use ParseInteger()
2024-01-04 21:06:38 +01:00
Max Kellermann
e1eea9d98a
util/NumberParser: new library based on std::from_chars()
2024-01-04 21:03:37 +01:00
Max Kellermann
393d57b387
util/NumberParser: rename to CNumberParser
...
A new NumberParser library based on std::from_chars() will be added.
2024-01-04 21:02:45 +01:00
Max Kellermann
b283fe07af
lib/expat/ExpatParser: pass std::string_view to CharacterData()
2024-01-04 20:55:14 +01:00
Max Kellermann
feeb21577f
lib/upnp/Device: use std::forward_list instead of std::vector
2024-01-04 20:51:20 +01:00
Max Kellermann
1fca16737d
lib/upnp/Device: remove unnecessary ctors/dtors
2024-01-04 20:49:27 +01:00
Max Kellermann
4ec85a12e3
lib/upnp/Discovery: use std::map instead of std::list
2024-01-04 20:45:24 +01:00
Max Kellermann
3d2aebccad
lib/upnp/Discovery: pass std::string_view to LockRemove()
2024-01-04 20:40:47 +01:00
Max Kellermann
22382f799c
lib/upnp/Discovery: add noexcept
2024-01-04 20:39:21 +01:00
Max Kellermann
468eceabff
lib/upnp/Discovery: remove unreachable exception handler
2024-01-04 18:04:46 +01:00
Max Kellermann
08e0eb79f5
lib/upnp/Discovery: remove unused default ctor
2024-01-04 18:04:21 +01:00
Max Kellermann
8b03ce562c
input/curl: increase CURLOPT_BUFFERSIZE from 16 kB to 512 kB
2024-01-04 17:57:42 +01:00
Max Kellermann
997311ba14
lib/curl/Easy: add method TrySetOption()
2024-01-04 17:51:48 +01:00
Max Kellermann
cbd031ca7f
lib/upnp/Action: common UpnpSendAction() wrapper for pupnp and npupnp
...
Merge a lot of duplicate code.
2024-01-04 17:40:59 +01:00
Max Kellermann
95842e7984
db/upnp: eliminate the std::forward_list, use IterableSplitString()
2024-01-04 16:31:28 +01:00
Max Kellermann
cc41e95806
db/upnp: add rootid_sv
2024-01-04 16:20:44 +01:00
Max Kellermann
2c77e088b4
db/upnp: eliminate temporary std::string from Visit()
2024-01-04 16:19:03 +01:00
Max Kellermann
4eefc2e47c
test/DumpDatabase: add "URI" parameter
2024-01-04 15:37:10 +01:00
Max Kellermann
7c13666226
test/DumpDatabase: remove the "PLUGIN" parameter, load from config file
2024-01-04 15:36:18 +01:00
Max Kellermann
4ed8313954
test/DumpDatabase: use libfmt
2024-01-04 15:32:26 +01:00
Max Kellermann
c8e2ab6781
db/upnp/Object: smaller enums
2024-01-04 14:31:41 +01:00
Max Kellermann
b2ed29b8c0
lib/upnp/ContentDirectoryService: getFriendlyName() returns std::string reference
...
This can avoid the overhead of casting a C string back to std::string_view.
2024-01-04 14:28:12 +01:00
Max Kellermann
1789b56a85
db/upnp: pass std::string_view to songPath()
2024-01-04 14:28:12 +01:00
Max Kellermann
714dbc9294
lib/upnp/Discovery: forward-declare inner class ContentDirectoryDescriptor
2024-01-04 14:28:12 +01:00
Max Kellermann
f40eb963fd
lib/upnp/Discovery: forward-declare inner class Downloader
2024-01-04 14:28:12 +01:00
Max Kellermann
ee4b49d12f
lib/expat/ExpatParser: pass std::string_view to Parse()
2024-01-04 14:28:12 +01:00
Max Kellermann
4c9942534c
lib/upnp/Device: pass url as std::string_view to Parse()
2024-01-04 14:28:12 +01:00
Max Kellermann
d5f7db59a8
lib/upnp/Util: pass std::string_view to path_getfather()
2024-01-04 14:28:12 +01:00
Max Kellermann
8d1b73ae89
lib/upnp/Discovery: use string_view::starts_with() instead of strncmp()
2024-01-04 14:28:08 +01:00
Rosen Penev
afa77099cf
msys2 CI
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 12:49:43 +01:00
Rosen Penev
f68fab53a7
zzip: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 12:38:36 +01:00
Rosen Penev
6a4dc281d1
bzip2: fix compilation on Windows
...
NarrowPath is needed.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-04 12:38:30 +01:00
Max Kellermann
26831a417a
subproject: update expat to 2.5.0-4
2024-01-04 09:49:10 +01:00
Max Kellermann
6293818c35
subproject: update fmt to 10.2.0-1
2024-01-04 09:49:09 +01:00
Rosen Penev
a859de6806
sndfile: fix compilation with clang's libc++
...
error: non-constant-expression cannot be narrowed from type 'sf_count_t'
(aka 'long long') to 'size_type' (aka 'unsigned int') in initializer list
[-Wc++11-narrowing]
215 | std::span{buffer, num_frames * frame_size},
| ^~~~~~~~~~~~~~~~~~~~~~~
note: insert an explicit cast to silence this issue
215 | std::span{buffer, num_frames * frame_size},
| ^~~~~~~~~~~~~~~~~~~~~~~
| static_cast<size_type>()
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2024-01-03 12:18:52 -08:00
Rosen Penev
13202bfce4
test: neighbor_explorer: fix compilation on WIN32
...
Need NarrowPath. Matches what is done in other tests.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2023-12-31 15:38:49 -08:00
Rosen Penev
f3d031b38a
libnpupnp: update subproject
...
Fixes compilation under Windows.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2023-12-31 13:58:10 -08:00
Rosen Penev
f6dbf38e99
upnp: change interface variable name
...
rpc.h under Windows defines interface as struct, which blows up the
build here. Rename to avoid.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2023-12-28 19:39:05 -08:00
Max Kellermann
d0a4270449
lib/upnp/Compat: remove obsolete kludges
...
Those bugs have been fixed looong ago.
2023-12-28 21:24:58 +01:00
Max Kellermann
b9a7a9981e
lib/upnp/ContentDirectoryService: remove unused fields
2023-12-28 21:22:41 +01:00
Max Kellermann
d9fb152b95
lib/upnp/ContentDirectoryService: include some headers only with libpupnp
2023-12-28 21:18:41 +01:00
Max Kellermann
09a0f7a45c
Merge branch 'android_fix' of https://github.com/DDRBoxman/MPD
2023-12-28 21:02:49 +01:00
Max Kellermann
9396ffb509
db/plugins/upnp/ContentDirectoryService: add missing closing curly brace
2023-12-28 20:52:53 +01:00
Max Kellermann
66a8afd18c
subprojects: add libnpupnp
2023-12-28 20:51:13 +01:00
Rosen Penev
e7e07c39c5
meson: fix flac_dep under Windows
...
declare_dependency's found() method evaluates to true always, resulting
in MPD trying to build flac when not found. Check for dependency()'s
find() first.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2023-12-27 12:43:08 -08:00
Colin Edwards
201e081750
android: Fix boot receiver settings and intent check
2023-12-27 13:38:38 -06:00
Colin Edwards
5f7f1d738d
android: set kotlin target to 9
...
The naming scheme was changed in kotlin but not java after java 8
2023-12-27 13:34:37 -06:00
Colin Edwards
8a3d144714
android: Set kotlin jvm target to 1.9
2023-12-27 13:27:02 -06:00
Rosen Penev
44080154b0
no setenv on Windows
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2023-12-27 10:50:00 -08:00
Max Kellermann
c17493f2d3
Merge branch 'fs' of https://github.com/neheb/MPD
2023-12-27 12:38:30 +01:00
Max Kellermann
dcfc1ca6a0
Merge branch 'doc-time-case' of https://github.com/naglis/MPD
2023-12-27 12:37:58 +01:00
Max Kellermann
07e1bae0af
Merge branch 'doc-config-comments' of https://github.com/naglis/MPD
2023-12-27 12:35:32 +01:00
Max Kellermann
658a7f1ca7
Merge branch 'material' of https://github.com/DDRBoxman/MPD
2023-12-27 12:35:13 +01:00
Max Kellermann
bd408cd627
Merge branch 'bootfix' of https://github.com/DDRBoxman/MPD
2023-12-27 12:33:14 +01:00
Rosen Penev
7c520f6475
fs: fix typo
...
Wrong macro used.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2023-12-26 10:57:44 -08:00
naglis
07ee11b963
doc/protocol.rst: fix time tag case
...
The `Time` song tag starts with an uppercase letter.
2023-12-26 10:51:34 +02:00
Colin Edwards
a4c7041561
subprojects: properly export id3tag include headers
...
According to the Makefile.am from libid3 only i3dtag.h should be installed to the include directory.
include_HEADERS = id3tag.h
2023-12-24 11:31:29 -06:00
naglis
d7eb223343
doc: mention config file comment syntax
2023-12-23 09:33:01 +02:00
Colin Edwards
ddc048e2c3
android: Move settings to compose and material UI 3
...
This changes lets us use the latest UI design from Google, Material 3.
Google only provides the material UI 3 themes for compose, compose only works with kotlin.
2023-12-22 23:04:51 -06:00
Colin Edwards
625ab6decd
android: Move preferences class out of settings
2023-12-22 22:51:14 -06:00
Colin Edwards
2638396df5
android: add dependencies for Material 3 and Compose
2023-12-22 13:30:43 -06:00
Colin Edwards
3d8e285e2b
android: Fix launching on device boot
2023-12-22 12:30:45 -06:00
Colin Edwards
793a12d58d
android: Use Java 9
2023-12-22 12:30:27 -06:00
Max Kellermann
23b4688c44
util/ByteOrder: move Packed* classes to separate headers
2023-12-22 18:20:46 +01:00
Max Kellermann
c4d8888972
subprojects: add id3tag
2023-12-22 18:15:25 +01:00
Max Kellermann
6e50031c49
python/build/libs.py: remove libmad (unused)
2023-12-22 18:05:40 +01:00
Max Kellermann
833ca1e350
test/dump_rva2: fix TCHAR/char confusion on Windows
2023-12-22 18:05:40 +01:00
Max Kellermann
a888b3a707
decoder/plugins/meson.build: add missing dependency to libid3tag
2023-12-22 18:03:47 +01:00
Max Kellermann
d9bbe39f48
android/include/meson.build: remove custom "-I" flag
...
This is not necessary because the declared dependency is enough for
Meson to generate the "-I" flag automatically.
2023-12-22 17:07:50 +01:00
Max Kellermann
38226dfe81
android/include/meson.build: generate *.class in @PRIVATE_DIR@
...
We're not interested in the *.class files, we run javac only to
generate the JNI header. By using @PRIVATE_DIR@, it gets stored to a
directory we can ignore, and not into the source tree.
2023-12-22 16:46:25 +01:00
Max Kellermann
94ef1e13e0
android/include/meson.build: call javac directly, eliminate run-javac.sh
2023-12-22 16:41:35 +01:00
Max Kellermann
35c7c005ba
android/meson.build: move target org_musicpd_Bridge.h to include/meson.build
2023-12-22 16:39:13 +01:00
Max Kellermann
1e732f9b9b
android/run-javac.sh: remove unnecessary realpath call
2023-12-22 16:35:06 +01:00
Max Kellermann
ee5c471280
android/meson.build: pass @OUTDIR@ to run-javac.sh
2023-12-22 16:32:10 +01:00
Max Kellermann
8ef47147a0
.github/workflows/build_android.yml: do not ignore "python"
...
Python scripts are used to build Android.
2023-12-22 15:17:47 +01:00
Max Kellermann
fb4dd4e1ce
.github/workflows/build_android.yml: remove branch v0.23.x
...
This branch cannot be built this way.
2023-12-22 15:17:45 +01:00
Max Kellermann
a19f3a4f9f
python/build/meson.py: put ccache prefix in array instead of stripping it
...
Turns out Meson disables ccache auto-detection when a cross-file is
used. To use ccache, the ccache prefix must be expressed in an array
instead of a single string with spaces.
2023-12-22 15:11:53 +01:00
Max Kellermann
c3ba52a1fc
python/build/toolchain.py: auto-detect ccache
2023-12-22 15:05:41 +01:00
Max Kellermann
1b2bd0cc0a
.github/workflows/build_android.yml: use preinstalled Android SDK/NDK
2023-12-22 14:39:20 +01:00
Max Kellermann
dd3779d64b
.github/workflows/build_android.yml: use preinstalled Java
2023-12-22 14:39:20 +01:00
Max Kellermann
806d1483a8
.github/workflows/build_android.yml: install Meson 1.3.0
...
We need at least 0.63.0 for "diff_files" support in subprojects;
without this, the Opus build breaks.
2023-12-22 14:39:20 +01:00
borine
b1f28d6003
output/alsa: Fix (theoretical error in) ALSA device recovery
...
It is not possible to prepare an ALSA device when it is is state
SND_PCM_STATE_OPEN; it is necessary to set the hardware parameters
first.
This pedantic commit corrects that error. Note that in practice
this code path cannot be encountered because MPD always sets the
hardware parameters before attempting to start playback.
2023-12-22 12:02:33 +00:00
borine
50e6950fa8
output/alsa: handle recoverable errors in DrainInternal()
...
It is possible that an underrun may occur in the ALSA output
device while MPD is draining its own internal buffer. If this
happens then MPD stops playback, reporting the error EPIPE.
This commit attempts to recover the ALSA device instead of
stopping playback, so that the drain can complete and the next
song in the play queue is played.
2023-12-22 11:53:20 +00:00
Max Kellermann
1d60d3cd2b
subprojects: update libmpdclient to 2.22
...
2.22 fixes the "version.h" conflict.
Closes https://github.com/MusicPlayerDaemon/MPD/pull/1927
2023-12-22 12:08:02 +01:00
Max Kellermann
59ed18e112
Merge branch 'android_network_address' of https://github.com/DDRBoxman/MPD
2023-12-22 10:26:36 +01:00
Colin Edwards
c4c1044427
android: Add a text field to display the devices network address
2023-12-21 11:50:10 -06:00
Max Kellermann
791b3c65f3
python/build/meson: bringt back configure()
...
This reverts part of commit a3765cd363 .
The MesonProject class was not used, but the "configure" function.
2023-12-21 12:02:05 +01:00
Max Kellermann
a3765cd363
python/build: remove Meson project support
...
Obsolete, we're now using Meson subprojects.
2023-12-21 11:50:33 +01:00
Max Kellermann
3c5b864396
tag/IcyMetadataParser: use std::span
2023-12-21 08:42:23 +01:00
Colin Edwards
b09654b53a
build: Remove absolute path on pkg-config
...
This allows it to be found on macOS and should fix linking libnfs with builds of the Android app
2023-12-20 23:23:18 -06:00
Max Kellermann
58fc857a2d
tag/IcyMetadataParser: pass std::string_view to icy_parse_tag()
2023-12-20 20:18:39 +01:00
Max Kellermann
e443ee357a
tag/IcyMetadataParser: do not null-terminate strings in icy_parse_tag()
...
Just pass std::string_views into the unmodified buffer to
icy_parse_tag_item().
2023-12-20 19:58:35 +01:00
Max Kellermann
2618294eb7
tag/IcyMetadataParser: pass std::string_view to icy_parse_tag_item()
2023-12-20 19:51:22 +01:00
Max Kellermann
03352cb4ad
tag/IcyMetadataParser: use std::byte in ParseInPlace()
2023-12-20 19:49:08 +01:00
Max Kellermann
2c851498cc
meson.build: do not leak CPP macros to subprojects
2023-12-20 17:49:13 +01:00
Max Kellermann
a52292ae17
subprojects: update sqlite to 3.44.2-1
2023-12-20 17:34:05 +01:00
Max Kellermann
f6a886f092
subprojects: update curl to 8.5.0-2
2023-12-20 17:33:28 +01:00
Max Kellermann
6234ae5a8b
doc/user.rst: do not name the deprecated /var/run/ directory
2023-12-20 17:32:13 +01:00
Max Kellermann
a4ead670ed
subprojects: add libmpdclient wrap
2023-12-20 17:15:29 +01:00
Max Kellermann
303d981099
subprojects: add lame
2023-12-20 16:50:13 +01:00
Max Kellermann
7727311df7
meson.build: disable "openssl:asm"
...
Work around "call to undeclared function "asm" on Android.
2023-12-20 16:30:16 +01:00
Max Kellermann
5f54a8e94e
Merge tag 'v0.23.15'
...
release v0.23.15
2023-12-20 16:23:58 +01:00
Max Kellermann
b8bfc98618
release v0.23.15
2023-12-20 16:21:57 +01:00
Max Kellermann
6e6f72a521
win32/HResult: convert assert() to runtime check to work around -Walloc-size-larger-than
2023-12-20 16:15:58 +01:00
Max Kellermann
a654c5d643
Revert "android: Fix MPD shutdown from settings UI"
...
This reverts commit 94b5b9f370 . It was
not necessary for branch v0.23.x because there, Break() is
thread-safe; this was only changed later by commit
a3b32819b1
2023-12-20 16:15:58 +01:00
Max Kellermann
c5d6aa169f
lib/curl/patches: refresh no_CMAKE_C_IMPLICIT_LINK_LIBRARIES.patch for 7.85.0
2023-12-20 13:43:20 +01:00
Max Kellermann
c1c67286d3
python/build/libs.py: update CURL to 8.5.0
2023-12-20 13:28:54 +01:00
borine
2fb34697c7
input/plugins/Alsa: catch all exceptions
...
snd_pcm_poll_descriptors_revents() may return any error code; the
ALSA docs do not constrain the permitted values. A 'hw' device
will only ever return an error if the pfd array passed in is
invalid (-EINVAL), but other I/O plugins may return arbitary
errors. For example a network-based device may return -EPIPE etc.
The resulting exception thrown by
AlsaNonBlockPcm::DispatchSockets() must be caught to prevent the
mpd process from being aborted.
2023-12-20 13:27:25 +01:00
Colin Edwards
94b5b9f370
android: Fix MPD shutdown from settings UI
2023-12-20 13:27:16 +01:00
Max Kellermann
a9467513e1
doc/developer.rst: add missing return type to code style sample
2023-12-20 13:26:48 +01:00
borine
17d944f6ce
input/plugins/Alsa: limit ALSA buffer time to 2 seconds maximum
...
Some ALSA capture devices can have very large buffers, holding 10
seconds or more audio. Using the maximum buffer size with such
devices leads to unacceptably large, and unnecessary, latency.
Also, some ALSA drivers (e.g. HDA Intel PCH) report an invalid
maximum period size, and the period size that mpd calculates from
the maximum buffer size results in "Invalid argument" error when
applying the hw_params. Note that the "default" capture device on
many cards includes the "dsnoop" plugin which imposes a buffer
size of 16384 frames, so that "alsa://" works OK but
"alsa://plughw" or "alsa://hw" both fail.
Limit the maximum buffer time for ALSA input devices to a more useable
2 seconds, thereby avoiding both the above problems.
2023-12-20 13:26:24 +01:00
Max Kellermann
0f82f18652
python/build/libs.py: update CURL to 8.4.0
2023-12-20 13:25:08 +01:00
Max Kellermann
3db3e577f1
python/build/libs.py: update OpenSSL to 3.1.4
2023-12-20 13:25:04 +01:00
Max Kellermann
37ee821947
python/build/libs.py: update FFmpeg to 6.1
2023-12-20 13:25:00 +01:00
Max Kellermann
916ab9a7e6
python/build/libs.py: update openmpt to 0.7.3
2023-12-20 13:24:57 +01:00
Max Kellermann
1802cf9fd1
python/build/cmake.py: add CMAKE_FIND_ROOT_PATH on Windows
...
Works around CURL build failure because cmake insists on using
/usr/include/zlib.h.
2023-12-20 13:24:53 +01:00
Max Kellermann
1bf7d30623
subprojects: update fmt to 10.1.1-1
2023-12-20 13:24:14 +01:00
naglis
b2d89253a6
doc/protocol.rst: mention song id lifetime
2023-12-20 13:23:03 +01:00
Max Kellermann
7727630f24
Merge branch 'alsa_input_exception' of https://github.com/borine/MPD
2023-12-20 13:21:37 +01:00
Max Kellermann
e2f8c9a4c2
Merge branch 'android_action' of https://github.com/DDRBoxman/MPD
2023-12-20 10:55:44 +01:00
Max Kellermann
22dbfec126
Merge branch 'android_shutdown' of https://github.com/DDRBoxman/MPD
2023-12-20 10:54:35 +01:00
Max Kellermann
efc462eebf
Merge branch 'doc-features' of https://github.com/mxjeff/MPD
2023-12-20 10:53:34 +01:00
Max Kellermann
c3883e2fe0
Merge pull request #1911 from MusicPlayerDaemon/dependabot/github_actions/actions/setup-python-5
...
build(deps): bump actions/setup-python from 4 to 5
2023-12-20 10:53:16 +01:00
Colin Edwards
16c91a3f4b
android: Fix MPD shutdown from settings UI
2023-12-19 22:05:03 -06:00
Colin Edwards
80bb5a0542
android: Add github action
...
This lives under a separate workflow so it can have different ignore paths.
2023-12-19 17:25:25 -06:00
Colin Edwards
906d58a918
android: migrate app build system to use gradle
...
Most of the Android specific meson code has been removed and replaced with
the grade build system.
The new meson build scripts build and move the libmpd.so binaries into the correct
location that gradle expects. After than gradle handles building the rest of the Android app.
Icons and banners have been updated for the modern app packaging expectations.
For reference here was the figma template Google provides that I used to back the png versions
for older versions of Android <https://www.figma.com/community/file/1283953738855070149 >
2023-12-17 22:38:34 -06:00
kaliko
23b34fe142
Document new added-since filter introduced in 1615fbc
2023-12-17 10:00:19 +01:00
Colin Edwards
8d6f503e04
android: require NDK r26b
...
This fixes `no member named 'invocable' in namespace 'std'`
2023-12-13 12:01:30 -06:00
Colin Edwards
3284a61f43
android: build with java 8 target
...
The latest Android `sdkmanager` tool requires a version of the jdk that no longer
supports Java 7 as a target
2023-12-13 11:50:21 -06:00
Colin Edwards
c1a852d0e8
android: Pick toolchain based on current OS
2023-12-13 11:48:22 -06:00
Colin Edwards
4c90ad3704
android: realdir doesn't accept nonexistant files on macOS
2023-12-13 11:47:18 -06:00
Colin Edwards
a92a801f08
android: List additional build dependencies in instructions
2023-12-13 10:38:51 -06:00
Colin Edwards
9059c6c657
android: find apksigner in build tools folder
2023-12-13 10:35:52 -06:00
dependabot[bot]
bd6f8cd585
build(deps): bump actions/setup-python from 4 to 5
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v4...v5 )
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-12-11 15:18:48 +00:00
Max Kellermann
a6024f476a
subprojects: add openssl
2023-12-11 11:01:32 +01:00
Max Kellermann
dfef30a737
subprojects: add curl
2023-12-11 10:53:43 +01:00
Max Kellermann
55ca3709ef
subprojects: add ogg, flac, opus
2023-12-11 10:53:43 +01:00
Max Kellermann
ab6ae7520d
doc/developer.rst: add missing return type to code style sample
2023-12-10 08:24:05 +01:00
Max Kellermann
c7a300d12d
meson.build: static liburing wrap build
2023-12-09 21:00:18 +01:00
Max Kellermann
babf322695
subprojects: update liburing to 2.4-2
2023-12-09 20:55:13 +01:00
Max Kellermann
642de1510b
lib/curl/Request: remove redundant CurlEasy wrapper methods
2023-12-09 20:54:21 +01:00
borine
f61eed1a82
input/plugins/Alsa: catch all exceptions
...
snd_pcm_poll_descriptors_revents() may return any error code; the
ALSA docs do not constrain the permitted values. A 'hw' device
will only ever return an error if the pfd array passed in is
invalid (-EINVAL), but other I/O plugins may return arbitary
errors. For example a network-based device may return -EPIPE etc.
The resulting exception thrown by
AlsaNonBlockPcm::DispatchSockets() must be caught to prevent the
mpd process from being aborted.
2023-11-26 15:36:42 +00:00
Max Kellermann
e9c40dead8
output/SharedPipeConsumer: add noexcept
2023-11-26 08:48:45 +01:00
Max Kellermann
31bf6d29b9
BulkEdit: forbid copying
2023-11-26 08:47:06 +01:00
Max Kellermann
571b6f0cdb
queue/IdTable: add constexpr (because we can)
2023-11-26 08:43:50 +01:00
Max Kellermann
e7b9e8de14
queue/IdTable: add API docs
2023-11-26 08:43:20 +01:00
Max Kellermann
321553d5f9
queue/IdTable: add explicit
2023-11-26 08:41:57 +01:00
Max Kellermann
4d23068c5c
queue/IdTable: use C++11 initializer
2023-11-26 08:41:19 +01:00
Max Kellermann
634b38169a
Merge branch 'alsa_input_buffer' of https://github.com/borine/MPD
2023-11-26 08:24:51 +01:00
Max Kellermann
fe4695f92a
Merge branch 'added_time_proxy_plugin' of https://github.com/jcorporation/MPD
2023-11-26 08:20:18 +01:00
Max Kellermann
3c7941b24b
Instance: work around -Wunused-parameter
2023-11-26 08:13:57 +01:00
Max Kellermann
a5d7f5e1fa
client/Client: add interface IClient
...
This allows detangling dependencies and fixes a linker problem in
test/test_translate_song.cxx.
2023-11-26 08:11:06 +01:00
Max Kellermann
0dfd7e3d8c
net/SocketDescriptor: SO_PROTOCOL is really Linux-specific
2023-11-25 23:03:30 +01:00
Max Kellermann
f757dfdc4f
SongLoader: add noexcept
2023-11-25 22:57:24 +01:00
Max Kellermann
eb675ad1b1
pcm/meson.build: add missing dependency on libconfig.a
2023-11-25 22:51:43 +01:00
Max Kellermann
08a5768764
fs/io/TextFile: split into class FileLineReader and AutoGunzipFileLineReader
...
Detangle dependencies.
2023-11-25 22:50:32 +01:00
Max Kellermann
d888bb1902
io/meson.build: move libfmt dependency to libio.a
2023-11-25 22:16:47 +01:00
Max Kellermann
6dc708f53f
net/SocketDescriptor: use method GetOption() internally
2023-11-25 21:58:17 +01:00
Max Kellermann
60033f3eb4
net/SocketDescriptor: add method GetProtocol()
2023-11-25 21:58:09 +01:00
Max Kellermann
1239e075b8
net/SocketDescriptor: add method GetIntOption()
2023-11-25 21:56:07 +01:00
Max Kellermann
85286d74ef
python/build/libs.py: update CURL to 8.4.0
2023-11-25 21:52:41 +01:00
Max Kellermann
f8f646497c
python/build/libs.py: update OpenSSL to 3.1.4
2023-11-25 21:52:41 +01:00
Max Kellermann
24ace6da25
python/build/libs.py: update FFmpeg to 6.1
2023-11-25 21:52:41 +01:00
Max Kellermann
ea23ea28ce
python/build/libs.py: update openmpt to 0.7.3
2023-11-25 21:52:41 +01:00
Max Kellermann
4072a6e445
python/build/cmake.py: add CMAKE_FIND_ROOT_PATH on Windows
...
Works around CURL build failure because cmake insists on using
/usr/include/zlib.h.
2023-11-25 21:52:41 +01:00
Max Kellermann
54601b292a
subprojects: update liburing to 2.4-1
2023-11-25 21:52:41 +01:00
Max Kellermann
964e193fcd
subprojects: update sqlite to 3.44.1-1
2023-11-25 21:52:41 +01:00
Max Kellermann
d5909b6d5d
subprojects: update expat to 2.5.0-3
2023-11-25 20:47:43 +01:00
Max Kellermann
67a00ee541
subprojects: update fmt to 10.1.1-1
2023-11-25 20:47:11 +01:00
Max Kellermann
d0eea87b1a
song/*SongFilter: use libfmt
2023-11-25 20:42:50 +01:00
Max Kellermann
273fc329e0
Merge branch 'added-since' of https://github.com/jcorporation/MPD
2023-11-25 20:36:38 +01:00
Max Kellermann
d85be95c30
Merge branch 'doc-mention-song-id-lifetime' of https://github.com/naglis/MPD
2023-11-25 20:34:40 +01:00
kaliko
ff60cf8a4c
Document new added attribute introduced in 7bf43a97
2023-11-25 14:40:03 +01:00
Max Kellermann
b9daeef524
event/FineTimerEvent: add SetDue(), ScheduleCurrent()
2023-11-21 20:47:29 +01:00
Max Kellermann
9383ceac30
event/{Coarse,Fine}TimerEvent: add API docs
2023-11-21 20:47:25 +01:00
Max Kellermann
3d2bd08132
test/meson.build: eliminate variable gtest_main_dep
2023-11-21 20:46:10 +01:00
Max Kellermann
1259fdc2e3
test/meson.build: re-enable various compiler warnings with GTest
2023-11-21 20:46:10 +01:00
Max Kellermann
a564b7eedb
test/test_translate_song: remove unused Log() symbol
2023-11-21 20:46:10 +01:00
Max Kellermann
ebf1fc7ca4
util/IntrusiveList: convert static_assert to concept check
2023-11-21 20:42:01 +01:00
Max Kellermann
73708e7be7
event/TimerEvent: remove transitional header
2023-11-21 20:41:55 +01:00
Max Kellermann
0c409aa290
input/LastInputStream: use CoarseTimerEvent
2023-11-21 20:41:47 +01:00
Max Kellermann
edfa329e64
util/DereferenceIterator: use *declval() to guess the default value type
...
This allows the iterator to point to another iterator.
2023-11-21 20:40:47 +01:00
Max Kellermann
5ab2c31500
Merge branch 'v0.23.x'
2023-11-21 20:37:46 +01:00
skidoo23
50c1e3738a
decoder/ffmpeg: Fix build error with ffmpeg 6.1
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1898
2023-11-21 20:36:37 +01:00
Max Kellermann
7a939746ae
increment version number to 0.23.15
2023-11-21 20:32:45 +01:00
naglis
ce178c7e1f
doc/protocol.rst: mention song id lifetime
2023-11-16 22:58:07 +02:00
jcorporation
1615fbc30e
Add "added-since" filter expression
2023-11-04 17:25:24 +01:00
jcorporation
45a4fcab1e
Add support for added attribute to proxy plugin
2023-11-02 21:22:48 +01:00
Max Kellermann
68b19ae087
util/SpanCast: add ReferenceAsWritableBytes()
2023-11-02 10:50:24 +01:00
Max Kellermann
a073db1e52
util/SpanCast: add ReferenceAsBytes()
2023-11-02 10:50:00 +01:00
Max Kellermann
10940da381
util/Intrusive{List,HashSet}: add "tag" for base hooks
2023-11-02 10:48:46 +01:00
Max Kellermann
57d9cffc42
event/PipeEvent: expose the EventPollBackendEvents constants
2023-11-02 10:48:21 +01:00
Max Kellermann
65a3062f45
Merge branch 'configure-systemd-units-based-on-build-options' of https://github.com/naglis/MPD
2023-11-02 10:43:02 +01:00
Max Kellermann
ac25f3456a
Merge branch 'added_time' of https://github.com/jcorporation/MPD
2023-11-02 10:42:31 +01:00
jcorporation
f4f79a3d5f
New command "stickernames" lists uniq and sorted sticker names
2023-10-21 18:21:03 +02:00
jcorporation
7bf43a9712
Add "added" timestamp to song database
...
- added is set to current time, if a new song is added to the database.
- GetAdded falls back to mtime.
Code for proxy plugin is missing, this needs a patch for libmpdclient.
closes #378
2023-10-20 17:29:31 +02:00
Nick Steel
97da29cc90
Stickers: fix documentation typos
2023-10-16 14:25:58 +01:00
Max Kellermann
de1da485ab
LICENSES: add all licenses referred to by SPDX headers
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1877
2023-10-15 11:39:08 +02:00
Max Kellermann
2b10cf3c15
pcm/Normalizer: change license identifier to LGPL-2.1-only
...
"LGPL-2.1" doesn't exist, and the old copyright header did not specify
the "or later" clause, so I must assume it's 2.1 only.
2023-10-15 11:37:21 +02:00
gd
432675d4c2
Stickers: added support for stickers on playlists and some tag types
2023-10-15 11:25:16 +02:00
Max Kellermann
70ac638d93
tag/Mask: make everything constexpr
2023-10-15 11:03:56 +02:00
Max Kellermann
ccbacb369b
io/linux/ProcPath: new library
2023-10-15 10:55:32 +02:00
Max Kellermann
7c0b561a16
event/InotifyEvent: add method TryAddWatch()
2023-10-15 10:51:06 +02:00
Max Kellermann
db5f270f42
util/AllocatedString: fix string_view specialization in TotalSize()
2023-10-09 14:54:40 +02:00
Max Kellermann
3a86956257
Merge tag 'v0.23.14'
...
release v0.23.14
2023-10-08 10:12:34 +02:00
Max Kellermann
feac1a3f56
release v0.23.14
2023-10-08 10:11:05 +02:00
Max Kellermann
f49d4ef4ad
tag/Mask: switch to 64 bit because have we 34 tags now and 32 bits are not enough
2023-10-08 10:02:50 +02:00
Max Kellermann
2859845567
Merge branch 'v0.23.x'
2023-10-08 10:02:19 +02:00
Max Kellermann
f3c37e484e
tag/Mask: add static_assert on the size of the mask
2023-10-08 10:01:00 +02:00
Max Kellermann
e521b58b01
io/PeekReader: fix offset/size mixup
...
Regression by commit 7ccc4ddf0d
2023-10-08 09:55:59 +02:00
Max Kellermann
34182990ef
fs/FileInfo: add fstat() wrapper
2023-10-07 12:49:07 +02:00
Max Kellermann
1ca5d6baa6
io/FileReader: do not copy the path
2023-10-07 12:48:03 +02:00
Max Kellermann
9365f68454
io/FileReader: use GetFileInfoByHandle()
2023-10-07 12:47:57 +02:00
Max Kellermann
7b5f107341
fs/FileInfo: add GetFileInformationByHandleEx() wrapper
2023-10-07 12:37:49 +02:00
Max Kellermann
e9ec03f769
PlaylistFile: use uint_least64_t
2023-10-07 12:29:14 +02:00
Max Kellermann
579a6ee299
fs/FileInfo: un-inline the constructor to reduce header dependencies
2023-10-07 12:28:31 +02:00
Max Kellermann
7d31659137
PlaylistFile: add missing include
2023-10-07 12:28:31 +02:00
Max Kellermann
f549c611ab
fs/FileInfo: make constructor explicit
2023-10-07 12:24:05 +02:00
Max Kellermann
51c0a03e94
fs/FileInfo: add constexpr and noexcept
2023-10-07 12:22:54 +02:00
Max Kellermann
19c73680cf
io/FileReader: use uint_least64_t
2023-10-07 08:49:04 +02:00
Max Kellermann
a9ba9a5f92
io/Reader: add [[nodiscard]]
2023-10-07 08:45:59 +02:00
Max Kellermann
3032792563
io/Reader: add method ReadFull()
2023-10-07 08:45:52 +02:00
Max Kellermann
7ccc4ddf0d
io/Reader: use std::span
2023-10-07 08:44:42 +02:00
Max Kellermann
b9704715fb
io/FileOutputStream: pass dfd=-1 for absolute /proc/self/fd/N path
2023-10-07 08:42:35 +02:00
Max Kellermann
86e7dff2fc
util/TextFile: add missing cast
2023-10-07 08:39:24 +02:00
Max Kellermann
c450f644e6
lib/xiph/OggSyncState: fix indent
2023-10-07 08:30:12 +02:00
Max Kellermann
496184b1bc
io/Reader: add method ReadT()
2023-10-07 08:27:13 +02:00
Max Kellermann
b81cac3305
lib/nfs/Error: include cleanup
2023-10-04 23:12:45 +02:00
Max Kellermann
bf9dd24536
lib/pcre/UniqueRegex: wrap Compile() options in struct
2023-10-04 17:32:12 +02:00
Max Kellermann
e5680c712b
util/IntrusiveList: add reverse_iterator
2023-10-04 16:51:17 +02:00
Max Kellermann
44daa6d3e6
util/IntrusiveForwardList: reset last_cache properly in clear()
2023-10-04 16:50:46 +02:00
Max Kellermann
5ddddbb16f
test/util/TestIntrusiveForwardList: add push_back() test
2023-10-04 16:50:38 +02:00
Max Kellermann
5aaa3f50aa
util/BindMethod: move SignatureHelper to return type
2023-10-04 16:50:25 +02:00
Max Kellermann
7d26cd74c1
util/BindMethod: add noexcept
2023-10-04 16:50:25 +02:00
Max Kellermann
7e6941acc8
util/BindMethod: add constexpr
2023-10-04 16:50:25 +02:00
Max Kellermann
63d865666e
util/StringBuffer: use using instead of typedef
2023-10-04 16:50:25 +02:00
Max Kellermann
5dda4084df
util/BindMethod: use using instead of typedef
2023-10-04 16:50:25 +02:00
Max Kellermann
19f9238ef0
util/BindMethod: fix indent
2023-10-04 16:50:25 +02:00
Max Kellermann
491cc8f54d
net/SocketDescriptor: add {Read,Write}NoWait()
...
It was surprising that Read() was non-blocking, but there was no
blocking version of it. Let's make the non-blocking behavior explicit
and change Read() to be blocking.
In order to find existing callers easily with compiler errors, this
also refactors Read()/Write() to take a std::span parameter.
2023-09-27 11:39:55 +02:00
Max Kellermann
cad35a83fb
io/FileDescriptor: add Read()/Write() overloads with std::span
2023-09-27 11:14:23 +02:00
Max Kellermann
5fbe5951ab
output/snapcast/Client: use SocketDescriptor::Send()
2023-09-27 10:39:48 +02:00
Max Kellermann
21590e60e6
event/FullyBufferedSocket: pass std::span to DirectWrite()
2023-09-27 10:36:56 +02:00
Max Kellermann
fe69ad0861
event/BufferedSocket: pass std::span to DirectRead()
2023-09-27 10:34:50 +02:00
Max Kellermann
9daf8f6de5
event/BufferedSocket: use std::byte
2023-09-27 10:30:09 +02:00
Max Kellermann
8ca6606323
net/SocketDescriptor: move code to Receive(), Send()
2023-09-27 10:16:21 +02:00
Max Kellermann
09a2da89a2
io/FileDescriptor: pass std::span to Full{Read,Write}()
2023-09-27 10:14:02 +02:00
Max Kellermann
9a0b3775d8
encoder/ToOutputStream: add API docs
2023-09-26 15:48:55 +02:00
Max Kellermann
2075a9a999
encoder/ToOutputStream: remove unnecessary cast
2023-09-26 15:48:22 +02:00
Max Kellermann
1090cc964a
event/Loop: relicense to BSD-2
...
This library has been initially developed at CM4all and eventually
published here:
https://github.com/CM4all/libcommon/tree/master/src/event/
On this copy of it, there were only minor modifications by people
other than me, and these are below the copyright threshold; only
non-epoll backends (which remain under the GPL) were developed by
somebody else.
2023-09-26 15:47:09 +02:00
Max Kellermann
39476bed85
Merge branch 'v0.23.x'
2023-09-26 15:36:26 +02:00
Max Kellermann
49130c2018
python/build/openssl: remove obsolete variable
2023-09-26 15:32:49 +02:00
Max Kellermann
94af199c49
python/build/openssl: add --cross-compile-prefix=...
2023-09-26 15:31:21 +02:00
Max Kellermann
2d25f6f57f
python/build/openssl: pass arch only if cross-compiling
2023-09-26 15:31:11 +02:00
Max Kellermann
cf179ec294
python/build/openssl: pass --libdir=lib to Configure
...
Without this, the AMD64 build installs to "lib64/" which then cannot
be found by CURL.
2023-09-26 15:30:51 +02:00
Max Kellermann
4d6f220a2f
python/build/cmake: write toolchain file only if cross-compiling
2023-09-26 15:29:45 +02:00
Max Kellermann
0ffbe5b5ea
python/build/autotools: add --host=... only if cross-compiling
2023-09-26 15:27:05 +02:00
Max Kellermann
5b83c834ac
python/build/meson: write cross-file only if cross-compiling
2023-09-26 15:26:17 +02:00
Max Kellermann
da7f32bddb
python/build/toolchain: rename arch to host_triplet
2023-09-26 15:25:23 +02:00
Max Kellermann
9a5eac4ea9
python/build/toolchain: set arch=llvm_triple
2023-09-26 15:13:28 +02:00
Max Kellermann
6571b5d118
python/build/openssl: add option "no-makedepend"
...
We do not need "make" dependencies for one-time builds.
2023-09-26 15:05:14 +02:00
Max Kellermann
12dff8e382
python/build/openssl: use no-asm only on Windows
2023-09-26 15:03:50 +02:00
Max Kellermann
c4da87a0cb
python/build/openssl: add configure variable
2023-09-26 15:03:24 +02:00
Max Kellermann
446f8f29d3
python/build/openssl: add Darwin archs
2023-09-26 15:02:02 +02:00
Max Kellermann
48cc76f114
python/build/toolchain: add is_android, is_darwin
2023-09-26 14:49:39 +02:00
Max Kellermann
a0892b852e
build/python/autotools: add option per_arch_cflags
2023-09-26 14:33:24 +02:00
Max Kellermann
485c7805eb
python/build/autotools: use list.extend() to append configure_args
2023-09-26 14:31:30 +02:00
Max Kellermann
23802f4489
python/build/tarball: Python type hints
2023-09-26 14:28:23 +02:00
Max Kellermann
3fedd978a2
python/build/meson: disable ccache because Meson detects it automatically
2023-09-26 14:27:43 +02:00
Max Kellermann
a9f1bed922
build/python/cmake: add cast to fix mypy warning
2023-09-26 14:25:51 +02:00
Max Kellermann
eb23788fec
python/build: add support for fallback download URLs
2023-09-26 14:25:51 +02:00
Max Kellermann
f6d73555a6
python/build/libs: update OpenSSL toi 3.1.3
2023-09-26 14:21:43 +02:00
Max Kellermann
a56a709406
python/build/download: relative imports
2023-09-26 14:15:01 +02:00
Max Kellermann
5f253e66f6
python/build/toolchain.py: add AnyToolchain for type hints
2023-09-26 12:54:58 +02:00
Max Kellermann
4669f7e2b9
{android,win32}/build.py: move Toolchain classes to python/build/toolchain.py
2023-09-26 12:47:02 +02:00
Max Kellermann
4c90f88704
win32: rename CrossGccToolchain to MingwToolchain
2023-09-26 12:46:10 +02:00
Max Kellermann
a7213b78d6
win32/build.py: move code to class CrossGccToolchain
2023-09-26 12:20:53 +02:00
Max Kellermann
719333e16e
android/build.py: move code to class AndroidNdkToolchain
2023-09-26 12:18:18 +02:00
Max Kellermann
100e471b49
android/build.py: remove duplicate import
2023-09-26 12:12:00 +02:00
Max Kellermann
3f2016e552
python: add type hints
2023-09-26 12:04:08 +02:00
Max Kellermann
dd89ea4505
android/AndroidManifest.xml: raise minSdkVersion to 24
...
This is needed to build libFLAC which uses ftello().
2023-09-26 12:04:05 +02:00
Max Kellermann
5cea03bb4f
Merge branch 'v0.23.x'
2023-09-26 11:49:30 +02:00
Max Kellermann
101e12cf9a
modplug: add patch to remove the deprecated register keyword
2023-09-26 11:48:44 +02:00
Max Kellermann
f382808450
python/build/libs.py: update CURL to 8.2.1
2023-09-26 11:48:16 +02:00
Max Kellermann
0cbe3c2a93
python/build/libs.py: update OpenSSL to 3.1.2
2023-09-26 11:48:13 +02:00
Max Kellermann
4f0ae28359
python/build/libs.py: update zlib to 1.3
2023-09-26 11:48:09 +02:00
Max Kellermann
6a4250f485
python/build/libs.py: update Opus to 1.4
2023-09-26 11:48:06 +02:00
Max Kellermann
3322b29e6a
python/build/libs.py: update FLAC to 1.4.3
2023-09-26 11:48:02 +02:00
Max Kellermann
26467e61a3
Merge branch 'consume_single_oneshot-restore' of https://github.com/jcorporation/MPD
2023-09-26 11:43:27 +02:00
naglis
33ac472601
doc/plugins.rst: change command to list PipeWire targets
...
The `dump` command was dropped[1] in favor of other tools.
[1]: 50bdebe4e8
2023-09-26 11:41:37 +02:00
Max Kellermann
2bb4c7cfa7
test/meson.build: add missing libfmt dependency
...
Should have been part of 64647edbe1
2023-09-26 10:47:52 +02:00
Max Kellermann
fbdd2324a5
sticker/Database: add method Reopen()
2023-09-26 10:14:05 +02:00
Max Kellermann
dc31aa6a61
decoder/Plugin: remove unused and broken wrapper method ContainerScan()
2023-09-26 10:13:42 +02:00
Max Kellermann
5b28a987e5
util/IntrusiveForwardList: add method remove_and_dispose_if()
2023-09-22 11:32:40 +02:00
Max Kellermann
78d28063c4
util/IntrusiveForwardList: push_{front,back}() returns iterator
2023-09-22 11:32:33 +02:00
Max Kellermann
64647edbe1
lib/fmt/SocketAddressFormatter: new library
2023-09-19 11:22:39 +02:00
Max Kellermann
b36f5f1ec4
net/ToString: use #pragma once
2023-09-18 22:01:40 +02:00
Max Kellermann
592649d3f2
net/ToString: check family==AF_INET6 instead of looking for colons
2023-09-18 21:59:27 +02:00
Max Kellermann
9398599816
net/ToString: use libfmt
2023-09-18 21:58:55 +02:00
Max Kellermann
61c29473d3
net/ToString: append port only if it is non-zero
2023-09-18 11:11:00 +02:00
Max Kellermann
5fd2fc77f3
net/ToString: add null check
2023-09-18 11:08:16 +02:00
Max Kellermann
3eb0681e3d
net/ToString: use SocketAddress::GetLocalRaw()
2023-09-18 10:54:52 +02:00
Max Kellermann
e831af35fd
input/curl: move code to CreateEasy()
2023-09-17 14:26:47 +02:00
Max Kellermann
fb2e0f734e
lib/fmt/ToBuffer: add overload with StringBuffer parameter
2023-09-16 23:05:48 +02:00
Max Kellermann
3d69f43cff
event/Loop: include SocketEvent.hxx only if HAVE_THREADED_EVENT_LOOP
2023-09-16 22:55:04 +02:00
Max Kellermann
41b1931d91
event/Loop: move the poll_backend to the top
...
This is where all sockets are registered, so it should be initialized
first and destructed last.
2023-09-16 22:45:45 +02:00
Max Kellermann
f086444e4a
lib/curl/Easy: add method SetRequestBody(std::string_view)
2023-09-16 22:39:03 +02:00
Max Kellermann
b8210bbc45
lib/avahi/Poll: fix copyright header
2023-09-16 22:39:03 +02:00
Max Kellermann
ce2965b5bc
io/uring/meson.build: disable io_uring on Android
...
On Android, the feature is forbidden by a seccomp filter, see
https://security.googleblog.com/2023/06/learnings-from-kctf-vrps-42-linux.html
2023-09-16 22:39:03 +02:00
Max Kellermann
18000ff499
io/uring/Handler: remove unused header
2023-09-16 22:39:03 +02:00
Max Kellermann
64e91d6eb7
test/util/TestIntrusiveForwardList: add constant_time_size test
2023-09-16 22:39:03 +02:00
Max Kellermann
6f7dce6dca
test/util/TestIntrusiveForwardList: implement size() only if options.constant_time_size is set
2023-09-16 22:39:03 +02:00
Max Kellermann
175524ad02
util/IntrusiveForwardList: make end() non-static
...
So we can have a `const` overload which is important for some
algorithm templates.
2023-09-16 22:39:03 +02:00
Max Kellermann
bfbde72676
util/Intrusive*: insertion methods return an iterator
2023-09-16 22:39:03 +02:00
Max Kellermann
f76583a08a
util/IntrusiveList: document the erase() return value
2023-09-16 22:39:03 +02:00
Max Kellermann
6d39b401b5
util/IntrusiveForwardList: add method iterator_to()
2023-09-16 22:39:03 +02:00
Max Kellermann
f448bfd3f3
util/IntrusiveForwardList: add option cache_last
2023-09-16 22:39:03 +02:00
Max Kellermann
64b0587e78
util/OptionalField: new library
2023-09-16 22:39:03 +02:00
Max Kellermann
9fe813e572
util/IntrusiveForwardList: add pop_front_and_dispose()
2023-09-16 22:39:03 +02:00
Max Kellermann
b0da0bbf8b
util/IntrusiveForwardList: pop_front() returns reference
2023-09-16 22:39:03 +02:00
Max Kellermann
5c44082b77
util/IntrusiveForwardList: add non-static insert_after() implementation
2023-09-16 22:39:03 +02:00
Max Kellermann
df7ed27b78
util/IntrusiveForwardList: fix move operator, really swap counter
2023-09-16 22:39:03 +02:00
Max Kellermann
bef7ce37d9
RemoteTagCache: use the pop_front() return value
2023-09-16 22:39:03 +02:00
Max Kellermann
c74cf79e0f
Merge pull request #1865 from MusicPlayerDaemon/dependabot/github_actions/actions/checkout-4
...
build(deps): bump actions/checkout from 3 to 4
2023-09-16 21:58:20 +02:00
naglis
992488c6c6
doc/plugins.rst: document missing httpd settings
2023-09-16 00:18:03 +03:00
naglis
bdfe5e97cd
systemd: base "RestrictAddressFamilies" on build options
...
This allows to not allow `AF_NETLINK` if `smbclient` is not enabled.
2023-09-15 23:39:00 +03:00
naglis
df069bc456
systemd: base "ListenStream" on build options
...
Make `mpd.socket` configurable based on build options, so that e.g.
`ListenStream=6600` is not added if `tcp` option is not enabled.
2023-09-15 23:38:59 +03:00
Max Kellermann
9bb67ae7f0
subprojects: update sqlite to 3.43.0-1
2023-09-12 10:21:27 +02:00
Max Kellermann
c994fe4879
io/uring/meson.build: detect liburing with include_type=system
...
This avoids breakages due to `-Wgnu-anonymous-struct`.
2023-09-12 10:20:58 +02:00
Max Kellermann
32421fed89
subprojects: update liburing to 2.3-3
2023-09-12 10:17:03 +02:00
Max Kellermann
077add79cd
subprojects: update fmt to 9.1.0-2
2023-09-12 10:16:56 +02:00
Max Kellermann
50f0163f5f
time/SystemClock: pass by value
2023-09-12 09:56:06 +02:00
Max Kellermann
481c1b6f2e
lib/dbus/ReadIter: add method GetBool()
2023-09-12 09:53:58 +02:00
Max Kellermann
474b6610fa
lib/dbus/Error: add method GetName()
2023-09-12 09:53:15 +02:00
Max Kellermann
11c49da871
io/FileReader: remove unused method Close()
...
It's enough to have the destructor.
2023-09-12 09:53:06 +02:00
Max Kellermann
678828b56f
io/FileOutputStream: remove obsolete maybe_unused
2023-09-12 09:43:14 +02:00
Max Kellermann
9e802ad721
util/StringCompare: add pure attribute
2023-09-12 09:34:52 +02:00
Max Kellermann
859ffddea3
io/BufferedReader: fix ReadFullT() after std::span migration
2023-09-12 09:32:20 +02:00
Max Kellermann
daf935d310
util/HexFormat: add non-const overload
2023-09-12 09:11:38 +02:00
Max Kellermann
6953800628
python/build/libs.py: update CURL to 8.2.1
2023-09-11 22:24:27 +02:00
Max Kellermann
7c65c4f485
python/build/libs.py: update OpenSSL to 3.1.2
2023-09-11 22:23:59 +02:00
Max Kellermann
8950fb9393
python/build/libs.py: update zlib to 1.3
2023-09-11 22:22:00 +02:00
Max Kellermann
b754f3dc34
python/build/libs.py: update Opus to 1.4
2023-09-11 22:21:04 +02:00
Max Kellermann
e8a25dc8d9
python/build/libs.py: update FLAC to 1.4.3
2023-09-11 22:19:41 +02:00
Max Kellermann
99765cc704
modplug: add patch to remove the deprecated register keyword
2023-09-11 22:17:45 +02:00
Max Kellermann
a868dbce3b
android/AndroidManifest.xml: raise minSdkVersion to 24
...
This is needed to build libFLAC which uses ftello().
2023-09-11 22:14:23 +02:00
Max Kellermann
f68305bf00
util/NumberParser: remove obsolete __ANDROID_API__ check
2023-09-11 22:12:13 +02:00
Max Kellermann
517c234461
lib/zlib/GzipOutputStream: use MAX_WBITS
2023-09-11 22:02:04 +02:00
Max Kellermann
a58275591d
util/StaticVector: add methods erase(), pop_front()
2023-09-11 21:59:28 +02:00
Max Kellermann
a2f4fb9ddb
util/StaticVector: add method pop_back()
2023-09-11 21:59:21 +02:00
Max Kellermann
b2acf02af9
util/StaticVector: push_back(), emplace_back() return reference
...
Imitating std::vector since C++17.
2023-09-11 21:59:12 +02:00
Max Kellermann
d5b1ca1a52
util/StaticVector: use emplace_back() to implement push_back()
...
For this class, both are equal.
2023-09-11 21:58:56 +02:00
Max Kellermann
339b9f6e7b
net/StaticSocketAddress: add method GetSteadyPart()
2023-09-11 21:27:12 +02:00
Max Kellermann
35cfa6efa3
net/StaticSocketAddress: add SocketAddress cast constructor
2023-09-11 21:27:12 +02:00
Max Kellermann
34ec024bf4
net/AllocatedSocketAddress: add method GetSteadyPart()
2023-09-11 21:27:12 +02:00
Max Kellermann
75aa08ed6b
tag/Pool: use a power-of-2 hash table size
...
This is simpler to calculate and the advantage of using a prime is
negligible anyway.
2023-09-11 21:23:11 +02:00
Max Kellermann
c8dc1e0665
tag/Pool: use class IntrusiveHashSet intead of rolling a custom hash table
2023-09-11 21:15:28 +02:00
Max Kellermann
847ae7dd7c
util/IntrusiveHashSet: add insert_check_if()
2023-09-11 21:15:28 +02:00
Max Kellermann
44f55e1866
util/IntrusiveList: add missing initializer to insert_after()
...
We must not call std::next() if the list head was not yet initialized.
This was missing in commit 7065425927
2023-09-11 21:15:28 +02:00
Max Kellermann
c391adad10
tag/Pool: move code from calc_hash() to util/djb_hash.cxx
2023-09-11 20:53:37 +02:00
Max Kellermann
f578b06d83
tag/Pool: move calc_hash() returns std::size_t
2023-09-11 20:51:44 +02:00
Max Kellermann
0748f75d9b
tag/Pool: rename TagPoolSlot to TagPoolItem
2023-09-11 20:44:55 +02:00
Max Kellermann
7dff29bcd1
util/IntrusiveHashSet: add option zero_initialized
2023-09-11 20:34:17 +02:00
Max Kellermann
3e09f95b40
tag/Pool: enable option zero_initialized
...
Commit 44beae519d caused the MPD
executable to grow by more than 1 MB because the `slots` array
suddenly was not zero-initialized anymore, because the doubly-linked
list is circular, while the singly-linked list is zero-terminated.
This option moves the array back to the `bss` section.
2023-09-11 20:32:26 +02:00
Max Kellermann
7065425927
util/IntrusiveList: add option zero_initialized
2023-09-11 20:30:38 +02:00
Max Kellermann
f01793ad4a
util/Intrusive*: move constant_time_size to an options struct
...
This makes it easier to add more options later.
2023-09-11 19:18:36 +02:00
Max Kellermann
1f495efb46
test/LoadDatabase: ignore tag/charset mismatches
...
This program shouldn't fail just because the configuration doesn't
match - it has no configuration, it's just a dumb test program.
2023-09-07 09:54:03 +02:00
Max Kellermann
38d8359384
test/LoadDatabase: new test program (for benchmarking the database loader)
2023-09-06 16:17:24 +02:00
Max Kellermann
2c01e79b47
SongSave: omit FixTagString() for strings from the database file
...
Strings in the database should have been sanitized already, so let's
not waste CPU on this.
2023-09-06 16:12:20 +02:00
Max Kellermann
a573d57de8
tag/Builder: remove unnecessary explicit AddItem() overload
2023-09-06 16:10:31 +02:00
Max Kellermann
2f4e2935a3
db/upnp, playlist/pls: use AddItem(std::string_view)
2023-09-06 16:08:42 +02:00
Max Kellermann
44beae519d
tag/Pool: use doubly-linked list
...
This adds some memory overhead but eliminates the linear search from
tag_pool_put_item().
2023-09-06 16:00:25 +02:00
Max Kellermann
b896711fc6
tag/Pool: fix crash in tag_pool_put_item()
...
Regression by commit 76bdfabcc5
2023-09-06 15:53:17 +02:00
Max Kellermann
76bdfabcc5
tag/Pool: use class IntrusiveForwardList
2023-09-06 15:33:26 +02:00
Max Kellermann
b35e8a588f
util/IntrusiveForwardList: add operator++(int)
2023-09-06 15:31:07 +02:00
Max Kellermann
6c48f5ac63
tag/Pool: use std::array
2023-09-06 15:10:47 +02:00
Max Kellermann
1448f52eac
util/VarSize: convert static_assert to concept check
2023-09-06 15:05:26 +02:00
Max Kellermann
c96e8ab47c
db/simple/DirectorySave: optimize duplicate checks with std::set
...
This reduces the CPU usage for loading a large database by more than 50%.
2023-09-06 14:56:41 +02:00
Max Kellermann
2c4ef4460f
db/update/SpecialDirectory: more std::string_view migration
2023-09-06 14:51:37 +02:00
Max Kellermann
20bbe1b57b
fs/Traits: add GetFilenameSuffix() overload with std::string_view
2023-09-06 14:50:36 +02:00
Max Kellermann
449d59af2f
db/simple/Directory: use operator== to compare strings
2023-09-06 14:30:08 +02:00
Max Kellermann
851136e6fd
db/simple/Directory: GetName() returns std::string_view
2023-09-06 14:29:32 +02:00
Max Kellermann
ad854e9867
db/simple/Save: initialize array without memset()
2023-09-06 14:17:07 +02:00
dependabot[bot]
f53dde970f
build(deps): bump actions/checkout from 3 to 4
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-04 15:51:28 +00:00
naglis
046a385070
doc/user.rst: use explicit meson setup command
...
The implicit setup command is deprecated since 0.64.0
2023-08-24 13:57:03 +03:00
jcorporation
9a28176d72
Save consume and single oneshot as string
...
Consume and single oneshot should be saved as string.
closes #1853
2023-08-07 23:23:08 +02:00
Max Kellermann
ba2df05fb4
lib/zlib/GzipOutputStream: add noexcept
2023-08-03 20:58:43 +02:00
Max Kellermann
8722c51306
lib/dbus/AppendIter: add Append(int32_t), Append(int64_t)
2023-08-03 20:58:01 +02:00
Max Kellermann
80104eb6d5
util/IntrusiveList: fix illegal downcast (ubsan)
...
Fixes UBSanitizer warning:
src/util/IntrusiveList.hxx:108:10: runtime error: downcast of address 0xdeadbeef which does not point to an object of type 'Foo'
2023-08-03 20:56:34 +02:00
Max Kellermann
8743326924
sticker/Database: allow moving
2023-08-03 20:54:57 +02:00
Max Kellermann
83a6cb804b
util/IntrusiveHashSet: add template argument GetKey
...
This is a big simplification of all IntrusiveHashSet users: instead of
having to implement multiple overloads of Hash and Equal, the
IntrusiveHashSet class can first extract the effective key from an
item and then pass it to the Hash/Equal functions.
2023-08-03 20:50:21 +02:00
Max Kellermann
78801f303e
test/util/TestIntrusiveHashSet: add test for remove_and_dispose_key()
2023-08-03 20:44:52 +02:00
Max Kellermann
9691b609a2
util/IntrusiveHashSet: remove_and_dispose() returns number of removed elements
2023-08-03 20:44:47 +02:00
Max Kellermann
250fa8c732
util/IntrusiveHashSet: rename remove_and_dispose() to remove_and_dispose_key()
2023-08-03 20:44:39 +02:00
Max Kellermann
2cd5f4cd3e
util/IntrusiveHashSet: replace template parameters Hash/Equal with a single one
...
Preparing to add a key extraction function. Without this "Operators"
template parameter, we'd have even more template parameters, and that
parameter list would grow too complex. Better wrap it in one single
template that contains all operators.
This is an API change which all callers need to adjust to, but it will
be worth it.
2023-08-03 20:44:14 +02:00
Max Kellermann
dcd7c6337c
util/Intrusive{List,HashSet}: reimplement hook mode detection with implicit cast
2023-08-03 20:33:15 +02:00
Max Kellermann
43d633f560
Instance: use C++11 initializers
2023-07-23 09:14:25 +02:00
Max Kellermann
1c37b0487c
lib/fmt/SystemError: add VFmtErrno()
2023-07-21 19:44:45 +02:00
Max Kellermann
acc92b156b
util/Concepts: remove obsolete fallbacks
2023-07-21 19:43:04 +02:00
Max Kellermann
aeadae5399
util/IntrusiveHashSet: insert_check() returns the bucket head on success
...
The list head is a stable value that is guaranteed to be still valid
when insert_commit() gets called.
This fixes a linked list corruption bug in class StaticCache which
occurs when the cache item pointed to by the iterator gets evicted
between insert_check() and insert_commit().
2023-07-21 19:42:35 +02:00
Max Kellermann
42d5b05f54
util/IntrusiveHashSet: rename insert() to insert_commit()
...
Clarify that the method is not a freestanding insertion method but
should only be used after insert_check().
2023-07-21 19:42:26 +02:00
Max Kellermann
e133f621a4
util/IntrusiveHashSet: add insert_check() documentation
2023-07-21 19:41:46 +02:00
Max Kellermann
91437d9e63
util/IntrusiveList: add insert_after()
2023-07-21 19:41:40 +02:00
Max Kellermann
f1b497fb0c
util/IntrusiveList: document insert()
2023-07-21 19:41:36 +02:00
Max Kellermann
cc9d061e51
util/IntrusiveList: pop_front() and pop_back() return reference
2023-07-21 19:41:13 +02:00
Max Kellermann
62ee9a4d60
util/DynamicFifoBuffer: use T instead of std::byte
...
Mistake added by commit b528b467649754
2023-07-21 19:40:38 +02:00
jcorporation
082f72dd20
Add support of TAG_MUSICBRAINZ_RELEASEGROUPID
...
Closes #1767
2023-07-12 19:43:37 +02:00
Max Kellermann
9c19368fc7
Merge branch 'v0.23.x'
2023-06-02 14:36:02 +02:00
Simon Arlott
561d6fd478
meson: Use correct prefix for systemd_system_unit_dir
...
systemd uses "rootprefix", not "prefix" for this value
059b1b31ad/src/core/systemd.pc.in (L23)
2023-06-02 14:33:13 +02:00
Naïm Favier
42a01822bf
meson: use correct prefix for systemd dirs
...
See https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
Fixes the build in nixpkgs
2023-06-02 14:33:09 +02:00
Shen-Ta Hsieh
38f1237d49
output/wasapi: cast to const char * for fmt 10 compatible
2023-06-02 14:29:43 +02:00
Shen-Ta Hsieh
8df77122e5
python/build/libs.py: use right cmake variable to disable SDL
2023-06-02 14:28:22 +02:00
Shen-Ta Hsieh
fef6b9df80
flac: Try InputStream interface if flac failed to read through a wchar_t path
2023-06-02 14:28:22 +02:00
Shen-Ta Hsieh
d52eac66db
doc/mpdconf.example: add hardware mixer example config for wasapi
2023-06-02 14:27:24 +02:00
Shen-Ta Hsieh
70879f0abc
thread/WindowsFuture: remove wrong address_of operator
2023-06-02 14:27:24 +02:00
Shen-Ta Hsieh
bcb393628e
win32/ComWorker: rename variable name to prevent ambiguous
2023-06-02 14:22:11 +02:00
Max Kellermann
18d3a5c12b
decoder/flac: add noexcept and inline
2023-06-02 14:22:11 +02:00
Simon Arlott
6ee3d0102b
decoder/mad: Fix decode of LAME peak value
...
6d91b5c7b2 ("fix double promotions") changed
how LAME peak values are decoded, producing large incorrect values that
cause some MP3 files to play silently.
Restore the original decode from MAD fixed-point format to double and
document what it's doing.
Fixes #1823
2023-06-02 14:15:48 +02:00
Max Kellermann
fc9626e2f4
increment version number to 0.23.14
2023-06-02 14:15:14 +02:00
Simon Arlott
3bedd94fc8
doc: Fix syntax error
...
With sphinx-build 5.0.0:
doc/user.rst:728: ERROR: Unexpected indentation.
doc/user.rst:731: ERROR: Unexpected indentation.
2023-06-02 14:10:38 +02:00
Max Kellermann
45f81cde6d
Merge branch 'null-always-off' of https://github.com/nomis/MPD
2023-05-25 10:42:58 +02:00
John Regan
a482c798ad
pcm: declare IsSilentSample as const
...
GNU libstdc++ declares cmath functions as constexpr, but libc++ does
not. The C++ standards state the standard library functions should not
be declared constexpr unless explicitly required.
2023-05-24 15:05:19 -04:00
Naïm Favier
838af929a0
meson: use correct prefix for systemd dirs
...
See https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/
Fixes the build in nixpkgs
2023-05-22 22:23:38 +02:00
Max Kellermann
d9b1f6223e
io/uring/Close: wrapper for io_uring_prep_close()
2023-05-22 21:59:44 +02:00
Max Kellermann
26577d1301
io/uring/Queue: make Submit() virtual, Push() not
...
This allows submitting io_uring calls without an `Operation` instance
(fire & forget). We'll do that for close().
2023-05-22 21:57:18 +02:00
Max Kellermann
6496c1b806
util/ScopeExit: convert the function from base class to member
...
This allows using `final` callables.
2023-05-22 21:20:49 +02:00
Max Kellermann
7bb251dad8
db/update/Walk: use marker to remove deleted items
...
This eliminates all `Storage::GetInfo()` calls from
`UpdateWalk::PurgeDeletedFromDirectory()` and instead uses a "marker"
field to mark items that have been visited; later, all unmarked items
can be deleted.
This eliminates a lot of redundant I/O which is noticable with the
`curl` storage plugin (i.e. WebDAV).
2023-05-22 20:13:01 +02:00
Max Kellermann
9027e5c5bb
Merge tag 'v0.23.13'
...
release v0.23.13
2023-05-22 19:52:08 +02:00
Max Kellermann
8842650c33
release v0.23.13
2023-05-22 19:46:38 +02:00
Max Kellermann
d5bf128cee
storage/curl: throw HttpStatusError
2023-05-22 19:29:46 +02:00
Max Kellermann
5cd86e272f
input/curl: disable CURLOPT_FAILONERROR
...
Let OnHeaders() check the status.
The status checking code was added by commit 4f021cbced in 2011,
but in 2008, commit a8e81326d0 enabled `CURLOPT_FAILONERROR`, which
means the status checking code never had any effect.
This allows `LoadExcludeListOrLog()` to hide boring "404 Not Found"
log messages via `IsFileNotFound()`.
2023-05-22 19:03:12 +02:00
Max Kellermann
740cbe9e02
event/Loop: remove failing assert()
...
The `assert(!quit)` can fail if the `EventThread` gets stopped before
it enters `EventLoop::Run()`. There is a similar problem with `alive`,
which gets reset by `EventThread::Stop()`.
If that happens, then `EventLoop::Run()` should return immediately
without handling any events.
2023-05-22 18:14:25 +02:00
Max Kellermann
ed890a273a
doc/user.rst: document the replaygain_missing_preamp setting
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1785
2023-05-22 16:17:05 +02:00
Max Kellermann
068cd559e1
db/update/Walk: clear Song::in_playlist
...
Without clearing all `in_playlist` flags, the songs will never be
revealed again if they were hidden once by a CUE sheet, not even after
the CUE sheet gets deleted or modified.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1784
2023-05-22 15:41:58 +02:00
Max Kellermann
dc127f39a7
util/ScopeExit: use std::declval()
...
Fixes GCC 10 error:
error: cannot call member function `Foo` without object
2023-05-22 15:01:25 +02:00
Max Kellermann
7a99a7008c
util/ScopeExit: use std::exchange()
2023-05-22 14:44:45 +02:00
Max Kellermann
70b451db7b
util/ScopeExit: add noexcept
2023-05-22 14:44:17 +02:00
Max Kellermann
2ab03a0914
util/ScopeExit: allow the function to throw
...
Fixes crash inside AtScopeExit() in the WASAPI output plugin.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1759
2023-05-22 14:43:23 +02:00
Max Kellermann
2fa8c7d2db
lib/crypto/meson.build: link with ffmpeg_util_dep
...
This adds `MakeFfmpegError()` to the executable and fixes a linker
failure when `libavutil` is available, but `libavformat` and
`libavcodec` are not.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1786
2023-05-22 14:05:13 +02:00
Max Kellermann
7c759ba8b0
lib/ffmpeg/meson.build: move libavutil helpers into separate library
2023-05-22 14:03:47 +02:00
Max Kellermann
6d9b452fde
lib/ffmpeg/LogError: remove unused library
2023-05-22 13:48:33 +02:00
Max Kellermann
8ba68fdb47
io/OutputStream: use std::span
2023-05-21 21:35:11 +02:00
Max Kellermann
e72d27566c
io/BufferedOutputStream: use std::string_view
2023-05-21 21:31:32 +02:00
Max Kellermann
01c02a1ef8
util/StaticFifoBuffer: add method MoveFrom()
2023-05-21 21:26:20 +02:00
Max Kellermann
4bb4611e78
Merge branch 'v0.23.x'
2023-05-21 21:18:45 +02:00
Michiel Beijen
f7eb1c9a83
Fix meson build warning for get_pkgconfig_variable
...
Otherwise, building will generate these warnings:
systemd/system/meson.build:5: WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since '0.56.0': Dependency.get_pkgconfig_variable. use Dependency.get_variable(pkgconfig : ...) instead
systemd/user/meson.build:5: WARNING: Project targeting '>= 0.56.0' but tried to use feature deprecated since '0.56.0': Dependency.get_pkgconfig_variable. use Dependency.get_variable(pkgconfig : ...) instead
2023-05-21 21:07:14 +02:00
Max Kellermann
2d22e6dee4
subprojects: update sqlite to 3.41.2-2
2023-05-21 21:05:17 +02:00
Max Kellermann
4587bf759d
subprojects: update expat to 2.5.0-2
2023-05-21 21:04:56 +02:00
Max Kellermann
e1e37cfe3c
TagPrint, command/File: two more libfmt 10 workarounds
...
libfmt 10 doesn't know how to format a StringView, and doesn't cast to
std::string_view anymore. The StringView class has been removed from
MPD 0.24 completely, and this is a stable-branch-only workaround.
Closes https://github.com/MusicPlayerDaemon/MPD/pull/1814
2023-05-21 21:03:20 +02:00
latex
381934985a
reorder ffmpeg to be lower priority than gme
...
This should prevent ffmpeg from taking priority over the gme plugin.
The ffmpeg plugin is more buggy than gme.
One of the prominent bugs of preferring ffmpeg over gme is that ffmpeg
cannot seek SAP files while gme can. This should prevent that from
happening.
2023-05-21 20:58:53 +02:00
Max Kellermann
a8042885ac
TimePrint: minor fixup for libfmt 10
...
libfmt version 10 has difficulties formatting a `StringBuffer`, and we
need to help it by explicitly invoking the `c_str()` method.
2023-05-21 20:58:19 +02:00
Max Kellermann
a71e68db50
command/player, SongPrint: use AudioFormatFormatter()
...
libfmt version 10 apparently doesn't know how to format a
`StringBuffer`, failing the MPD build. Since we have a formatter
specialization for `AudioFormat`, let's use that - it's better and
easier to use.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807
2023-05-21 20:57:59 +02:00
Max Kellermann
1417578b3d
db/update/Archive: validate directory names
...
Fixes assertion failure if the ZIP file contains a path that begins
with a slash.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1793
2023-05-21 20:57:38 +02:00
Max Kellermann
96befa138c
db/update/Archive: ignore filenames with newline character
2023-05-21 20:56:38 +02:00
Max Kellermann
16a99804de
db/update/Archive: move check to IsAcceptableFilename()
2023-05-21 20:56:32 +02:00
Max Kellermann
75a39ed279
db/update/Archive: remove useless log message
2023-05-21 20:55:59 +02:00
Benjamin Cremer
4d357ab77c
Fix syntax error in mpdconf.example
2023-05-21 20:51:57 +02:00
datasone
d4f3dd49b4
db/SimpleDatabasePlugin: store in_playlist value of songs into database
...
Fixes hide_playlist_targets not working after server restart
Currently, `hide_playlists_targets` works by skipping songs with
`in_playlist` value set to true in
[`Directory::Walk`](a57bcd0238/src/db/plugins/simple/Directory.cxx (L237) ). But
`in_playlist` is not stored and only updated in
[`UpdateWalk::PurgeDanglingFromPlaylists`](a57bcd0238/src/db/update/Playlist.cxx (L139) ),
which will only be executed while updating DB.
This causes the problem that playlist target songs are correctly
hidden after database update, but will remain visible after mpd server
restarted. This pr solves the problem by storing `in_playlist` value
of songs into the `SimpleDatabase` file.
2023-05-21 20:51:47 +02:00
kaliko
4ec6d0555a
check systemd unit dir from systemd.pc in meson
2023-05-21 20:51:33 +02:00
Max Kellermann
a6a1182c4c
python/build/libs.py: update OpenSSL to 3.1.0
2023-05-21 20:50:03 +02:00
Max Kellermann
a59c9c602b
python/build/libs.py: update CURL to 8.0.1
2023-05-21 20:50:03 +02:00
Max Kellermann
0c4d824d64
subprojects/sqlite3.wrap: update to 3.41.0-1
2023-05-21 20:50:03 +02:00
Max Kellermann
a5281856c9
python/build/libs.py: update WildMidi to 0.4.5
2023-05-21 20:50:03 +02:00
Max Kellermann
0206a46d39
decoder/gme: require GME 0.6 or later
...
This allows dropping a few compile-time version checks and we can use
pkg-config to detect the library.
2023-05-21 20:50:03 +02:00
Max Kellermann
9475ef2202
fs/Charset: assign fs_charset
...
This got lost 8 years ago in commit 87c88fcb27
D'oh!
2023-05-21 20:50:03 +02:00
Max Kellermann
edae00e719
fs/Charset: remove useless log message
2023-05-21 20:50:03 +02:00
Max Kellermann
fb695bc55f
command/{file,storage}: remove stray "#pragma GCC diagnostic pop"
2023-05-21 20:50:03 +02:00
Max Kellermann
23a5b8fd3c
python/build/meson.py: remove unused import
2023-05-21 20:43:09 +02:00
Max Kellermann
273a93cfcf
build/python/cmake: set CMAKE_C_FLAGS_INIT, not CMAKE_C_FLAGS
...
According to
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS_INIT.html
the _INIT variables should be set in the toolchain file.
2023-05-21 20:43:05 +02:00
Max Kellermann
d105985d78
build/python/cmake: set CMAKE_OSX_SYSROOT on macOS
2023-05-21 20:43:00 +02:00
Max Kellermann
f8cfeb39e9
build/python/cmake: add "env" parameter
2023-05-21 20:42:51 +02:00
Max Kellermann
d5d3982d3c
build/python/build/project.py: add "lazy" parameter to make_build_path()
2023-05-21 20:42:27 +02:00
Max Kellermann
47341107ea
build/python/build/project.py: raise exception on regex mismatch
2023-05-21 20:42:18 +02:00
Max Kellermann
90eaa87a4d
python/build/zlib.py: use autotools to be more portable
...
Right now, zlib is only built for Windows, but we may eventually
changed that, so don't hard-code `win32/Makefile.gcc`.
2023-05-21 20:42:12 +02:00
Max Kellermann
b09a54b2c2
python/build/autotools.py: use toolchain.arflags
2023-05-21 20:42:04 +02:00
Max Kellermann
10aec174d5
python/{cmake,autotools}: build in verbose mode
...
Make sure all the gory details are visible in CI logs.
2023-05-21 20:41:49 +02:00
Max Kellermann
d32ed194e8
python/build/autotools.py: dump config.log on configure error
...
For better error logs on CI.
2023-05-21 20:41:44 +02:00
Felix Hädicke
70d0fbd715
python/makeproject: do not use hard-code absolute path to make
2023-05-21 20:41:38 +02:00
Felix Hädicke
302432e157
python/makeproject: set appropriate build jobs count depending on the number of CPUs
2023-05-21 20:41:34 +02:00
Felix Hädicke
4ab8a677dc
build/python: do not use absolute path for tar
2023-05-21 20:41:29 +02:00
Max Kellermann
52e4a4c904
build/python/build/project.py: lazy tarball extraction
2023-05-21 20:41:25 +02:00
Max Kellermann
a0f6932ebe
unix/SignalHandlers: shut down if parent process dies in --no-daemon mode
...
By default, if the parent of a process dies, the process gets SIGHUP
and is supposed to shut down. This however doesn't work for MPD,
because MPD redefines SIGHUP with a different meaning (like most
daemons do).
To work around this, we configure the kernel to send SIGTERM instead
of SIGHUP.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
2023-05-21 20:40:47 +02:00
Max Kellermann
6e700dab69
CommandLine: hard-code daemon=false if ENABLE_DAEMON is not set
2023-05-21 20:40:39 +02:00
Max Kellermann
35eaed7206
python/build/libs.py: update FFmpeg to 6.0
2023-05-21 20:40:39 +02:00
Max Kellermann
e7c963f2ce
python/build/libs.py: disable more unused FFmpeg features
2023-05-21 20:40:39 +02:00
Naïm Favier
949d72e368
output/PipeWire: lock thread loop in SendTag
2023-05-21 20:40:29 +02:00
Max Kellermann
8d2a184658
python/build/libs.py: update CURL to 7.88.1
2023-05-21 20:36:28 +02:00
Max Kellermann
c877a32d97
python/build/libs.py: update OpenSSL to 3.0.8
2023-05-21 20:36:23 +02:00
Max Kellermann
541468f0ca
input/async: check for errors in Seek()
...
Fixes a busy loop in BufferingInputStream::RunThreadLocked() because
the method never learns that seeking is ignored, even though the HTTP
stream is already broken and can never be read; nobody cared to check
for errors.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1727
2023-05-21 20:34:19 +02:00
Max Kellermann
d2797effa3
command/database: add missing include for UINT_MAX
2023-05-21 20:33:34 +02:00
Max Kellermann
1170fb1e1e
output/osx: change type to std::size_t to fix -Wc++11-narrowing
2023-05-21 20:33:03 +02:00
Max Kellermann
65b9b3195c
lib/dbus/AppendIter: add missing include
2023-05-21 20:33:03 +02:00
Max Kellermann
258830e913
increment version number to 0.23.13
2023-05-21 20:29:23 +02:00
Max Kellermann
c69b9780df
Merge branch 'reorder-decoder-plugins' of https://github.com/fuck-shithub/MPD
2023-05-15 21:03:35 +02:00
Max Kellermann
f869593ac8
TimePrint: minor fixup for libfmt 10
...
libfmt version 10 has difficulties formatting a `StringBuffer`, and we
need to help it by explicitly invoking the `c_str()` method.
2023-05-15 21:00:24 +02:00
Max Kellermann
181b96dd2d
command/player, SongPrint: use AudioFormatFormatter()
...
libfmt version 10 apparently doesn't know how to format a
`StringBuffer`, failing the MPD build. Since we have a formatter
specialization for `AudioFormat`, let's use that - it's better and
easier to use.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1807
2023-05-15 20:59:05 +02:00
latex
4e9f463bb6
reorder ffmpeg to be lower priority than gme
...
This should prevent ffmpeg from taking priority over the gme plugin.
The ffmpeg plugin is more buggy than gme.
One of the prominent bugs of preferring ffmpeg over gme is that ffmpeg
cannot seek SAP files while gme can. This should prevent that from
happening.
2023-05-12 00:28:56 +02:00
borine
4947bb113d
input/plugins/Alsa: limit ALSA buffer time to 2 seconds maximum
...
Some ALSA capture devices can have very large buffers, holding 10
seconds or more audio. Using the maximum buffer size with such
devices leads to unacceptably large, and unnecessary, latency.
Also, some ALSA drivers (e.g. HDA Intel PCH) report an invalid
maximum period size, and the period size that mpd calculates from
the maximum buffer size results in "Invalid argument" error when
applying the hw_params. Note that the "default" capture device on
many cards includes the "dsnoop" plugin which imposes a buffer
size of 16384 frames, so that "alsa://" works OK but
"alsa://plughw" or "alsa://hw" both fail.
Limit the maximum buffer time for ALSA input devices to a more useable
2 seconds, thereby avoiding both the above problems.
2023-05-06 10:33:48 +01:00
skidoo23
4345a656aa
output/httpd: fix libfmt icy-metaint replacement field
...
Since using libfmt (commit: dfc5b49 ) ICY MetaData was broken. Eg MP3 streams encoded with LAME were affected resulting in missing stream titles on VLC or strange noises on Sonos hardware. This commit fixes the icy-metaint field.
2023-05-04 18:15:13 +02:00
Max Kellermann
31dc8b73b7
db/update/Archive: validate directory names
...
Fixes assertion failure if the ZIP file contains a path that begins
with a slash.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1793
2023-04-30 08:46:52 +02:00
Max Kellermann
e84db4f411
db/update/Archive: ignore filenames with newline character
2023-04-30 08:45:34 +02:00
Max Kellermann
395bf34a91
db/update/Archive: move check to IsAcceptableFilename()
2023-04-30 08:42:16 +02:00
Max Kellermann
dcc7628b67
db/update/Archive: remove useless log message
2023-04-30 08:39:34 +02:00
Max Kellermann
f2a4ae15aa
db/update: pass filenames as std::string_view
2023-04-30 08:28:43 +02:00
Max Kellermann
434bcb08ee
db/simple/Song: pass std::string_view to Load{File,FromArchive}()
2023-04-30 08:21:20 +02:00
Max Kellermann
99885c4cbc
util/IntrusiveHashSet: add method remove_and_dispose()
2023-04-22 08:40:53 +02:00
Simon Arlott
ab196f7afc
output/Control: Support always_off outputs that are never used for playback
...
Add an `always_off` option to outputs that causes them to never start
playback even if they're enabled.
This allows placeholder `null` outputs to be defined for the purpose
of having an external client react to the enabled state without the
side effects of real outputs. Like an external mixer, the client can
perform some action when an output is enabled.
Normally `null` outputs can be used for playback so it's possible for
MPD to continue playback silently if a problem occurs with all the real
outputs (or there are none enabled).
2023-04-21 20:54:37 +01:00
Max Kellermann
90c3fe22f5
decoder/openmpt: check libopenmpt version at compile time, not at configure time
2023-04-21 17:29:20 +02:00
Simon Arlott
ad8117e7c8
decoder/openmpt: Fix build error with libopenmpt < 0.5
...
openmpt_at_end is a string, not an integer
Fixes build error:
src/decoder/plugins/OpenmptDecoderPlugin.cxx: In function 'void mod_decode(DecoderClient&, InputStream&)':
src/decoder/plugins/OpenmptDecoderPlugin.cxx:85:44: error: invalid cast from type 'std::string_view' {aka 'std::basic_string_view<char>'} to type 'unsigned in '
85 | mod.ctl_set("play.at_end", std::to_string((unsigned)openmpt_at_end));
| ^~~~~~~~~~~~~~~~~~~~~~~~
2023-04-21 17:24:42 +02:00
Benjamin Cremer
82568c0b52
Fix syntax error in mpdconf.example
2023-04-13 08:47:43 +02:00
datasone
838b19c2b5
db/SimpleDatabasePlugin: store in_playlist value of songs into database
...
Fixes hide_playlist_targets not working after server restart
Currently, `hide_playlists_targets` works by skipping songs with
`in_playlist` value set to true in
[`Directory::Walk`](a57bcd0238/src/db/plugins/simple/Directory.cxx (L237) ). But
`in_playlist` is not stored and only updated in
[`UpdateWalk::PurgeDanglingFromPlaylists`](a57bcd0238/src/db/update/Playlist.cxx (L139) ),
which will only be executed while updating DB.
This causes the problem that playlist target songs are correctly
hidden after database update, but will remain visible after mpd server
restarted. This pr solves the problem by storing `in_playlist` value
of songs into the `SimpleDatabase` file.
2023-04-12 05:18:21 +02:00
kaliko
0d2f67b523
check systemd unit dir from systemd.pc in meson
2023-04-11 21:06:53 +02:00
Max Kellermann
a57bcd0238
thread/Mutex: add RecursiveMutex
2023-04-06 21:32:18 +02:00
Max Kellermann
76497bd5f7
util/IntrusiveSortedList, event/TimerList: include cleanup
2023-04-06 10:24:53 +02:00
Max Kellermann
53ec02d5e9
net/SocketDescriptor: decouple from FileDescriptor on Windows
...
On Windows, a socket is not a file descriptor; it is a different beast
(and anyway, Windows doesn't have file descriptors).
2023-03-29 10:12:50 +02:00
Max Kellermann
7a5f485cf8
event/ServerSocket: use class UniqueSocketDescriptor in SupportsIPv6()
2023-03-29 10:06:48 +02:00
Max Kellermann
90565b1e36
test/run_{input,output}: add missing includes
2023-03-29 10:06:48 +02:00
Max Kellermann
6f7c7a2149
event/EpollBackend: add missing header guard
2023-03-21 11:00:41 +01:00
Max Kellermann
91123983ad
Revert "python/build/meson.py: keep Meson from executing Android-x86 test binaries"
...
This reverts commit 8ab2722300 . The
"needs_exe_wrapper" setting was already there, and the new one was
misplaced, it belongs in "[properties]".
2023-03-21 09:46:25 +01:00
Max Kellermann
2506edbffb
python/build/libs.py: update OpenSSL to 3.1.0
2023-03-21 09:39:28 +01:00
Max Kellermann
929520ecd2
python/build/libs.py: update CURL to 8.0.1
2023-03-21 09:38:22 +01:00
Max Kellermann
a20d467bf1
event/Loop: move quit_injected check to inside #ifdef HAVE_THREADED_EVENT_LOOP
2023-03-20 15:02:32 +01:00
Max Kellermann
102dc123e8
LogBackend: log to stderr (regression fix)
2023-03-14 20:25:28 +01:00
Max Kellermann
b4d0b23369
LogBackend: use fmt::print()
2023-03-14 20:24:14 +01:00
Max Kellermann
119a949bb5
ls: use fmt::print()
2023-03-14 20:20:46 +01:00
Max Kellermann
f5b22bf2c3
input/Offset: remove unused macro PRIoffset
2023-03-14 20:20:10 +01:00
Max Kellermann
5b7a89d714
mixer/plugins/volume_mapping: convert to C++
2023-03-14 20:18:41 +01:00
Max Kellermann
5b41857a22
mixer/plugins/volume_mapping: add SPDX header
2023-03-14 20:08:43 +01:00
Max Kellermann
688d9ff114
util/UriExtract: add uri_get_path_query_fragment()
...
Rename uri_get_path() to uri_get_path_query_fragment() and add a new
uri_get_path() function.
2023-03-14 20:03:17 +01:00
Max Kellermann
c2d202e9b0
meson_options.txt: add option "libfuzzer"
...
This option allows disabling libFuzzer, which is required to run the
fuzzers with Honggfuzz.
2023-03-14 19:47:22 +01:00
Max Kellermann
bc51bc2933
pcm/Normalizer: add method Reset()
2023-03-13 13:54:12 +01:00
Max Kellermann
f547a56b1d
pcm/Normalizer: use Traits::long_type
2023-03-13 13:51:27 +01:00
Max Kellermann
1f6637d49a
pcm/Normalizer: add constant SHIFT
2023-03-13 13:49:25 +01:00
Max Kellermann
de155a740c
pcm/Normalizer: convert peakPos to std::size_t
2023-03-13 13:47:04 +01:00
Max Kellermann
f323fc48d7
pcm/Normalizer: eliminate the local variable slot
2023-03-13 13:45:28 +01:00
Max Kellermann
2ea634c302
pcm/Normalizer: replace the gain array with a simple prev_gain variable
2023-03-13 13:44:45 +01:00
Max Kellermann
c0d38d941a
pcm/Normalizer: split the normalization loop
...
Performance improvement because the ramp code is now moved out of the
hot code path, allowing the compiler to vectorize.
2023-03-13 13:38:19 +01:00
Max Kellermann
d7f2d90fd3
pcm/Normalizer: no in-place editing, separate src/dest parameters
...
This eliminates the memcpy() call from NormalizeFilter::FilterPCM().
2023-03-13 13:37:49 +01:00
Max Kellermann
8ea9b89321
pcm/Normalizer: use std::span
2023-03-13 13:16:44 +01:00
Max Kellermann
738254b2fc
pcm/Normalizer: use SampleTraits
2023-03-13 12:42:37 +01:00
Max Kellermann
fcc9a98cad
pcm/Normalizer: use PcmClamp()
2023-03-13 12:42:36 +01:00
Max Kellermann
dcf0a3e475
pcm/Normalizer: remove clipped (only written to, never read)
2023-03-13 12:42:34 +01:00
Max Kellermann
e990d6eecc
pcm/Normalizer: make variables more local
2023-03-13 12:42:31 +01:00
Max Kellermann
941636b87b
pcm/Normalizer: eliminate local variable ap
2023-03-13 12:31:16 +01:00
Max Kellermann
1298a82f4f
pcm/Normalizer: use std::size_t
2023-03-13 12:31:16 +01:00
Max Kellermann
e6fedcbd10
pcm/Normalizer: expose the class, convert functions to methods
2023-03-13 12:25:09 +01:00
Max Kellermann
48c8c7daf5
pcm/Normalizer: move code to ctor/dtor
2023-03-13 12:25:09 +01:00
Max Kellermann
6e5d9d4490
pcm/Normalizer: hard-code the preferences
2023-03-13 12:25:09 +01:00
Max Kellermann
d2f2dde2e1
pcm/Normalizer: eliminate struct CompressorConfig
2023-03-13 12:25:09 +01:00
Max Kellermann
d0dd035075
pcm/Normalizer: use new/delete instead of malloc()/free()
2023-03-13 12:25:09 +01:00
Max Kellermann
7702643e1b
pcm/Normalizer: remove Compressor_setHistory(), no resize possible
...
This feature was never used.
2023-03-13 12:25:09 +01:00
Max Kellermann
984c9c317a
pcm/Normalizer: add noexcept
2023-03-13 12:25:09 +01:00
Max Kellermann
2d7068a09d
pcm/AudioCompress: convert to C++
2023-03-13 12:25:01 +01:00
Max Kellermann
d712c3b408
pcm/AudioCompress: fold config.h into compress.c
2023-03-13 11:55:44 +01:00
Max Kellermann
0a623122dc
pcm/AudioCompress: add SPDX header
2023-03-13 11:40:46 +01:00
Max Kellermann
68c36c0d3f
decoder/dsf: use PackedLE64 instead of DsdUint64
2023-03-12 20:27:05 +01:00
Max Kellermann
f3ebaf8bdd
util/ByteOrder: add class PackedLE64
2023-03-12 20:25:49 +01:00
Max Kellermann
c472046cbb
decoder/dsdiff: use PackedBE64 instead of DffDsdUint64
2023-03-12 20:22:50 +01:00
Max Kellermann
02296adbba
io/FileDescriptor: include cleanup
2023-03-12 20:18:13 +01:00
Max Kellermann
a375f0f160
io/BufferedReader: add method ReadFullT()
2023-03-12 20:15:41 +01:00
Max Kellermann
fb961e89da
util/StringCompare: add constexpr
2023-03-12 20:14:23 +01:00
Max Kellermann
3e2bff296f
event/SocketEvent: add method GetReadyFlags()
2023-03-12 20:12:15 +01:00
Max Kellermann
cf01db4d08
event/Chrono, ...: relicense to BSD-2
2023-03-12 20:02:54 +01:00
Max Kellermann
08dbb4a69a
event/BackendEvents: relicense to BSD-2
...
These headers contain only trivial integer constants and these are
probably not even copyrightable.
2023-03-12 19:53:03 +01:00
Max Kellermann
b5eff3cecd
decoder/plugin: kludge for Android NDK r25c
2023-03-12 19:53:03 +01:00
Max Kellermann
89d66b6100
decoder/ffmpeg: check for DST codec
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1756
2023-03-12 19:39:49 +01:00
Max Kellermann
c53ee41855
decoder/ffmpeg: check for DSD codec
...
DSD uses a generic demuxer, therefore it does not appear in the
demuxer list.
2023-03-12 19:37:09 +01:00
Max Kellermann
3c798b4907
decoder/ffmpeg: query supported demuxers at runtime
2023-03-12 19:37:09 +01:00
Max Kellermann
78a9c17bc6
decoder/plugin: add "suffixes" function
...
For decoder plugins like FFmpeg where the supported codecs cannot be
determined at compile time.
2023-03-12 09:17:38 +01:00
Max Kellermann
8b77da545d
*: use transparent comparison for std::{map,set} with std::string keys
...
This avoids many std::string temporaries for lookups.
2023-03-12 09:12:02 +01:00
Max Kellermann
27d3dcf14c
CommandLine: use libfmt
2023-03-12 09:02:21 +01:00
Max Kellermann
5388759bd5
db/proxy: require libmpdclient 2.15 or later
2023-03-10 13:45:37 +01:00
Max Kellermann
e927655774
db/proxy: require MPD 0.21 or later
2023-03-10 13:43:49 +01:00
Max Kellermann
3be8375e4f
subprojects/sqlite3.wrap: update to 3.41.0-1
2023-03-10 13:35:01 +01:00
Max Kellermann
27ba8c181f
pcm/SoxrResampler: require libsoxr 0.1.2 or later
2023-03-10 12:49:57 +01:00
Max Kellermann
1410bcbce9
lib/alsa: require alsa-lib 1.1 or later
2023-03-10 12:49:40 +01:00
Max Kellermann
43b26ee612
{de,en}coder/flac: remove obsolete FLAC_API_VERSION_CURRENT checks
...
We check the libFLAC version via pkg-config at configure time, no need
to do it again.
2023-03-10 12:43:19 +01:00
Max Kellermann
2c47357991
python/build/libs.py: update WildMidi to 0.4.5
2023-03-09 18:33:21 +01:00
Max Kellermann
7e2538e07a
decoder/sidplay: require libsidplayfp (drop support for the original sidplay)
...
The original sidplay project has been mostly unmaintained for nearly
12 years, and the most recent release was in 2016, while the
libsidplayfp project has been actively maintained all the time.
2023-03-09 18:27:05 +01:00
Max Kellermann
851fcf4823
decoder/gme: require GME 0.6 or later
...
This allows dropping a few compile-time version checks and we can use
pkg-config to detect the library.
2023-03-09 18:27:05 +01:00
Max Kellermann
63b9fb3d2b
event/meson.build: add missing dependency on libio.a
2023-03-09 18:27:05 +01:00
Max Kellermann
a79454f6a6
io/FileDescriptor: fold CreateSignalFD() into the SignalFD constructor
2023-03-09 18:04:58 +01:00
Max Kellermann
b5fbfe9aa6
io/FileDescriptor: fold CreateEventFD() into the EventFD constructor
2023-03-09 17:59:56 +01:00
Max Kellermann
598894211f
decoder/ffmpeg: require FFmpeg 4.0 or later
2023-03-08 20:32:35 +01:00
Max Kellermann
dbfd0a833d
io/meson.build: move sources to libio_fs.a
...
Only that one has a dependency on libfs.a (for class AllocatedPath
etc.).
2023-03-07 12:48:47 +01:00
Max Kellermann
d45994268f
system/PeriodClock: move to time/
2023-03-07 12:08:44 +01:00
Max Kellermann
815b248990
*/Registry: use constinit
2023-03-07 12:04:16 +01:00
Max Kellermann
333b36f090
output/Registry: add noexcept
2023-03-07 11:57:55 +01:00
Max Kellermann
b18ef61361
output/Registry: rename function
2023-03-07 11:57:36 +01:00
Max Kellermann
86ae45108c
output/Finish: fold into Filtered.cxx
2023-03-07 11:54:46 +01:00
Max Kellermann
5ef29c424d
output/meson.build: add liboutput_registry.a
2023-03-07 11:53:16 +01:00
Max Kellermann
c8dfb57408
output/meson.build: move OutputPlugin.cxx to liboutput_api.a
2023-03-07 11:52:32 +01:00
Max Kellermann
b773ef3f0f
win32/HResult: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
c8f54b3509
lib/pcre/UniqueRegex: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
00d5e6e9c7
lib/avahi/Publisher: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
1132a1c9a7
protocol/ArgParser: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
149d1a2f47
output/shout: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
17f2c0ae88
output/httpd: use libfmt
2023-03-06 20:10:06 +01:00
Max Kellermann
ce0b4d5c19
system/Error: remove unused function FormatSystemError()
2023-03-06 20:10:06 +01:00
Max Kellermann
0c102a8f2f
meson.build: add missing libfmt dependencies
2023-03-06 20:10:06 +01:00
Max Kellermann
415de497d3
use more libfmt instead of sprintf()
2023-03-06 19:50:53 +01:00
Max Kellermann
02d108774c
test/meson.build: add missing dependencies on libio.a
2023-03-06 19:50:52 +01:00
Max Kellermann
2c66d90626
fs/io: move to separate library
...
To eliminate the libio.a dependency.
2023-03-06 19:47:29 +01:00
Max Kellermann
e4cdf29951
fs/meson.build: make several dependencies internal
2023-03-06 19:44:34 +01:00
Max Kellermann
b5d224ce22
fs/{StandardDirectory,CheckFile}: move to fs/glue/
...
Distangle library dependencies.
2023-03-06 19:43:09 +01:00
Max Kellermann
c937a299f7
fs/Charset: assign fs_charset
...
This got lost 8 years ago in commit 87c88fcb27
D'oh!
2023-03-06 19:25:44 +01:00
Max Kellermann
6d4ec8b46f
fs/Charset: remove useless log message
2023-03-06 19:20:22 +01:00
Max Kellermann
941f2ca60d
pcm/{Traits,Dsd*}: use std::byte
2023-03-06 18:44:20 +01:00
Max Kellermann
7a1b996da9
pcm/Dsd2Pcm: use SampleTraits<SampleFormat::DSD>::SILENCE
2023-03-06 18:30:16 +01:00
Max Kellermann
302a571367
pcm/Buffer: use std::byte
2023-03-06 18:22:12 +01:00
Max Kellermann
ec195acf4f
pcm/Interleave: use std::byte
2023-03-06 18:22:10 +01:00
Max Kellermann
8f41e05a39
db/upnp/ContentDirectoryService: use fmt::format_int
2023-03-06 16:45:59 +01:00
Max Kellermann
35b6d65f27
util/Compiler.h: remove unused compiler version check macros
2023-03-06 16:37:46 +01:00
Max Kellermann
e602bcf41e
pcm/ReplayGainAnalyzer: remove GCC version checks, assume proper C++17 support
2023-03-06 16:37:45 +01:00
Max Kellermann
8c5ba50840
command/{file,storage}: remove stray "#pragma GCC diagnostic pop"
2023-03-06 16:37:45 +01:00
Max Kellermann
ff239fff4f
util/ByteOrder: check only __GNUC__
...
Assume GCC/clang is recent enough.
2023-03-06 16:37:45 +01:00
Max Kellermann
abdbaf605e
player/Thread, ...: assume [[fallthrough]] is supported
2023-03-06 16:29:55 +01:00
Max Kellermann
47b3577d6b
util/Compiler.h: remove unused macro gcc_printf
2023-03-06 16:27:47 +01:00
Max Kellermann
2ffc7c2088
io/BufferedOutputStream: remove unused method Format()
2023-03-06 16:27:28 +01:00
Max Kellermann
1f56960c44
util/FormatString: remove unused library
2023-03-06 16:24:51 +01:00
Max Kellermann
dfc5b4972b
output/httpd/IcyMetaDataServer: use libfmt
2023-03-06 16:23:43 +01:00
Max Kellermann
18c3c2118d
util/Compiler.h: remove unused macros
2023-03-06 16:14:30 +01:00
Max Kellermann
42f6a0441c
use [[gnu::...]] attributes
2023-03-06 16:14:15 +01:00
Max Kellermann
3b9aab0684
util/UTF8: fix indent
2023-03-06 16:12:09 +01:00
Max Kellermann
7a46c57ef3
tag/Type: require C++
2023-03-06 15:28:44 +01:00
Max Kellermann
118b76a8f1
db/Interface, ...: forward-declare TagType
2023-03-06 15:25:30 +01:00
Max Kellermann
a302d34f6d
tag/Names: convert to C++
2023-03-06 15:16:33 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
8ab2722300
python/build/meson.py: keep Meson from executing Android-x86 test binaries
2023-03-06 14:21:37 +01:00
Max Kellermann
bd25528ca3
python/build/meson.py: remove unused import
2023-03-06 14:17:44 +01:00
Max Kellermann
9f02d8978b
build/python/cmake: set CMAKE_C_FLAGS_INIT, not CMAKE_C_FLAGS
...
According to
https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS_INIT.html
the _INIT variables should be set in the toolchain file.
2023-03-06 14:15:57 +01:00
Max Kellermann
7e51d1dba0
build/python/cmake: set CMAKE_OSX_SYSROOT on macOS
2023-03-06 14:15:23 +01:00
Max Kellermann
4d4755352d
build/python/cmake: add "env" parameter
2023-03-06 14:13:08 +01:00
Max Kellermann
0360f79e6f
build/python/build/project.py: add "lazy" parameter to make_build_path()
2023-03-06 14:10:10 +01:00
Max Kellermann
6d8f92c185
build/python/build/project.py: raise exception on regex mismatch
2023-03-06 14:07:59 +01:00
Max Kellermann
c989327eb0
python/build/zlib.py: use autotools to be more portable
...
Right now, zlib is only built for Windows, but we may eventually
changed that, so don't hard-code `win32/Makefile.gcc`.
2023-03-06 13:48:40 +01:00
Max Kellermann
22eccaa64f
python/build/autotools.py: use toolchain.arflags
2023-03-06 13:33:11 +01:00
Max Kellermann
740cc8ce49
python/{cmake,autotools}: build in verbose mode
...
Make sure all the gory details are visible in CI logs.
2023-03-06 13:32:48 +01:00
Max Kellermann
70eafba0d4
python/build/autotools.py: dump config.log on configure error
...
For better error logs on CI.
2023-03-06 13:32:42 +01:00
Felix Hädicke
79fb9834d9
python/makeproject: do not use hard-code absolute path to make
2023-03-06 13:32:37 +01:00
Felix Hädicke
146db77025
python/makeproject: set appropriate build jobs count depending on the number of CPUs
2023-03-06 13:32:32 +01:00
Felix Hädicke
e6d607fef3
build/python: do not use absolute path for tar
2023-03-06 13:10:03 +01:00
Max Kellermann
ca46992d3e
build/python/build/project.py: lazy tarball extraction
2023-03-06 13:07:17 +01:00
Max Kellermann
c83ab0dc58
unix/SignalHandlers: shut down if parent process dies in --no-daemon mode
...
By default, if the parent of a process dies, the process gets SIGHUP
and is supposed to shut down. This however doesn't work for MPD,
because MPD redefines SIGHUP with a different meaning (like most
daemons do).
To work around this, we configure the kernel to send SIGTERM instead
of SIGHUP.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1706
2023-03-06 13:00:07 +01:00
Max Kellermann
d9952b9054
CommandLine: hard-code daemon=false if ENABLE_DAEMON is not set
2023-03-06 13:00:06 +01:00
Max Kellermann
04e60d67ae
command/playlist: allow range in "playlistmove"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1689
2023-03-06 12:01:45 +01:00
Max Kellermann
f4adbdbe31
python/build/libs.py: update FFmpeg to 6.0
2023-03-06 10:13:12 +01:00
Max Kellermann
484b820dfc
python/build/libs.py: disable more unused FFmpeg features
2023-03-06 10:06:39 +01:00
Max Kellermann
9bcba41cd6
Merge branch 'pipewire-lock' of https://github.com/ncfavier/MPD
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1753
2023-03-06 10:06:03 +01:00
Naïm Favier
eabc487e59
output/PipeWire: lock thread loop in SendTag
2023-03-06 10:03:14 +01:00
Max Kellermann
5c5e522fcd
output/jack: remove DLL support
...
This effectively reverts commit 0f02bbc2fe which was a horrible
kludge for JACK support on Windows. Maintaining this kludge doesn't
seem worth the trouble (the JACK version was never updated), and
apparently nobody uses this.
2023-03-06 08:10:00 +01:00
Max Kellermann
f687028c87
output/PipeWire: use class StaticVector
2023-03-06 08:09:07 +01:00
Max Kellermann
05f0b9c29c
python/build/libs.py: update CURL to 7.88.1
2023-03-06 07:56:08 +01:00
Max Kellermann
4a8ec20858
python/build/libs.py: update OpenSSL to 3.0.8
2023-03-06 07:56:08 +01:00
Max Kellermann
c5e36a7dd8
subprojects: update expat to 2.5.0-2
2023-03-06 07:51:02 +01:00
Max Kellermann
d5fafa1340
output/PipeWire: map tags "Date" and "Comment"
2023-03-06 07:48:25 +01:00
Max Kellermann
e8994b43a0
output/PipeWire: convert tag mapping to array
2023-03-06 07:44:06 +01:00
Max Kellermann
6ada2c9c3f
lib/curl/Request: add method GetEasy()
2023-03-05 08:50:39 +01:00
Max Kellermann
bbf190fc42
lib/curl/Multi: add noexcept
2023-03-05 08:49:20 +01:00
Max Kellermann
963ff1997d
lib/curl/Easy: add methods SetXferInfoFunction(), SetMimePost()
2023-03-05 08:47:40 +01:00
Max Kellermann
5c2a576546
io/BufferedReader: add missing include
2023-03-05 08:43:41 +01:00
Max Kellermann
452400b7ef
net/SocketAddress: remove __cpp_lib_span checks
2023-03-05 08:41:33 +01:00
Moviuro
20a5276560
doc/mpd.1.rst: add documentation for --systemd
...
This switch was introduced in ce77b148d9
2023-03-01 09:55:27 +01:00
Max Kellermann
c94eee6199
Merge branch 'master' of https://github.com/lerenwe/MPD-Windows-With-Libsample
2023-02-23 14:44:06 +01:00
Sweet Blue
2a75222fe2
Added libsamplerate to win32 build script
2023-02-23 14:26:32 +01:00
Sweet Blue
7d9d173c9f
Updated libs.py to integrate libsamplerate 0.2.2
2023-02-23 14:25:11 +01:00
Dave Hocker
f248fe2dec
Resolve deprecation warnings by replacing use of sprintf with FmtBuffer
2023-02-06 11:56:49 +01:00
Brad Smith
e0df0b6d74
oss: Remove use of the soundcard.h header, OpenBSD no longer uses OSS
2023-02-03 18:38:20 -05:00
Sean DuBois
a41414e0e0
Decoder/FluidSynth: Allow gain to be adjusted
2023-02-01 12:00:19 -05:00
Max Kellermann
f1cea1f152
util/IntrusiveHashSet: add unlink(), is_linked()
2023-01-31 13:07:26 +01:00
Max Kellermann
02f5698868
event/Loop: remove unnecessary include
...
Not used since a3b32819b1
2023-01-31 13:04:25 +01:00
Bryan Waite
e25816fc05
Provide alternative ways to check for
...
https://superuser.com/questions/287371/obtain-kernel-config-from-currently-running-linux-system/287372#287372
2023-01-31 08:21:39 +00:00
Max Kellermann
5b07c8fc6c
util/CharUtil: add IsLowerAlphaNumericASCII()
2023-01-29 09:39:40 +01:00
Max Kellermann
b45afd1cab
util/StringBuffer: add constexpr
2023-01-29 09:38:40 +01:00
Max Kellermann
8b73257a86
storage/meson.build: move MemoryDirectoryReader.cxx to storage_api.a
...
This library is required by the plugins, so this fixes a dependency issue.
2023-01-29 08:21:58 +01:00
Max Kellermann
def6fffcf1
event/Loop: fixup for NO_FINE_TIMER_EVENT
2023-01-29 08:07:03 +01:00
Max Kellermann
78b13577ef
test/net/TestIPv[46]Address: add more tests
2023-01-28 08:15:41 +01:00
Max Kellermann
1f5d50ccce
lib/curl/Setup: include cleanup
2023-01-28 08:06:10 +01:00
Max Kellermann
ebf65572dd
util/ByteOrder: remove unnecessary operator=
...
The compiler can just use the uint32_t constructor instead. This was
redundant code.
2023-01-28 07:48:03 +01:00
Max Kellermann
c30c293d6f
input/async: check for errors in Seek()
...
Fixes a busy loop in BufferingInputStream::RunThreadLocked() because
the method never learns that seeking is ignored, even though the HTTP
stream is already broken and can never be read; nobody cared to check
for errors.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1727
2023-01-28 07:44:59 +01:00
Max Kellermann
9ee1be6fba
command/database: add missing include for UINT_MAX
2023-01-23 15:50:49 +01:00
Max Kellermann
76177dbc79
win32/HResult: use [[gnu::const]]
2023-01-23 15:35:36 +01:00
Max Kellermann
6cc532c9a0
win32/HResult: remove unused function FormatHResultError()
2023-01-23 15:35:36 +01:00
Max Kellermann
3cc770a00b
remove obsolete Boost dependency
...
Boost makes building a piece of software much more difficult than
necessary. It's a huge library, and just uncompressing it takes a
considerable amount of time. MPD only used a tiny fraction of it, yet
its header bloat made the MPD build very slow. Locating Boost was
difficult due to its arcane build system and its resistance to use
pkg-config; it's always a special case. MPD could never use features
of newer Boost versions because Linux distributions always shipped old
Boost versions. Boost made everything complicated and slow.
So, finally, after getting rid of GLib (commit ccdb94b06c ), switching
to C++ and using Boost (commit 0801b3f495 ), we've finally get rid of
it 8 years later.
Unfortunately, I had to reimplement parts of it along the way
(e.g. IntrusiveList). Kind of NIH, but on the other hand, compiling
MPD has become much easier for users.
2023-01-23 15:06:58 +01:00
Max Kellermann
7ef0bfbdf1
event/meson.build: disable Boost
2023-01-23 14:58:38 +01:00
Max Kellermann
bafde1900b
lib/nfs/Manager: use IntrusiveList instead of boost::intrusive::set
...
MPD usually has only one NFS connection, maybe two, so managing them
in a tree seems like overkill, and since we want to get rid of Boost
anyway...
2023-01-23 14:58:09 +01:00
Max Kellermann
5844242cfb
input/cache/Manager: use IntrusiveHashSet instead of boost::intrusive::set
2023-01-23 14:19:22 +01:00
Max Kellermann
7e7cdf73b9
input/InputStream: add method GetUriView()
2023-01-23 14:15:18 +01:00
Max Kellermann
5ca74acd8d
input/InputStream: allow emplacing the URI
2023-01-23 14:15:18 +01:00
Max Kellermann
cd2aaac0c2
output/osx: fix typo
2023-01-23 14:15:18 +01:00
Max Kellermann
ff8a7225fc
output/osx: change type to std::size_t to fix -Wc++11-narrowing
2023-01-23 14:06:56 +01:00
Max Kellermann
c6eac285ea
test/util/TestRingBuffer: add "U" literal suffix to work around -Wsign-compare
2023-01-23 14:05:55 +01:00
Max Kellermann
d0be122fc6
output/osx: use class RingBuffer instead of boost::lockfree::spsc_queue
2023-01-23 13:55:50 +01:00
Max Kellermann
01e5a7b1b5
output/wasapi: use class RingBuffer instead of boost::lockfree::spsc_queue
2023-01-23 13:44:54 +01:00
Max Kellermann
0b42018377
output/PipeWire: use class RingBuffer instead of boost::lockfree::spsc_queue
2023-01-23 13:44:54 +01:00
Max Kellermann
7cb6c70bc2
output/alsa: use class RingBuffer instead of boost::lockfree::spsc_queue
2023-01-23 13:44:54 +01:00
Max Kellermann
f31ae7c556
util/RingBuffer: replacement for boost::lockfree::spsc_queue
2023-01-23 13:44:54 +01:00
Max Kellermann
5728c514d1
output/wasapi: use std::hardware_destructive_interference_size
2023-01-23 13:44:53 +01:00
Max Kellermann
debac0dfd4
win32/ComWorker: use std::queue/Mutex/Cond instead of boost::lockfree::spsc_queue/WinEvent
2023-01-23 13:25:07 +01:00
Max Kellermann
80b1f49af7
lib/dbus/AppendIter: add missing include
2023-01-22 12:29:54 +01:00
Max Kellermann
868958e159
util/IntrusiveHashSet: fix find_if() concept
2023-01-22 12:25:55 +01:00
Max Kellermann
52af03a5a6
util/IntrusiveHashSet: implement remove_and_dispose_if() with constant_time_size
2023-01-22 12:24:50 +01:00
Max Kellermann
7475e971bc
util/IntrusiveList: remove_and_dispose_if() returns the number of removed items
2023-01-22 12:24:43 +01:00
Max Kellermann
c65b1fee8d
util/IntrusiveHashSet: check key equivalence in remove_and_dispose_if()
2023-01-22 12:24:41 +01:00
Max Kellermann
e2abade6aa
util/IntrusiveList: add postfix operator++
2023-01-22 12:24:33 +01:00
Max Kellermann
57673136d8
util/IntrusiveHashSet: add method expire_find_if()
2023-01-22 12:24:30 +01:00
Max Kellermann
49e122a81d
util/IntrusiveHashSet: add method remove_and_dispose_if(key)
2023-01-22 12:24:23 +01:00
Max Kellermann
74976d3199
event: make FineTimerEvent optional
...
Several applications don't need it, so let's eliminate the code from
the executable.
2023-01-22 12:21:46 +01:00
Max Kellermann
a750e4afa7
event/Loop: move code to GetEarlierTimeout()
2023-01-22 12:19:07 +01:00
Max Kellermann
c122e990a3
Merge branch 'master' of https://github.com/faceless2/MPD
2023-01-17 19:03:49 +01:00
Max Kellermann
b1422fbda4
Merge tag 'v0.23.12'
...
release v0.23.12
2023-01-17 18:58:04 +01:00
Max Kellermann
d91da96798
release v0.23.12
2023-01-17 18:54:47 +01:00
Max Kellermann
b3897df682
decoder/mad: add assert()
2023-01-17 18:53:18 +01:00
Max Kellermann
3cacb56bb7
fs/StandardDirectory: don't fall back to getpwuid() without $HOME
...
If the environment variable $HOME does not exist, don't attempt to
obtain it from /etc/passwd; without $HOME, the calling process
indicates that it does not wish MPD to access the home directory.
This also prevents MPD from attempting to load
`/root/.config/mpd/mpd.conf` if MPD got started as global systemd
service. Reading from there makes no sense, only /etc/mpd.conf shall
be used then.
This piece of code was initially added by commit 5d85792178 .
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1687
2023-01-17 18:51:49 +01:00
Max Kellermann
15a1973e28
decoder/mad: fix integer underflow with very small files
...
When drop_start_samples and drop_end_samples overlap and are greater
than the actual number of samples, the `num_samples` calculation in
SubmitPCM() could underflow.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1712
2023-01-17 17:41:37 +01:00
Max Kellermann
ad7d47a8ba
output/PipeWire: use PW_KEY_TARGET_OBJECT with PipeWire 0.3.64
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1721
2023-01-17 11:50:09 +01:00
Max Kellermann
0948c607b6
lib/curl/meson.build: require CURL 7.55.0 or later
...
For CURLINFO_CONTENT_LENGTH_DOWNLOAD_T (commit 4efd0a9f77 ).
2023-01-16 19:42:48 +01:00
Max Kellermann
60d04052c5
NEWS: mention the GCC13 fixes
2023-01-16 19:41:37 +01:00
Max Kellermann
c1780ac657
python/build/libs.py: update CURL to 7.87.0
2023-01-16 19:06:08 +01:00
Max Kellermann
e49cf0ec38
python/build/libs.py: update Boost to 1.81.0
2023-01-16 19:03:50 +01:00
Mike Bremford
b96e44b362
Unlike album, artist and albumartist, title and composer were not used as a fallback
...
when titlesort and composersort were specified but unavailable - this patch fixes that.
2023-01-09 18:15:44 +00:00
Max Kellermann
8a7b7dffec
Merge branch 'v0.23.x'
2023-01-06 08:12:38 +01:00
latex
7774e78864
openmpt: add at_end option
2023-01-06 03:18:36 +01:00
Max Kellermann
e1d641f684
lib/curl/Easy: drop deprecated CURLOPT_HTTPPOST wrapper
2023-01-02 14:29:17 +01:00
Max Kellermann
4efd0a9f77
lib/curl/Easy: use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
...
CURLINFO_CONTENT_LENGTH_DOWNLOAD is deprecated and is ugly because it
uses floating point.
2023-01-02 14:28:42 +01:00
Max Kellermann
f6f8751332
io/FileReader: add missing include for uint64_t
2023-01-02 14:27:47 +01:00
gd
abb28593ce
TagBuilder::RemoveType: added missing tag pool lock before call to tag_pool_put_item
2022-12-29 08:43:10 +01:00
Max Kellermann
115693b046
increment version number to 0.23.12
2022-12-29 08:42:02 +01:00
Max Kellermann
d7de8b1453
Merge branch 'iss-1546' of https://github.com/sp1ff/MPD
2022-12-29 08:37:25 +01:00
Max Kellermann
3242943cd1
doc/protocol.rst: fix reference target
2022-12-18 08:30:25 +01:00
Mike Bremford
6adff85fd6
Added "searchcount" command, a case-insensitive "count"
...
The `count` command isn't case-insensitive. This adds `searchcount`
which is a case-insensitive version of `count`.
2022-12-18 08:29:14 +01:00
Alex
8b1ff3f005
build: harden build.yml permissions
...
This PR adds explicit [permissions section](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions ) to workflows. This is a security best practice because by default workflows run with [extended set of permissions](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token ) (except from `on: pull_request` [from external forks](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ )). By specifying any permission explicitly all others are set to none. By using the principle of least privilege the damage a compromised workflow can do (because of an [injection](https://securitylab.github.com/research/github-actions-untrusted-input/ ) or compromised third party tool or action) is restricted.
It is recommended to have [most strict permissions on the top level](https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions ) and grant write permissions on [job level](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs ) case by case.
Signed-off-by: Alex <aleksandrosansan@gmail.com >
2022-12-09 11:28:26 +01:00
Max Kellermann
756621c6e4
neighbor/meson.build: add missing dependency on libfmt
2022-12-01 15:57:28 +01:00
Max Kellermann
7e2ab1fd53
lib/yajl/meson.build: add missing dependency on libfmt
2022-12-01 15:50:34 +01:00
Max Kellermann
c7a0597fe7
util/Intrusive*: add C++20 concept checks
2022-12-01 15:43:51 +01:00
Max Kellermann
253d551684
lib/dbus/meson.build: add missing dependency on libfmt
2022-12-01 15:43:51 +01:00
Max Kellermann
00b7535cf1
util/Concepts: compatibility wrapper for std::predicate
2022-12-01 15:11:27 +01:00
Max Kellermann
5945877313
util/IntrusiveHashSet: add missing Cast()/ToHook() functions to IntrusiveHashSetMemberHookTraits
2022-12-01 15:10:42 +01:00
Max Kellermann
fe3e1d31bf
util/IntrusiveHashSet: remove unused type alias "ListHookTraits"
2022-12-01 15:10:38 +01:00
Max Kellermann
65f1cafa43
util/IntrusiveHashSet: add method find_if()
2022-12-01 15:10:32 +01:00
Max Kellermann
d9b1f2fefa
net/SocketAddress: add method HasPort()
2022-12-01 15:10:25 +01:00
Max Kellermann
e3ef0929f1
util/IntrusiveHashSet: add const overloads
2022-12-01 15:10:20 +01:00
Max Kellermann
8860962e09
util/IntrusiveHashSet: make several methods const
2022-12-01 15:10:13 +01:00
Max Kellermann
f13b8f669d
util/IntrusiveList: simplify ToHook() overload with const_cast
2022-12-01 15:10:09 +01:00
Đoàn Trần Công Danh
e4b055eb6d
v0.23.x: RemoteTagCache: add missing include
...
Fix build with Boost 1.81.0. `<array>` was included by one of those boost headers,
however, it's no longer included as of Boost 1.81.0.
`master` doesn't use `std::array` in this file.
While we're at it, add all necessary inclusion files.
2022-12-01 08:29:23 +07:00
Max Kellermann
fa58db798b
lib/fmt/RuntimeError: new library
...
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
Max Kellermann
45b13fc2a6
util/OptionParser: move to cmdline/
...
This library will depend on libfmt, and libutil shouldn't depend on
any library.
2022-11-29 11:32:16 +01:00
Max Kellermann
cf3f3a7750
lib/pulse/Error: use std::system_error
2022-11-29 09:56:47 +01:00
Max Kellermann
e455b93fac
lib/nfs/Connection: use class NfsClientError
2022-11-29 09:45:25 +01:00
Max Kellermann
cf762f2a9d
lib/icu/Error: std::system_error with UErrorCode
2022-11-29 09:31:48 +01:00
Max Kellermann
8ad0d919b1
lib/icuConverter, ...: use FmtBuffer() and FmtErrno()
2022-11-29 09:09:11 +01:00
Max Kellermann
4b5c8d1f3e
mixer/meson.build: split libmixer_api from libmixer_glue
2022-11-29 09:09:11 +01:00
Max Kellermann
eb6c649d47
lib/fmt/SystemError: add concept check to work around ambiguous overloads
2022-11-29 09:09:10 +01:00
Max Kellermann
f2b025ca6c
lib/alsa/meson.build: add dependency on libpcm_basic
...
For PcmExport::CalcInputSampleRate().
2022-11-29 09:09:10 +01:00
Max Kellermann
4328a6f77d
lib/fmt/ToBuffer: fix FMT_VERSION check
2022-11-29 09:09:10 +01:00
Max Kellermann
97a6851525
lib/curl/Error: std::system_error with CURLcode
2022-11-29 06:33:32 +01:00
Max Kellermann
846d7dc317
lib/curl/Error: rename header to HttpStatusError.hxx
2022-11-29 06:33:32 +01:00
Max Kellermann
f62d61f088
lib/fmt/ToBuffer: add missing template parameters
2022-11-29 06:33:32 +01:00
Max Kellermann
1f33ac3e98
lib/upnp/Error: wrap libupnp errors in std::system_error
2022-11-29 00:32:48 +01:00
Max Kellermann
ed08a4bd58
lib/fmt/ToBuffer: use iterator instead of pointer
2022-11-28 23:10:25 +01:00
Max Kellermann
40d0828ccd
util/StringBuffer: add non-const iterator
2022-11-28 23:10:01 +01:00
Max Kellermann
66029c405f
system/FmtError: move to lib/fmt/
2022-11-28 23:09:27 +01:00
Max Kellermann
7d8c076e06
lib/fmt/ToBuffer: include fmt/format.h on libfmt 7 to fix linker error
2022-11-28 23:03:52 +01:00
Max Kellermann
05dcac55f9
lib/fmt: add meson.build
2022-11-28 22:18:46 +01:00
Max Kellermann
2aa42d2647
lib/fmt/ToBuffer: new library
2022-11-28 22:18:46 +01:00
Max Kellermann
dc8e0c9c5c
archive/zzip: add missing include
2022-11-28 22:18:45 +01:00
Max Kellermann
96ae659fdf
system/FmtError: new library
...
Replaces the Format*() functions in system/Error.hxx.
2022-11-28 21:56:12 +01:00
Max Kellermann
124e75c286
thread/Thread, fs: add missing WIN32 includes
2022-11-28 21:56:11 +01:00
Max Kellermann
25da798e7a
system/Clock: compile only on Windows
2022-11-28 21:16:49 +01:00
Max Kellermann
88d5347d94
Log, client/Response, io/BufferedOutputStream: remove unnecessary libfmt include
2022-11-28 20:44:48 +01:00
Max Kellermann
7f3868727b
Log, client/Response, io/BufferedOutputStream: drop support for libfmt < 7
...
Remove some compatibility code.
2022-11-28 20:17:16 +01:00
Max Kellermann
b09a776a26
.travis.yml: remove obsolete file
...
We've migrated to GitHub actions in commit
c13911b171 a year ago
2022-11-28 20:17:16 +01:00
Max Kellermann
3103e8d719
fs/StandardDirectory: update #ifdef for GetEnvPath()
...
Fixes regression from a38eabc8bc
2022-11-28 20:17:16 +01:00
Max Kellermann
cfbd751742
fs/StandardDirectory: pass Path to IsValidDir()
2022-11-28 18:48:10 +01:00
Max Kellermann
a38eabc8bc
fs/StandardDirectory: move code to GetExistingEnvDirectory()
2022-11-28 18:43:45 +01:00
Max Kellermann
9669ea6a12
fs/StandardDirectory: add noexcept
2022-11-28 18:27:06 +01:00
Max Kellermann
863a28daa3
fs/StandardDirectory: eliminate global variable "home_prefix"
2022-11-28 18:27:06 +01:00
Max Kellermann
ea5bcfed8b
fs/StandardDirectory: pass std::string_view to ParseConfigLine()
2022-11-28 17:11:17 +01:00
Max Kellermann
f6f3c4c25b
fs/StandardDirectory: pass const string to ParseConfigLine()
2022-11-28 17:07:29 +01:00
Max Kellermann
8fe29f5728
Merge tag 'v0.23.11'
...
release v0.23.11
2022-11-28 17:00:38 +01:00
Max Kellermann
9866adff95
release v0.23.11
2022-11-28 16:55:46 +01:00
Max Kellermann
a8b0c55818
input/curl: make proxy verify setting optional
...
These settings do not work if CURL was compiled with
CURL_DISABLE_PROXY, and cause error "An unknown option was passed in
to libcurl".
Fixes regression by commit 7ab0dfc8ce
2022-11-28 16:14:01 +01:00
Max Kellermann
cac88e8be5
python/build/libs.py: re-enable verbose error strings
...
This compile-time option is not about debug logging, but about
curl_easy_strerror().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1670
2022-11-28 16:12:17 +01:00
Max Kellermann
e9f6a3482c
db/Configured: add default "cache_directory" setting
2022-11-28 14:24:52 +01:00
Max Kellermann
5d2e80f188
db/Configured: use GetAppCacheDir() instead of GetUserCacheDir()
2022-11-28 14:20:15 +01:00
Max Kellermann
cfd4d5b13e
StateFileConfig: use GetAppCacheDir() instead of GetUserCacheDir()
2022-11-28 14:20:14 +01:00
Max Kellermann
06514aec63
fs/StandardDirectory: add GetAppCacheDir()
2022-11-28 14:19:30 +01:00
Max Kellermann
4ded1ae67b
fs/FileSystem: add CreateDirectoryNoThrow()
2022-11-28 14:19:08 +01:00
Max Kellermann
1da974e3fa
fs/StandardDirectory: use PACKAGE_NAME from version.h
2022-11-28 14:05:34 +01:00
Max Kellermann
94f06f0946
fs/StandardDirectory: use mode=0777 in mkdir() call
...
Of course, mode=0700 is more secure, but allowing other users access
to new directories is a choice the user should make via umask(). If
the user-chosen umask allows everybody access, MPD should probably
respect that.
2022-11-28 14:04:47 +01:00
Max Kellermann
d9eec8a455
fs/StandardDirectory: do not use $RUNTIME_DIRECTORY on Android
...
This is systemd specific, and Android doesn't have systemd.
2022-11-28 10:44:50 +01:00
Max Kellermann
eaecbcafb2
PlaylistFile: disallow backslash in playlist names on Windows
...
The function spl_valid_name() should verify playlist names and prevent
path traversal, but it failed to do so on Windows, because it forgot
to check for backslashes.
This buggy piece of code was already present when stored playlists
were initially implemented in 2006 by commit 08003904d7 , and
even during the many rounds of code refactoring, nobody ever bothered
to verify it. D'oh!
(Thanks, Paul Arzelier)
2022-11-28 09:53:49 +01:00
Max Kellermann
73b5d0a9b9
system/Error: truncate the snprintf() return value
...
snprintf() does not return the (truncated) length actually written,
but the length that would be needed if the buffer were large enough.
This API usage mistake in FormatLastError() can lead to overflow of
the stack buffer, crashing the process (Windows only).
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1676
2022-11-28 09:42:37 +01:00
Michael Herstine
1adc2c0c51
playlist_load_into_queue: log on failure to load song.
...
Log at level error when failing to load a song. Limit the number
of log messages produced to avoid flooding the log file when attempting
to load a large, broken playlist.
Closes #1546
2022-11-26 08:28:10 -08:00
Max Kellermann
a3b32819b1
event/Loop: split InjectBreak() from Break()
2022-11-22 22:30:12 +01:00
Max Kellermann
a57cf443ed
event/Loop: set "again" in AddDefer() only if HAVE_THREADED_EVENT_LOOP
...
Only AddDefer()/AddIdle() calls from within DeferEvents are relevant.
2022-11-22 21:40:52 +01:00
Max Kellermann
d0d095cbcd
util/IntrusiveHashSet: rename "slot" to "bucket"
2022-11-22 21:40:52 +01:00
Max Kellermann
3239fce5c1
util/IntrusiveHashSet: add remove_and_dispose_if()
2022-11-22 21:40:11 +01:00
Max Kellermann
200b770104
util/IntrusiveHashSet: add for_each()
2022-11-22 21:40:04 +01:00
Max Kellermann
3aa959eda7
util/IntrusiveHashSet: add erase_and_dispose()
2022-11-22 21:39:40 +01:00
Max Kellermann
72c047f4f0
util/IntrusiveHashSet: add hash_function(), key_eq()
2022-11-21 09:10:44 +01:00
Max Kellermann
c71958af4b
input/async: pass std::span to AppendToBuffer()
2022-11-17 06:15:58 +01:00
Max Kellermann
ce13d82657
input/async: use std::byte instead of uint8_t
2022-11-17 06:15:19 +01:00
Max Kellermann
73dc8ff6bd
lib/nfs/FileReader: pass std::span to OnNfsFileRead()
2022-11-17 06:15:16 +01:00
Max Kellermann
3278ad2ed8
storage/State: remove obsolete Boost compiler warning workaround
2022-11-17 05:32:29 +01:00
Max Kellermann
2e453ef58a
storage/State: use std::hash() instead of boost::crc
...
Also eliminate the useless std::set.
2022-11-17 05:28:53 +01:00
Max Kellermann
a5d04be21f
storage/State: add noexcept
2022-11-17 05:19:11 +01:00
Max Kellermann
9467df526c
song/StringFilter: add enum Position
...
Replaces two conflicting bools.
2022-11-15 21:55:55 +01:00
Max Kellermann
9ca75589c0
song/StringFilter: simplify GetOperator()
2022-11-15 21:55:55 +01:00
Max Kellermann
c158abe87c
lib/icu/Compare: use StringIsEqualIgnoreCase()
2022-11-15 21:13:01 +01:00
Max Kellermann
53530bd1d5
lib/icu/Canonicalize: convert all punctuation to ASCII
...
To make tag matching easier.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1669
2022-11-15 21:04:16 +01:00
Max Kellermann
d7f545721b
lib/icu/Canonicalize: use unorm2_normalize() instead of u_strFoldCase()
...
unorm2_normalize() can case-fold as well, plus it applies Unicode
normalization which MPD should do for proper string comparisons.
2022-11-15 20:53:29 +01:00
Max Kellermann
8b72cb64b2
lib/icu/CaseFold: rename to IcuCanonicalize() and add flag parameter
...
Prepare for adding more transformations.
2022-11-15 20:53:04 +01:00
Max Kellermann
852df2239e
lib/icu/Transliterator: pass std::basic_string_view<UChar> to constructor
2022-11-15 20:53:03 +01:00
Max Kellermann
5a1fbe60af
test/TestStringFilter: new unit test
2022-11-15 20:52:53 +01:00
Max Kellermann
88e33b7b32
test/TestTagSongFilter: initialize ICU
2022-11-15 20:51:59 +01:00
Max Kellermann
264b3f8543
lib/icu/Collate: clear the global variable in IcuCollateFinish()
...
To allow repeated init/finish cycles.
2022-11-15 20:48:50 +01:00
Max Kellermann
ac2bce8b7b
lib/icu/Transliterator: add missing include
2022-11-15 17:07:54 +01:00
Max Kellermann
9f3faaf3c4
lib/icu/Transliterator: wrapper for UTransliterator
2022-11-15 01:09:27 +01:00
Max Kellermann
7be39e07e1
lib/icu/Normalize: wrapper for unorm2_normalize()
2022-11-15 00:49:25 +01:00
Max Kellermann
154fb4317f
lib/icu/CaseFold: move low-level wrapper to FoldCase.cxx
2022-11-15 00:46:58 +01:00
Max Kellermann
aad5210820
lib/icu/CaseFold: use ToStringView()
2022-11-15 00:36:47 +01:00
Max Kellermann
7c4fca0ae1
util/SpanCast: add ToStringView() template
2022-11-15 00:36:28 +01:00
Max Kellermann
1a6ec716ef
lib/icu/Converter: add noexcept
2022-11-15 00:28:41 +01:00
Max Kellermann
0b22cc962d
Merge branch 'private_users' of https://github.com/bluca/MPD
2022-11-14 23:53:43 +01:00
Max Kellermann
51769c40d8
util/IntrusiveSortedList: new class
2022-11-13 09:08:36 +01:00
Max Kellermann
85ab89a08b
util/IntrusiveHashSet: add missing typename (to make clang happy)
2022-11-13 08:40:53 +01:00
Max Kellermann
a43062c575
RemoteTagCache: use IntrusiveHashSet instead of boost::intrusive::unordered_set
2022-11-13 08:39:04 +01:00
Max Kellermann
c943e27d51
util/IntrusiveHashSet: new class
...
Incomplete draft implementation, just enough methods for current
needs.
2022-11-13 08:38:53 +01:00
Max Kellermann
fb5d77158a
util/IntrusiveList: add enum LinkMode
...
Compile-time code simplification.
2022-11-13 08:15:47 +01:00
Max Kellermann
3023816491
subprojects/.gitignore: ignore liburing
2022-11-12 12:40:44 +01:00
Max Kellermann
51e17e89f4
subprojects: add liburing.wrap
2022-11-12 12:30:13 +01:00
Max Kellermann
98c24d1a32
Merge branch 'v0.23.x'
2022-11-12 12:29:21 +01:00
Max Kellermann
c2d0f35e7a
storage/meson.build: move StorageState.cxx to "mpd" executable
...
Fixes spurious linker errors.
2022-11-12 12:24:48 +01:00
Max Kellermann
ab99a57997
test/meson.build: reduce test_translate_song. dependencies
2022-11-12 12:17:35 +01:00
Max Kellermann
c8ebaf3521
python/build/meson.py: use "meson setup" instead of the deprecated syntax
2022-11-12 12:10:06 +01:00
Max Kellermann
f1dc1af85d
util/IntrusiveList: use const_cast to eliminate duplicate HookTraits functions
...
I hate const_cast, but what I hate more is duplicate code. Sigh.
2022-11-12 08:45:24 +01:00
Max Kellermann
7b3d870516
util/IntrusiveForwardList: remove unnecessary initializer from hook
2022-11-11 21:14:52 +01:00
Max Kellermann
963ff846ff
test/util/TestIntrusiveForwardList: new unit test
2022-11-11 21:13:41 +01:00
Max Kellermann
48c4081ba1
test/util/TestIntrusiveList: remove unused code
2022-11-11 21:11:22 +01:00
Max Kellermann
970ccf043b
util/SortList: enable the std::predicate kludge for macOS as well
...
Sigh.
2022-11-11 19:30:58 +01:00
Max Kellermann
0c92c12adf
Merge branch 'v0.23.x'
2022-11-11 19:27:22 +01:00
Max Kellermann
52d00f7e30
subprojects: update fmt to 9.1.0
2022-11-11 19:22:39 +01:00
Max Kellermann
309491a6d8
subprojects: update expat to 2.5.0
2022-11-11 19:22:30 +01:00
Max Kellermann
29143dec87
util/SortList: kludge for Android NDK compatibility
2022-11-11 19:17:13 +01:00
Max Kellermann
0fd4c14043
db/simple/Directory: re-add Song.hxx to fix clang build failure
2022-11-11 19:13:01 +01:00
Max Kellermann
81e1f87e8c
db/simple/{Directory,Song}: use IntrusiveList instead of boost::intrusive::list
2022-11-11 19:08:22 +01:00
Max Kellermann
a448d04d46
util/SortList: library which sorts linked lists
2022-11-11 19:03:39 +01:00
Max Kellermann
60e640af5a
util/IntrusiveList: add single-item splice() overload
2022-11-11 18:29:50 +01:00
Max Kellermann
df15c418c7
util/IntrusiveList: fix swap() implementation if second list is empty
2022-11-11 18:29:50 +01:00
Max Kellermann
04ab8ae27b
util/IntrusiveList: add type aliases value_type, pointer, reference
2022-11-11 17:15:20 +01:00
Max Kellermann
b4a64af15e
util/IntrusiveList: constant_time_size is a template argument, not a variable
2022-11-11 17:15:16 +01:00
Max Kellermann
1ccfd1fb67
test/util/TestIntrusiveList: simplify tests
2022-11-11 16:41:24 +01:00
Max Kellermann
838c057231
util/IntrusiveList: use auto
...
Fixes typos in the const_iterator return types, and fixes returning
references to stack values.
2022-11-11 16:33:49 +01:00
Max Kellermann
af544bb16f
util/IntrusiveList: fix typos
2022-11-11 10:11:42 +01:00
Max Kellermann
84fd401d21
util/IntrusiveList: add method splice()
2022-11-11 10:05:20 +01:00
Max Kellermann
b78d6c9dd7
test/util/TestIntrusiveList: add tests for reverse iterators
2022-11-11 09:53:00 +01:00
Max Kellermann
b5d224496f
util/IntrusiveList: iterators are bidirectional
2022-11-11 09:20:09 +01:00
Max Kellermann
78d8b5f73c
util/OptionalCounter: add operator+= and operator-=
2022-11-10 16:55:04 +01:00
Max Kellermann
5670d98c54
util/IntrusiveList: move code to IntrusiveListNode::Connect()
2022-11-10 16:52:34 +01:00
gd
440c676be2
EventLoop: added assert(IsInside()) in Insert(CoarseTimerEvent &) and AddIdle(DeferEvent &)
...
Like AddDefer(DeferEvent &), Insert(FineTimerEvent &), these methods don't lock to update EventLoop::again
2022-11-10 15:35:14 +01:00
Max Kellermann
e820222c5b
lib/nfs/Manager: use IntrusiveForwardList instead of boost::intrusive::slist
2022-11-10 12:08:23 +01:00
Max Kellermann
1786eef8e6
util/IntrusiveForwardList: new class
2022-11-10 12:07:59 +01:00
Max Kellermann
5f2fa1dbe3
RemoteTagCache: use IntrusiveList instead of boost::intrusive::list
2022-11-10 12:06:00 +01:00
Max Kellermann
77d257de27
input/cache: use IntrusiveList instead of boost::intrusive::list
2022-11-10 12:05:09 +01:00
Max Kellermann
89d950e9a7
output/httpd: use IntrusiveList instead of boost::intrusive::list
2022-11-10 12:02:54 +01:00
Max Kellermann
4041d87c34
lib/nfs/Cancellable: use IntrusiveList instead of boost::intrusive::list
2022-11-10 12:01:11 +01:00
Max Kellermann
b3c5e6a3cc
event/Loop: use IntrusiveList instead of boost::intrusive::list
2022-11-10 11:57:57 +01:00
Max Kellermann
1da8faa285
client/List: use IntrusiveList instead of boost::intrusive::list
2022-11-10 11:08:11 +01:00
Max Kellermann
988f5d1b5d
util/StringSplit: add SplitWhile()
2022-11-09 19:23:19 +01:00
Max Kellermann
3ab3d5555e
util/StringSplit: reimplement without std::distance()
...
Avoid including <iterator>.
2022-11-09 19:23:10 +01:00
Max Kellermann
2e5d46c399
util/StringSplit: add constexpr
2022-11-09 19:23:05 +01:00
Max Kellermann
7600ad7cac
util/StringSplit: add Partition()
2022-11-09 19:22:54 +01:00
Max Kellermann
485ad583a0
util/CharUtil: add IsLowerAlphaNumericASCII()
2022-11-09 19:21:43 +01:00
Max Kellermann
bbc82a9892
io/FileDescriptor, net/SocketDescriptor: make lots of methods "const"
...
Only the file descriptor value itself is const, but the file itself
may be readable/writable.
2022-11-09 19:19:20 +01:00
Max Kellermann
69596106d3
io/FileDescriptor: add pread() wrapper
2022-11-09 19:18:41 +01:00
gd
6913148d99
Docs: changed sphinx theme from classic to sphinx_rtd_theme
...
Dependency: pip install sphinx-rtd-theme
2022-11-09 09:35:59 +02:00
gd
14460c6b6d
Docs: added custom.css to override default hyphenation and text align styles
2022-11-08 17:31:37 +02:00
Max Kellermann
a0a11be79b
Merge branch 'v0.23.x'
2022-11-08 14:36:09 +01:00
gd
4fa5bd9d5c
doc/plugins.rst: changed 'More information' links to unnamed to suppress warning: Duplicate explicit target name
2022-11-08 14:34:45 +01:00
gd
e7bfd32ccc
doc/index.rst: added man pages links to suppress warnings: document isn't included in any toctree
2022-11-08 14:32:40 +01:00
gd
6f283b52ab
doc/conf.py: set language = 'en' to suppress warning: Invalid configuration value found
2022-11-08 14:32:32 +01:00
Luca Boccassi
714bb991aa
systemd: use PrivateUsers= in user unit
...
ProtectSystem= and other sandboxing options require a user namespace in
order to work as user units (the user manager does not run as root and
thus without a user namespace it is unable to perform mounts).
2022-11-03 23:11:13 +00:00
Max Kellermann
32bddfabea
archive/plugins/meson.build: do not generate empty library
...
If no archive library was found, return from the "plugins" directory
without creating "libarchive_plugins.a". Empty static libraries are
unsupported on some operating systems such as macOS.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1650
2022-11-03 20:36:00 +01:00
Max Kellermann
1944c826bc
doc/conf.py: fix version regular expression
...
Commit 44ef34db88 was broken.
2022-11-03 20:33:08 +01:00
Max Kellermann
619bb60b26
python/build/libs.py: update FLAC to 1.4.2
2022-11-03 10:28:13 +01:00
Max Kellermann
c549e16ed1
python/build/libs.py: update CURL to 7.86.0
2022-11-03 10:28:13 +01:00
Max Kellermann
01c9c4507f
python/build/libs.py: update OpenSSL to 3.0.7
...
Punycode hooray!
2022-11-03 10:28:13 +01:00
gd
a1359f2388
TagBuilder: skip unnecessary preperation if there are no items to add
2022-11-01 17:55:42 +02:00
gd
ab687481cc
Tag: skip tag pool lock if there are no items
2022-11-01 15:37:54 +02:00
Max Kellermann
0efbd4df8b
lib/gcrypt: use std::size_t
2022-10-29 07:31:25 +02:00
gd
caaa050e60
curl input plugin - added config options: verbose, low_speed_limit, low_speed_time, tcp_keepalive, tcp_keepidle, tcp_keepintvl
2022-10-22 13:49:58 +03:00
Max Kellermann
8c9d7bf07e
increment version number to 0.23.11
2022-10-20 19:09:03 +02:00
Max Kellermann
44ef34db88
doc/conf.py: read version number from meson.build
2022-10-20 19:08:27 +02:00
jcorporation
5781f223f6
Document curl plugin .netrc and .curlrc behavior
2022-10-18 22:39:01 +02:00
Max Kellermann
b4e3891912
Merge branch 'config_curl_conn_timeout' of https://github.com/geneticdrift/MPD
2022-10-16 11:45:19 +02:00
gd
160f793e2a
Added connect_timeout configuration to curl input plugin
2022-10-16 12:13:51 +03:00
Max Kellermann
1429d6bfb9
playlist/cue/Parser: use Split()
2022-10-15 08:33:51 +02:00
Max Kellermann
ced6a5ae07
playlist/cue/Parser: remove always-failing assert()
...
Not the assert() here fails, but the illegal src[-1] call. Yet
another regression from commit 21e4c25e61
2022-10-15 08:32:37 +02:00
Max Kellermann
d6d0f78e93
Merge tag 'v0.23.10'
...
release v0.23.10
2022-10-14 23:56:33 +02:00
Max Kellermann
e4c8ebe056
release v0.23.10
2022-10-14 23:51:41 +02:00
Max Kellermann
76b25a1377
output/alsa: add nullptr check for snd_pcm_name() return value
...
It is not explicitly documented whether snd_pcm_name() is allowed to
return NULL:
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#ga5031edc0422df8db1f70af056a12dd77
But apparently this is legal:
0222f45d11/src/pcm/pcm.c (L2761-L2762)
That's ... surprising!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1645
2022-10-14 23:14:30 +02:00
Max Kellermann
ccc3ee663b
java/File: remove assertions to work around -Wtautological-pointer-compare
2022-10-14 23:00:35 +02:00
Max Kellermann
0626661764
android/Context: fix typo in assert() variable name
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1644
2022-10-14 22:59:39 +02:00
Max Kellermann
31db04a3ca
meson.build: suppress bogus clang 14 warning on libfmt headers
2022-10-14 22:54:34 +02:00
Max Kellermann
0c7163b9db
subprojects: update expat
2022-10-14 22:46:30 +02:00
Max Kellermann
7d78cad8af
doc/user.rst: update Android NDK requirement to 25b
2022-10-14 22:41:33 +02:00
Max Kellermann
912530ed20
test/meson.build: remove obsolete CURL workaround
...
This appears to have been fixed in some recent CURL version.
2022-10-14 22:41:33 +02:00
Max Kellermann
d3f37199b9
python/build/libs.py: update libnfs to 5.0.2
2022-10-14 22:41:33 +02:00
Max Kellermann
a4748d84b0
python/build/libs.py: update CURL to 7.85.0
2022-10-14 22:41:33 +02:00
Max Kellermann
8f847ec381
python/build/libs.py: update FFmpeg to 5.1.2
2022-10-14 22:41:33 +02:00
Max Kellermann
3a70f09dd3
python/build/libs.py: update libopenmpt to 0.6.6
2022-10-14 22:41:33 +02:00
Max Kellermann
568f63100b
python/build/libs.py: update zlib to 1.2.13
2022-10-14 21:54:04 +02:00
jcorporation
2937a55582
add precondition for mount/unmount in commands response
2022-10-07 13:59:54 +02:00
Max Kellermann
209e4e940e
Merge branch 'queue_save_with_append' of https://github.com/geneticdrift/MPD
2022-10-02 11:41:17 +02:00
gd
cd093a6014
Added new optional argument MODE to command 'save' to be able to append or replace an existing playlist
2022-10-02 11:19:36 +03:00
Max Kellermann
3e25916b37
time/Parser: remove unused library
2022-09-30 18:17:03 +02:00
Max Kellermann
5f9438dae6
storage/curl: include cleanup
2022-09-30 18:16:46 +02:00
BurroCargado
99e65c58ce
storage/curl: make timestamp parsing more robust
...
According to the latest WebDAV specification (RFC4918),
timestamp string in the getlastmodified property is formatted
as rfc1123-date, such as "Sun, 06 Nov 1994 08:49:37 GMT".
However, to process responses from servers in the older style
format specified in RFC2518, timestamps in the HTTP-date format
had better be accepted.
As described in the libcurl api documentation, curl_getdate() can handle
timestamp strings in HTTP-date formats, including rfc1123-date.
https://www.rfc-editor.org/rfc/rfc4918#section-15.7
https://www.rfc-editor.org/rfc/rfc2518.html#section-13.7
https://curl.se/libcurl/c/curl_getdate.html
2022-09-29 18:19:30 +02:00
BurroCargado
df71b07e9d
storage/curl: fix can't get timestamp of remote file
2022-09-29 18:19:03 +02:00
Max Kellermann
2694195215
storage/curl: add noexcept and [[gnu::pure]]
2022-09-29 18:18:18 +02:00
Max Kellermann
b0d6c0e7cb
Merge branch 'v0.23.x'
2022-09-28 13:08:34 +02:00
Max Kellermann
66450d1f3c
subprojects: update expat, fmt, sqlite3, vorbis
2022-09-28 11:34:33 +02:00
Max Kellermann
76efea3aa7
decoder/ffmpeg: add libfmt formatter for AVSampleFormat
...
Fixes compiler warning because formatting unscoped enums is deprecated
since libfmt 9.
2022-09-28 11:34:33 +02:00
Max Kellermann
ac7bf12743
event/Loop: move call to FlushClockCaches()
2022-09-28 10:03:39 +02:00
Max Kellermann
db21e20c99
event/Loop: improve API doc wording
2022-09-28 09:55:35 +02:00
Max Kellermann
56adb27b44
event/Loop: push new idle events to the back of the list
2022-09-28 09:47:36 +02:00
Max Kellermann
520e96b6e8
event/Loop: rename parameter
2022-09-28 09:45:58 +02:00
Max Kellermann
45599e7840
Merge branch 'v0.23.x'
2022-09-27 20:40:41 +02:00
Max Kellermann
8d9b0c42cb
Merge branch 'reflection' of https://github.com/jcorporation/MPD
2022-09-27 20:35:17 +02:00
jcorporation
7ab0dfc8ce
Sets the curl proxy ssl verify options to the values of the host configuration options
...
This fixes #1616
2022-09-27 20:26:50 +02:00
Max Kellermann
2c11095eed
lib/icu/Compare: use StringStartsWith() for improved code clarity
...
Also fixes the inverted strncmp() call.
2022-09-27 20:23:10 +02:00
jcorporation
07a0369b74
Add pcre status to config response
2022-09-27 20:10:35 +02:00
Max Kellermann
cd253e470a
Merge branch 'starts_with' of https://github.com/jcorporation/MPD
2022-09-27 20:05:38 +02:00
jcorporation
868a06eaf9
Add starts_with to filter expressions
2022-09-27 19:45:15 +02:00
Max Kellermann
512cd7b0de
Merge branch 'ConsumeMode' of https://github.com/jcorporation/MPD
2022-09-21 11:36:25 +02:00
Max Kellermann
352c598916
command/other: use if-with-initializer
2022-09-20 22:07:10 +02:00
Max Kellermann
661aee29da
Merge branch 'reflection' of https://github.com/jcorporation/MPD
2022-09-20 21:07:06 +02:00
jcorporation
0439df05cc
Add playlist_directory to config command response
2022-09-20 21:04:25 +02:00
jcorporation
4333854293
Add documentation for consume oneshot mode
2022-09-20 20:32:32 +02:00
jcorporation
eb3baf7e99
Cast enum to unsigned
2022-09-20 20:27:25 +02:00
jcorporation
48a936ef5b
Add ConsumeMode oneshot, closes #925
2022-09-20 20:26:49 +02:00
Max Kellermann
5a7d2be77d
Merge remote-tracking branch 'jcorporation/idle'
2022-09-20 15:11:41 +02:00
Max Kellermann
15ff7c4cad
Merge branch 'fix-oggflac-serial' of https://github.com/anthonyde/MPD into v0.23.x
2022-09-20 14:44:13 +02:00
Anthony DeRossi
9ab9b97f20
encoder/flac: only set a serial number for oggflac
...
This fixes a bug introduced in 87fa6bca where the FLAC encoder fails to
initialize unless libFLAC is built with Ogg support. When libFLAC is
built without Ogg support, FLAC__stream_encoder_set_ogg_serial_number
unconditionally returns false.
2022-09-16 17:58:41 -07:00
Max Kellermann
88d92aceab
python/build/libs.py: update libFLAC to 1.4.0
2022-09-16 18:21:47 +02:00
Max Kellermann
a2ce4352c8
python/build/libs.py: update Boost to 1.80.0
2022-09-16 17:54:07 +02:00
jcorporation
310a146a55
OutputCommands get ride of global mixer idle events
2022-09-06 21:58:18 +02:00
Max Kellermann
0e201ffdcc
archive/iso9660: simplify std::span initializer
2022-09-06 21:16:28 +02:00
Max Kellermann
d5d25d78da
Merge branch 'v0.23.x'
2022-09-06 21:15:42 +02:00
Max Kellermann
84f43ccde8
LogInit: default to stderr on Windows
...
Don't require "log_file" setting, for "--no-config" operation.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1600
2022-09-06 21:04:53 +02:00
Max Kellermann
38704c9cf3
LogInit: improve systemd/journald comment
2022-09-06 21:03:56 +02:00
Max Kellermann
910d0ec92b
test/net/meson.build: add missing dependency
2022-09-06 20:44:24 +02:00
Max Kellermann
3b05c89765
archive/iso9660: fix off-by-one assertion failure
...
Calling data[fill] could trigger an assertion failure if
fill==data.size(), even if we call it only to take the address.
Instead of doing that, this commit changes the code to pointer
arithmetic.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1556
2022-09-06 20:28:33 +02:00
Max Kellermann
e77b3fa46f
increment version number to 0.23.10
2022-09-06 20:23:50 +02:00
jcorporation
4f8b4c605e
player/Control: Change idle events from global to partition scope
2022-08-28 11:33:14 +02:00
Max Kellermann
b2fb920d28
android/PrivacyPolicy.rst: add Privacy Policy
...
The Google overlords require me to publish a privacy policy, even if
MPD does not collect any data.
2022-08-18 18:53:10 +02:00
Max Kellermann
4f041694d3
Merge tag 'v0.23.9'
...
release v0.23.9
2022-08-18 18:23:12 +02:00
Max Kellermann
12147f6d58
release v0.23.9
2022-08-18 18:20:54 +02:00
Max Kellermann
40bc60d6ae
Main: load Android mpd.conf from ExternalFilesDir
...
See also https://github.com/MusicPlayerDaemon/MPD/issues/1061
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1570
2022-08-18 18:17:43 +02:00
Max Kellermann
7778210269
Main: move code to TryReadConfigFile()
2022-08-18 18:12:21 +02:00
Max Kellermann
6229210d51
Main: move code to LoadConfigFile()
2022-08-18 18:11:49 +02:00
Max Kellermann
5d0d5b5d97
Android/Context: allow type=nullptr in GetExternalFilesDir()
2022-08-18 18:11:49 +02:00
Max Kellermann
1aa3c1e543
java/String: add static method Optional()
2022-08-18 18:10:16 +02:00
Max Kellermann
b90e32fe4e
Android/Context: look up methods once during startup
2022-08-18 18:10:14 +02:00
Max Kellermann
1f4df2a64d
android/Environment: pass JNIEnv to all functions
2022-08-18 18:09:54 +02:00
Max Kellermann
2efc1db6a9
android/Environment: no namespace indent
2022-08-18 18:08:45 +02:00
Max Kellermann
51aa1d2db8
mixer/Internal: hide internal fields
2022-08-18 17:42:30 +02:00
Max Kellermann
2d2df25d04
mixer/Mixer: avoid locking twice
2022-08-18 17:39:17 +02:00
Max Kellermann
29eb3e9ebc
mixer/Control: move some code to Lock*() methods
2022-08-18 17:34:00 +02:00
Max Kellermann
b0873fbc90
mixer/Mixer*: drop the "Mixer" prefix from source files
2022-08-18 17:21:39 +02:00
Max Kellermann
c14484a5cc
mixer/MixerList: eliminate header
2022-08-18 17:14:42 +02:00
Max Kellermann
a966cfeb1f
playlist/cue/CueParser: fix nullptr dereference
...
Regression from commit 21e4c25e61
2022-08-18 17:06:51 +02:00
Max Kellermann
6c0546d829
mixer/Internal: document that caller must lock the mutex
2022-08-18 16:57:58 +02:00
Max Kellermann
e1e8f45983
mixer/Control: add noexcept
2022-08-18 16:56:32 +02:00
Max Kellermann
3eedcc55b9
mixer/Control: convert pointers to references
2022-08-18 16:56:06 +02:00
Max Kellermann
dd2cab1488
Merge branch 'v0.23.x'
2022-08-18 16:54:18 +02:00
Max Kellermann
f883c09b6b
fs/FileSystem: add pure attributes
2022-08-18 16:53:32 +02:00
Max Kellermann
71acad6c21
fs/FileSystem: add noexcept
2022-08-18 16:53:31 +02:00
Max Kellermann
e2d4654e20
filter/ReplayGain: invoke the MixerListener after volume change
...
This ensures that Partition::OnMixerVolumeChanged() invokes
MixerMemento::InvalidateHardwareVolume(), clearing the cached volume
level.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1526
2022-08-18 14:45:45 +02:00
Max Kellermann
2b8f1170a6
mixer/Control: use Mixer::IsGlobal()
2022-08-18 14:33:35 +02:00
Max Kellermann
5c4743441e
mixer/All: use Mixer::IsPlugin()
2022-08-18 14:08:31 +02:00
Max Kellermann
938054bdb8
command/all: fix off-by-one bug in parameter count check
2022-08-09 12:47:57 +02:00
Max Kellermann
d0909adf6b
command/all: use class StaticVector
2022-08-09 12:46:26 +02:00
Max Kellermann
a12b004fa4
util/StaticVector: new class
2022-08-09 12:44:02 +02:00
Max Kellermann
a8452957fc
command/Request: pass std::span to constructor
2022-08-09 12:43:52 +02:00
Max Kellermann
feb334756e
command/all: convert macro to constexpr
2022-08-09 12:39:18 +02:00
Max Kellermann
50a4d7169e
TagAny: pass std::string_view to uri_has_scheme()
2022-08-09 11:43:35 +02:00
Max Kellermann
6239b6c0e2
Merge branch 'v0.23.x'
2022-08-08 23:48:38 +02:00
Max Kellermann
cb288439a4
{android,win32}/build.py: make stdout/stderr unbuffered
...
Avoid excessive buffering if run by CI.
2022-08-08 23:48:23 +02:00
Max Kellermann
b789ffd2bf
Merge branch 'v0.23.x'
2022-08-08 23:46:22 +02:00
Max Kellermann
69f741e8a6
mixer/Memento: move IDLE_MIXER out of SetVolume()
...
Make this idle event per-partition.
2022-08-08 23:32:57 +02:00
Max Kellermann
4b4f47002b
mixer/Volume: refactor to class MixerMemento, per partition
...
Eliminate global variables, convert them to MixerMemento fields.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1583
2022-08-08 23:30:27 +02:00
Max Kellermann
615c301961
mixer/Volume: remove logging (mostly useless)
2022-08-08 23:13:14 +02:00
Max Kellermann
dc07180e48
input/CdioParanoia: add options "mode" and "skip"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1529
2022-08-08 22:53:48 +02:00
Max Kellermann
d3b235bab5
input/CdioParanoia: move global variables up
2022-08-08 22:38:28 +02:00
Max Kellermann
0279f4fb57
output/jack: fix bogus assertion failure
...
Regression from commit 45071607aa
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1571
2022-08-08 22:01:59 +02:00
Max Kellermann
7c920ddebe
filter/ffmpeg: fix FFmpeg 5.1 deprecation warnings
2022-08-08 21:34:26 +02:00
Max Kellermann
88793cbc1a
output/httpd: avoid extra buffer copy if possible
2022-08-08 21:00:38 +02:00
Max Kellermann
2afe427ab3
output/httpd: copy from returned encoder buffer
...
This fixes a regression from commits c266fb7758 and 00b8ced09f ,
but really caused by API change in commit 7e14f8f830 , and this
plugin's failure to adapt to this API change.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1585
2022-08-08 21:00:27 +02:00
Dave Hocker
bbc088ae4e
This PR provides forward and backward compatibility at macos SDK 12.0. At SDK 12.0, API function names were changed essentially replacing
...
occurrences of the word Master/master with Main/main. This change was test built on two different systems.
1. macos 10.15.7 with Xcode 12.4 and clang 12.0.0 on x86_64
2. macos 12.5 with Xcode 13.4.1 and clang 13.1.6 on arm64 (Apple silicon M1)
It should be noted that on macos 10.15.7 with Xcode 11.2 and clang 11.0, MPD will not build.
The MPD documentation states that clang 11.0 is the minimum requirement,
but clang 11.0 produces compile errors. Apparently the macos version
of clang 11.0 is not fully compliant.
2022-08-08 17:39:29 +02:00
Max Kellermann
4c08c0b8b1
Merge branch 'v0.23.x'
2022-07-27 11:06:47 +02:00
Max Kellermann
fe195257d8
python/build/libs.py: update FFmpeg to 5.1
2022-07-27 11:04:14 +02:00
Max Kellermann
57d5df8118
decoder/ffmpeg: fix FFmpeg 5.1 deprecation warnings
2022-07-27 11:04:09 +02:00
Max Kellermann
59792cb0b8
decoder/ffmpeg: wrap FFmpeg include in "extern C"
...
Commit ebae25d175 added that #include, but forgot to wrap it in
"extern C", so the linker tried to look up C++ symbols, causing linker
failure.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1582
2022-07-27 11:04:03 +02:00
Max Kellermann
b864094fdc
Merge branch 'master' of https://github.com/Sonico98/MPD
2022-07-21 21:14:15 +02:00
Sonico
3ef83cc34e
Add titleSort tag
2022-07-20 23:05:10 -03:00
Rosen Penev
3f133dd586
use data() instead of &[0]
...
No need for C pointer manipulation.
Removed data() for string_view as [] can be used without.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2022-07-20 13:50:48 -07:00
Rosen Penev
cc557c4d60
meson: port ncpmc iconv solution
...
Properly deals with iconv, unlike the current solution. have_iconv fails
when libiconv CFLAGS are passed to the compiler. Tested under OpenWrt
with its CONFIG_BUILD_NLS, which adds libiconv include flags.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2022-07-20 08:03:24 +02:00
Max Kellermann
0c98d93e9a
io/FileOutputStream: write to temporary file if O_TMPFILE is not available
2022-07-14 18:45:33 +02:00
Max Kellermann
c344403bed
fs/Path: add operator+
2022-07-14 18:42:25 +02:00
Max Kellermann
150e8f78bf
io/FileOutputStream: use fsync() if fdatasync() is unavailable
...
Fixes the macOS build which apparently doesn't implement the POSIX
function fdatasync().
2022-07-14 18:34:44 +02:00
Max Kellermann
bc7fdba36d
test/fs/TestPath: add missing PATH_LITERAL
2022-07-14 18:34:43 +02:00
Max Kellermann
fe3ab7b937
fs/Path: add WithSuffix()
2022-07-14 18:23:48 +02:00
Max Kellermann
458084d79b
fs/Path: add GetSuffix()
2022-07-14 18:20:55 +02:00
Max Kellermann
f44bc19ce1
test/fs/TestPath: new unit test
2022-07-14 18:20:45 +02:00
Max Kellermann
d3947d0ad5
fs/Path: GetExtension() skips all leading dots
...
Don't return an empty string for "..", because this path doesn't have
an extension.
2022-07-14 18:20:45 +02:00
Max Kellermann
849ed122c7
fs/Path: document GetExtension()
2022-07-14 18:12:00 +02:00
Max Kellermann
254ee00c37
fs/Path: rename GetSuffix() to GetExtension()
...
The "extension" is the name after the dot, but the "suffix" is the
string including the dot.
2022-07-14 18:12:00 +02:00
Max Kellermann
594b97feb1
fs/Path: change cast syntax
2022-07-14 18:12:00 +02:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
81154130b5
test/fs: rename TestFs.cxx to TestGlob.cxx
2022-07-14 17:57:10 +02:00
Max Kellermann
0514f25c61
test/TestFs: move to test/fs/
2022-07-14 17:56:37 +02:00
Max Kellermann
2670bbdcc8
io/FileOutputStream: simplify OpenTempFile() call
2022-07-14 15:47:10 +02:00
Max Kellermann
bd3e096411
io/FileOutputStream: move code to Delete()
2022-07-14 15:43:36 +02:00
Max Kellermann
270a74e53b
io/FileOutputStream: add method Sync()
2022-07-14 15:41:12 +02:00
Max Kellermann
47d103e8a1
io/FileOutputStream: add API documentation
2022-07-14 15:41:03 +02:00
Max Kellermann
188f7ab795
thread/WindowsCond: add explicit cast
2022-07-14 13:04:08 +02:00
Max Kellermann
4953a57c1c
java/String: add std::string_view constructor
2022-07-14 13:03:23 +02:00
Max Kellermann
199037c682
config: allow configuring partitions
...
This just allows creating empty partitions. More features to come.
2022-07-13 15:18:06 +02:00
Max Kellermann
64f84d5468
player/Listener: add virtual method OnPlayerState(), wrapping IDLE_PLAYER
...
This eliminates most of the remaining global "player" idle events.
2022-07-13 14:11:36 +02:00
Max Kellermann
047561dc22
player/Listener: add virtual method OnPlayerError()
...
Replaces two global idle_add() calls.
2022-07-13 14:11:36 +02:00
Max Kellermann
a542a0804a
Partition: OnPlayerTagModified() emits IDLE_PLAYER
...
Replaces one global idle_add() call.
2022-07-13 14:11:36 +02:00
Max Kellermann
cddeb2a0df
io/BufferedOutputStream: add missing #include
2022-07-13 14:11:36 +02:00
Max Kellermann
de1d443db1
output/Multiple: use std::size_t
2022-07-13 13:26:27 +02:00
Max Kellermann
e2040ed395
output/Multiple: use [[gnu::pure]]
2022-07-13 13:25:17 +02:00
Max Kellermann
8a0ba7a725
output/Control: GetName() returns std::string&
2022-07-13 13:23:21 +02:00
Max Kellermann
e74788ea32
output/Control: inline GetName()
2022-07-13 13:13:23 +02:00
Max Kellermann
fef79931c5
output/Multiple: pass std::string_view to FindByName()
2022-07-13 13:13:21 +02:00
Max Kellermann
b52b0ac85a
*: use BufferedOutputStream::Fmt()
2022-07-13 13:10:14 +02:00
Max Kellermann
9a30286289
io/BufferedOutputStream: add libfmt support
2022-07-13 12:52:20 +02:00
Max Kellermann
20310437d0
.github/workflows/build.yml: build with Ubuntu 22.04 as well
2022-07-13 12:41:04 +02:00
Max Kellermann
d29e1544bf
.github/workflows/build.yml: explicitly select ubuntu-20.04
...
According to https://github.com/actions/virtual-environments
"ubuntu-latest" maps to "ubuntu-20.04", even though "ubuntu-22.04" is
also available. Since our job description is very specific to
"ubuntu-20.04", let's select this explicitly.
2022-07-13 12:37:02 +02:00
Max Kellermann
ae4f4d3533
config/Data: add WithEach(ConfigBlockOption)
...
To improve error messages without making callers more complex.
2022-07-13 11:05:21 +02:00
Max Kellermann
89a18b49a7
Merge branch 'v0.23.x'
2022-07-12 14:00:00 +02:00
guihkx
956c5faebb
output/PipeWire: set app icon
...
Closes #1564
2022-07-12 13:59:05 +02:00
Max Kellermann
eb589b0a46
output/osx: fix CI failure
2022-07-12 13:37:46 +02:00
Max Kellermann
52eff41379
remove Haiku support
...
Haiku support has been unmaintained for many years, and this issue has
been open for more than 5 years, but apparently the Haiku people have
lost interest:
https://github.com/MusicPlayerDaemon/MPD/pull/183
Haiku support was therefore deprecated by this commit 4 years ago:
7de8fd04a4 - but in those 4 years, nobody stepped up to adopt
maintainership.
I don't have any computer (or VM) with Haiku and there is no CI with
Haiku support, so I'm unable to adapt the Haiku specific code to API
changes.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/182
Closes https://github.com/MusicPlayerDaemon/MPD/issues/185
2022-07-12 13:14:49 +02:00
Max Kellermann
45071607aa
output/Interface: pass std::span to Play()
2022-07-12 12:59:47 +02:00
Max Kellermann
f5d104e7af
output/ao: simplify write_size checks
2022-07-12 12:58:19 +02:00
Max Kellermann
4f8d2a8b1c
output/alsa: use std::byte instead of uint8_t
2022-07-12 12:36:39 +02:00
Max Kellermann
0158a2b6b9
encoder/flac: refactor input buffer conversion
2022-07-12 12:31:08 +02:00
Max Kellermann
00b8ced09f
encoder/flac: Read() returns the internal buffer
2022-07-12 12:19:55 +02:00
Max Kellermann
5f51be43cf
decoder/flac: add noexcept and inline
2022-07-12 12:15:06 +02:00
Max Kellermann
3e2de560ca
encoder/lame: eliminate the audio_format field
2022-07-12 12:08:46 +02:00
Max Kellermann
c266fb7758
encoder/lame: Read() returns the internal buffer
...
Eliminate memcpy() calls.
2022-07-12 12:01:31 +02:00
Max Kellermann
0d09f307b2
encoder/Interface: update API docs
2022-07-12 12:00:02 +02:00
Max Kellermann
eb7d321cb8
Merge branch 'v0.23.x'
2022-07-12 11:59:49 +02:00
Max Kellermann
cd0396c1f1
test/run_decoder: remove bogus assert()
2022-07-12 11:59:14 +02:00
Max Kellermann
79f9b268bb
increment version number to 0.23.9
2022-07-12 11:50:47 +02:00
Max Kellermann
b45f3c8deb
Android release 0.23.8
2022-07-12 11:48:41 +02:00
Max Kellermann
f8a8de87e4
android/AndroidManifest.xml: update targetSdkVersion to 30
...
Required by Google Play.
2022-07-12 11:48:41 +02:00
Max Kellermann
2183f0553c
android/meson.build: use apksigner instead of jarsigner
...
This is required for targetSdkVersion=30.
apksigner requires running zipalign first.
2022-07-12 11:48:41 +02:00
Max Kellermann
7e14f8f830
encoder/Interface: pass std::span to Write() and Read()
2022-07-12 10:33:59 +02:00
Max Kellermann
28e044a36a
encoder/lame: use std::size_t
2022-07-12 10:14:10 +02:00
Max Kellermann
4e91d8279b
encoder/vorbis: use std::size_t
2022-07-12 10:11:30 +02:00
Max Kellermann
ff3d8509ac
output/httpd: move buffer to stack
2022-07-12 10:08:26 +02:00
Max Kellermann
e861d4f83d
encoder/interface: make Read() noexcept (all implementations are)
2022-07-12 10:07:38 +02:00
Max Kellermann
31d89b36cf
encoder/flac: use std::size_t
2022-07-12 09:53:16 +02:00
Max Kellermann
6b24344031
output/shout: move buffer to stack
2022-07-12 09:48:02 +02:00
Max Kellermann
c55e250c45
encoder/Interface: include cleanup
2022-07-11 22:38:24 +02:00
Max Kellermann
cd241a93c1
util/DynamicFifoBuffer: pass std::span to Append()
2022-07-11 22:38:24 +02:00
Max Kellermann
53acf7ae82
encoder/*: use std::byte instead of uint8_t
2022-07-11 22:38:24 +02:00
Max Kellermann
c34f6ed8c0
decoder/Client: pass std::span to SubmitData()
2022-07-11 22:37:38 +02:00
Max Kellermann
329c448d30
decoder/wavpack: use [[gnu::pure]]
2022-07-11 22:11:42 +02:00
Max Kellermann
a6619e9a13
decoder/wavpack: add "constexpr" and "const_cast"
2022-07-11 22:10:11 +02:00
Max Kellermann
24ce5da2b8
decoder/wavpack: convert pointer to reference
2022-07-11 22:08:49 +02:00
Max Kellermann
b4f751080d
decoder/wavpack: add noexcept
2022-07-11 22:06:10 +02:00
Max Kellermann
6d02edebc9
decoder/wavpack: rename "samples" to "frames"
2022-07-11 22:05:49 +02:00
Max Kellermann
349882ed75
decoder/wavpack: require libwavpack version 5
2022-07-11 22:04:15 +02:00
Max Kellermann
4464310e74
Merge tag 'v0.23.8'
...
release v0.23.8
2022-07-09 01:08:16 +02:00
Max Kellermann
1f28790476
release v0.23.8
2022-07-09 01:05:38 +02:00
Max Kellermann
c8dae95eff
output/PipeWire: after Cancel(), refill buffer before resuming playback
...
Deactivate the stream in Cancel(). This fixes stuttering after a
manual song change by refilling the whole ring buffer before
reactivating the stream.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1354
2022-07-09 01:03:36 +02:00
Max Kellermann
547a084c7e
output/PipeWire: call pw_stream_flush() in Cancel()
...
Clear not only MPD's ring buffer, but also libpipewire's buffers, to
avoid playing some audio from the previous song after a manual song
change.
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1354
2022-07-09 01:01:29 +02:00
Max Kellermann
493677ff81
output/PipeWire: skip Cancel() if already drained
2022-07-09 00:53:53 +02:00
Max Kellermann
6b430ba271
output/PipeWire: activate stream in Drain()
2022-07-09 00:53:20 +02:00
Max Kellermann
4b3dcf831b
output/Timer: add noexcept
2022-07-08 22:58:45 +02:00
Max Kellermann
bc6924d303
output/snapcast: fix busy loop while paused
...
Removing the LockHasClients(); this code was copied from the "httpd"
output plugin, but unlike "httpd", the SnapCast output plugin does not
feed silence while paused, so we need to implement a delay to avoid
busy-looping the CPU.
As a side effect, this eliminates the suttering after resuming
playback, because the timer now gets reset even if there is a client.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1394
2022-07-08 22:55:41 +02:00
Max Kellermann
02b00f9146
output/PipeWire: don't force initial volume=100%
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1484
2022-07-08 18:25:41 +02:00
Max Kellermann
e807ed5870
output/PipeWire: ignore SPA_PROP_channelVolumes if n_values==0
...
After connecting, PipeWire sometimes sends SPA_PROP_channelVolumes
with no values, and this led to "volume=-NaN".
2022-07-08 18:13:33 +02:00
Max Kellermann
f08944253b
output/PipeWire: check SPA_PROP_channelVolumes, not control name
...
Since PipeWire 0.3.53, there is no control name anymore, therefore the
name check doesn't work anymore, breaking volume change events.
This obsoletes the crash bug fix in commit 2ee57f9b0d
2022-07-08 18:06:36 +02:00
Max Kellermann
792d6584b9
output/PipeWire: move code to OnChannelVolumes()
2022-07-08 18:02:36 +02:00
Max Kellermann
7b45d01462
output/PipeWire: update field "volume"
2022-07-08 17:44:39 +02:00
Max Kellermann
5c17b2966a
output/PipeWire: use std::accumulate
2022-07-08 17:44:08 +02:00
Max Kellermann
0c54f29446
output/PipeWire: document field "volume"
2022-07-08 17:30:57 +02:00
Max Kellermann
9c3cf39fdd
output/PipeWire: catch exceptions in ParamChanged()
...
Fixes a potential crash bug.
2022-07-08 17:24:41 +02:00
Max Kellermann
d2fb229685
output/PipeWire: call ::SetVolume() in ParamChanged()
...
This is a lower-level function without some of the clutter of
PipeWireOutput::SetVolume() which is not needed in that case.
2022-07-08 17:21:17 +02:00
Max Kellermann
f55bc6682f
output/PipeWire: move code to ::SetVolume()
2022-07-08 17:19:10 +02:00
Max Kellermann
6857286b42
decoder/Thread: don't scan for replay gain tags in PCM streams
...
This disables a long delay for playing songs from the cdio_paranoia
input plugin if ReplayGain is enabled.
2022-07-08 16:33:19 +02:00
Max Kellermann
c0d5bd2048
decoder/Thread: move code to DecoderControl::LockIsReplayGainEnabled()
2022-07-08 16:21:53 +02:00
Max Kellermann
666e5d7904
input/CdioParanoia: use integer modulo to calculate "diff"
2022-07-08 16:04:05 +02:00
Max Kellermann
3613407ac5
input/CdioParanoia: use typedef lsn_t
2022-07-08 16:03:04 +02:00
Max Kellermann
c32dceb4d4
input/CdioParanoia: remove loop from Read()
...
The Read() method is not required to fill the whole buffer. By
returning as soon as at least one byte was read, we allow faster
cancellation.
2022-07-08 16:01:23 +02:00
Max Kellermann
5573e78364
input/CdioParanoia: skip seek if seeking within the buffer
2022-07-08 13:57:11 +02:00
Max Kellermann
807a19889f
input/CdioParanoia: update offset only after successful seek
...
If seeking fails, don't leave the class with a wrong offset.
2022-07-08 13:57:11 +02:00
Max Kellermann
df7242de91
input/CdioParanoia: eliminate redundant field "lsn_relofs"
2022-07-08 13:36:59 +02:00
Max Kellermann
d62426f168
input/CdioParanoia: eliminate redundant field "lsn_to"
...
Use "size" instead.
2022-07-08 12:42:49 +02:00
Max Kellermann
1714cf3417
input/CdioParanoia: use IsEof() in Read()
2022-07-08 12:42:42 +02:00
Max Kellermann
1080c917be
input/CdioParanoia: use std::min()
2022-07-08 12:37:21 +02:00
Max Kellermann
8eb3164878
input/CdioParanoia: fix crash if no drive was found
...
cdio_get_devices_with_cap() can return nullptr if no drive was found,
or it can instead return an empty list. The latter caused MPD to
crash.
2022-07-08 12:05:20 +02:00
Max Kellermann
915c5442d1
input/CdioParanoia: use AtScopeExit() for cdio_free_device_list()
2022-07-08 12:03:57 +02:00
Max Kellermann
be0360d5e8
doc/user.rst: clarify .mpdignore documentation
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1532
2022-07-08 11:44:14 +02:00
Max Kellermann
4d6ae6ffdd
output/PipeWire: add nullptr check to SetVolume()
...
If the PipeWire output has not yet been enabled and no thread_loop has
been created yet, a nullptr dereference in SetVolume() was possible
because nullptr was passed to pw_thread_loop_lock().
2022-07-08 11:32:59 +02:00
Max Kellermann
ecee6f415b
mixer/MixerInternal: remember error details
...
If a mixer is not open, rethrow the original exception each time
setting the volume is requested. This further improves error messages
sent to MPD clients.
2022-07-08 11:11:53 +02:00
Max Kellermann
47680f936b
mixer/All: auto-open "global" mixers
...
If a mixer is "global", it is available even if the output isn't
open. However, since the check was changed from IsEnabled() to
IsReallyEnabled(), enabled outputs have not yet been used have not
been "really" enabled yet, preventing using the mixer.
Fixes a regression by commit 35dbc1a90c
(part of https://github.com/MusicPlayerDaemon/MPD/pull/1480 ).
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1563
2022-07-08 11:05:26 +02:00
Max Kellermann
2d7181105d
output/MultipleOutputs: SetVolume() throws on error
...
This reveals more about the nature of an error instead of just
returning "problems setting volume".
2022-07-08 10:56:55 +02:00
Max Kellermann
9bdc75524b
python/build/libs.py: update CURL to 7.84.0
2022-07-08 10:13:52 +02:00
Max Kellermann
2f6ceb4949
python/build/libs.py: update OpenSSL to 3.0.5
2022-07-08 10:10:42 +02:00
Max Kellermann
cd933aa35f
subprojects: update fmt and vorbis
2022-07-08 10:08:27 +02:00
Max Kellermann
138738075b
libfmt 9 support
...
libfmt version 9 broke the API by removing fmt::make_args_checked().
Fixes https://bugs.debian.org/1014543
2022-07-08 10:06:53 +02:00
Max Kellermann
7dd65f3028
Merge branch 'v0.23.x'
2022-07-04 19:21:18 +02:00
Max Kellermann
2ee57f9b0d
output/PipeWire: add nullptr check, fixing crash with PipeWire 0.3.53
...
Since PipeWire 0.3.53, control names can apparently be nulled, leading
to crashes in applications assertion that the string cannot be
nullptr.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1558
2022-07-04 19:20:08 +02:00
Max Kellermann
bc56f8c2f0
util/ConstBuffer: remove obsolete library
...
Everything has been migrated to std::span.
2022-07-04 19:15:10 +02:00
Max Kellermann
596ff7e6bf
output/*: use std::span instead of ConstBuffer
2022-07-04 19:14:12 +02:00
Max Kellermann
e8667f99be
util/OptionParser: use std::span instead of ConstBuffer
2022-07-04 19:04:16 +02:00
Max Kellermann
9b427b3171
command/*: use std::span instead of ConstBuffer
2022-07-04 18:58:13 +02:00
Max Kellermann
baff5e5594
lib/yajl: use std::span instead of ConstBuffer
2022-07-04 18:37:36 +02:00
Max Kellermann
020c9b41cc
lib/icu: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
e975e2e477
lib/ffmpeg: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
4e1dc562f7
lib/curl: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
d097babe73
lib/chromaprint: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
8fa212f04d
lib/cdio: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
b9c9a5f1dd
db/*: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
4fb8b45111
song/Filter: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Max Kellermann
6c107443d3
input/qobuz: include cleanup
2022-07-04 18:37:35 +02:00
Max Kellermann
67c6d111a8
filter/*: use std::span instead of ConstBuffer
2022-07-04 18:37:35 +02:00
Marceline Cramer
18ebd42c52
.github: Add reminder to include backtrace in issue template
2022-07-04 10:32:58 -06:00
Max Kellermann
9675cc77e2
decoder/*: use std::span instead of ConstBuffer
2022-07-04 18:11:21 +02:00
Max Kellermann
4ce1dae673
pcm/*: use std::span instead of ConstBuffer
2022-07-04 18:11:21 +02:00
Max Kellermann
d89136b09c
util/ConstBuffer: hard-code std::span support
2022-07-04 18:09:32 +02:00
Max Kellermann
d58c38943a
util/StringView: remove obsolete class
...
Everything has been migrated to std::string_view.
2022-07-04 15:04:31 +02:00
Max Kellermann
66704ec879
util/UriExtract: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
422c1e9288
util/TemplateString: remove StringView support
2022-07-04 15:04:31 +02:00
Max Kellermann
683f0da2e7
tag/*: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
c7a8fc91c0
storage/curl: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
cfd255a014
lib/xiph: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
1c30b3d5a1
lib/dbus/UDisks2: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
4964eda167
fs/StandardDirectory: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
502e5f006a
decoder/*: use std::string_view instead of StringView
2022-07-04 14:50:18 +02:00
Max Kellermann
23235e3194
db/upnp/Directory: use std::string_view instead of StringView
2022-07-04 14:50:18 +02:00
Max Kellermann
93834fe389
db/simple/Directory: use std::string_view instead of StringView
2022-07-04 14:50:18 +02:00
Max Kellermann
bd32b229b5
config/Path: use std::string_view instead of StringView
2022-07-04 14:41:39 +02:00
Max Kellermann
c7d2cb855a
Permission: use std::string_view instead of StringView
2022-07-04 14:38:29 +02:00
Max Kellermann
04c924ae3b
playlist/Registry: use std::string_view instead of StringView
2022-07-04 14:36:21 +02:00
Max Kellermann
6c8a85a391
playlist/{asx,cue,rss,xspf}: use std::string_view instead of StringView
2022-07-04 14:35:52 +02:00
Max Kellermann
74780131bd
lib/zlib/GzipOutputStream: add SyncFlush()
2022-07-04 10:09:04 +02:00
Max Kellermann
2c092d2613
lib/zlib/GzipOutputStream: add exception API docs
2022-07-04 10:08:55 +02:00
Max Kellermann
171b31ae67
lib/zlib/GzipOutputStream: rename Flush() to Finish()
2022-07-04 10:08:54 +02:00
Max Kellermann
5b3abe2c9c
lib/zlib/GzipOutputStream: grow Write() buffer to 64 kB
2022-07-04 10:08:53 +02:00
Max Kellermann
59186f1fb0
event/Loop: include cleanup
2022-07-04 09:55:48 +02:00
Max Kellermann
5e68531428
event/SocketEvent: move ssize_t to class BufferedSocket
2022-07-04 09:54:08 +02:00
Max Kellermann
e7b15a9041
lib/curl/Request: remove obsolete method prototypes
2022-07-02 18:42:08 +02:00
Max Kellermann
853afa1bce
lib/curl/Adapter: add missing StripLeft() call
...
Fixes regression by commit 88a66df9d6
2022-07-02 18:36:15 +02:00
Max Kellermann
627fd755e8
lib/curl/Adapter: remove redundant size check
2022-07-01 16:54:47 +02:00
Max Kellermann
88a66df9d6
lib/curl/Adapter: use std::string_view internally
2022-07-01 16:51:37 +02:00
Max Kellermann
af951dc08a
Merge branch 'v0.23.x'
2022-07-01 12:45:07 +02:00
Max Kellermann
5a5655b790
lib/curl/Adapter: catch and postpone exceptions in WriteFunction()
...
This fixes a std::terminate() crash in the CURL storage plugin when
PropfindOperation::OnHeaders() throws an exception after receiving a
non-207 status.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1559
2022-07-01 12:43:42 +02:00
Max Kellermann
a6d20d1907
Merge branch 'v0.23.x'
2022-07-01 12:39:41 +02:00
Max Kellermann
b88d1e6820
lib/curl/Headers: make the comparison type "transparent"
2022-07-01 12:17:41 +02:00
Max Kellermann
19d2864c34
lib/curl/Headers: central type definition for the header map
2022-07-01 12:17:36 +02:00
Max Kellermann
29e3a17f26
lib/curl/Request: move code from SetupEasy() to Setup.cxx
2022-07-01 12:17:26 +02:00
Max Kellermann
252e9f736f
lib/curl/Request: move code to class CurlResponseHandlerAdapter
2022-07-01 12:17:20 +02:00
Max Kellermann
5d08988dda
lib/curl/Handler: fix typo
2022-07-01 12:17:17 +02:00
Max Kellermann
47ca4246aa
lib/curl/Request: add constructor with CurlEasy parameter
2022-07-01 12:17:13 +02:00
Max Kellermann
f8338d4f00
lib/curl/Request: use std::size_t
2022-07-01 12:16:59 +02:00
Max Kellermann
5cf6032c90
lib/curl/Request: move code to SetupEasy()
2022-07-01 12:16:55 +02:00
Max Kellermann
8d8b77412d
lib/curl/Request: add API docs
2022-07-01 12:16:50 +02:00
Max Kellermann
d882c3361d
playlist/PlaylistPlugin: use std::string_view
2022-07-01 11:31:31 +02:00
Max Kellermann
9d50306e2f
lib/xiph/ScanVorbisComment: use std::string_view
2022-07-01 11:30:44 +02:00
Max Kellermann
96f99aeb8f
TagPrint: use std::string_view
2022-07-01 11:29:58 +02:00
Max Kellermann
ed7263ee3e
decoder/OpusTags: use std::string_view
2022-07-01 11:29:11 +02:00
Max Kellermann
f32d752ccb
util/NumberParser: use std::string_view
2022-07-01 11:29:11 +02:00
Max Kellermann
671b7e079f
decoder/OpusReader: use std::string_view
2022-07-01 11:29:11 +02:00
Max Kellermann
e10b15010c
decoder/OpusReader: add noexcept
2022-07-01 11:29:11 +02:00
Max Kellermann
02fe857755
util/IterableSplitString: return std::string_view
2022-07-01 11:29:11 +02:00
Max Kellermann
ea3f044cd8
util/SplitString: use std::string_view
2022-07-01 11:29:11 +02:00
Max Kellermann
e6bb6c59ec
storage/Composite: use std::string_view
2022-07-01 11:29:11 +02:00
Max Kellermann
6d23ac67f9
util/UriQueryParser: use std::string_view
2022-07-01 11:29:10 +02:00
Max Kellermann
ca46b4d7a7
util/MimeType: use std::string_view
2022-07-01 11:29:10 +02:00
Max Kellermann
0727ee94c0
tag/Id3Scan: use std::string_view
2022-07-01 11:29:10 +02:00
Max Kellermann
21e4c25e61
playlist/cue/CueParser: more std::string_view
2022-07-01 11:29:10 +02:00
Max Kellermann
e921c0b40b
lib/yajl/Callbacks: use std::string_view
2022-07-01 11:16:42 +02:00
Max Kellermann
c05d4cddfb
input/qobuz: use std::string_view
2022-07-01 11:16:42 +02:00
Max Kellermann
c9723ee4b7
playlist/SoundCloud: use std::string_view
2022-07-01 11:16:42 +02:00
Max Kellermann
ca90c75c61
lib/alsa/AllowedFormat: pass std::string_view to constructor
2022-07-01 10:57:49 +02:00
Max Kellermann
9976665cc7
util/UriRelative: use std::string_view internally
2022-07-01 10:56:29 +02:00
Max Kellermann
c5f037fa64
util/StringCompare: move code from StringView
2022-07-01 10:48:34 +02:00
Max Kellermann
5ec13c0b06
util/StringStrip: add libc++ compatibility kludge
2022-07-01 10:45:37 +02:00
Max Kellermann
60ca12e4bd
db/simple/Song: use std::string_view
2022-06-30 21:04:13 +02:00
Max Kellermann
67fcf7d7c5
output/ao: add missing include
2022-06-30 21:03:25 +02:00
Max Kellermann
c953ed48b7
output/ao: use std::string_view
2022-06-30 21:01:29 +02:00
Max Kellermann
6440df60aa
output/jack: use std::string_view
2022-06-30 21:00:23 +02:00
Max Kellermann
b806b0a97f
util/StringStrip: add std::string_view overloads
2022-06-30 21:00:07 +02:00
Max Kellermann
10197a0041
util/IterableSplitString: use std::string_view internally
2022-06-30 20:54:42 +02:00
Max Kellermann
166885802a
util/StringSplit: move code from StringView.hxx
2022-06-30 20:40:41 +02:00
Max Kellermann
4a97c45585
tag/Config: use IterableSplitString instead of SplitString()
2022-06-30 20:39:39 +02:00
Max Kellermann
0173d3b313
util/IterableSplitString: use StringView::Split()
2022-06-30 20:37:58 +02:00
Max Kellermann
aadd32c973
util/IterableSplitString: add noexcept
2022-06-30 20:34:04 +02:00
Max Kellermann
0f4bf5569a
event/InotifyEvent: new class wrapping inotify
...
Replaces class InotifySource.
2022-06-30 12:05:50 +02:00
Max Kellermann
ff4cf6c6d1
test/run_inotify: add class Instance
2022-06-30 11:57:03 +02:00
Max Kellermann
a7b7e35512
tag/ReplayGainParser: use std::string_view
2022-06-30 10:59:56 +02:00
Max Kellermann
11135b48e6
tag/MixRampParser: use std::string_view
2022-06-30 10:59:27 +02:00
Max Kellermann
d0382caa88
tag/ApeLoader: use std::string_view
2022-06-30 10:58:22 +02:00
Max Kellermann
4765726bda
tag/VorbisComment: use std::string_view
2022-06-30 10:57:01 +02:00
Max Kellermann
455a412aaa
tag/Table: use std::string_view
2022-06-30 10:53:26 +02:00
Max Kellermann
1a2b505979
tag/ParseName: use std::string_view
2022-06-30 10:52:21 +02:00
Max Kellermann
c34f3c9b94
tag/Handler: use StringIsEqualIgnoreCase()
2022-06-30 10:50:56 +02:00
Max Kellermann
232084c2f9
playlist/cue/CueParser: use std::string_view in public API
2022-06-30 10:50:53 +02:00
Max Kellermann
2ba092711f
event/net/UdpListener: use IsSocketErrorReceiveWouldBlock()
2022-06-30 10:32:25 +02:00
Max Kellermann
8aa4227c0c
net/SocketAddress: add std::span cast operators
2022-06-30 10:30:54 +02:00
Max Kellermann
81afb47cd0
util/ByteOrder: add class PackedBE64
2022-06-30 10:30:54 +02:00
Max Kellermann
60a3aae35f
io/FileDescriptor: add OpenReadOnly() overload with directory fd
2022-06-30 10:30:54 +02:00
Max Kellermann
bc3415ce8b
Copyright year 2022
2022-06-30 09:41:53 +02:00
Max Kellermann
3f1acd3642
lib/avahi/Publisher: fix comment typo
2022-06-30 09:38:44 +02:00
Max Kellermann
4564d251a8
zeroconf/avahi: move generic sources to lib/avahi
2022-06-30 09:37:30 +02:00
Max Kellermann
8783ed1981
lib/curl/Adapter: use std::string_view
2022-06-29 17:38:58 +02:00
Max Kellermann
1da09f5b1b
lib/curl: use std::span
2022-06-29 17:37:12 +02:00
Max Kellermann
062df65b1e
lib/dbus: use std::span
2022-06-29 17:32:58 +02:00
Max Kellermann
899eaa3307
io/FileDescriptor: add Duplicate() returning UniqueFileDescriptor
2022-06-29 17:31:37 +02:00
Max Kellermann
5140eaa5e7
util/IntrusiveList: use std::is_base_of_v
2022-06-29 17:30:11 +02:00
Max Kellermann
cca20fec07
event/FineTimerEvent: adjust "friend" declaration
2022-06-29 17:29:44 +02:00
Max Kellermann
12d67dad35
net/SocketError: support ETIMEDOUT
2022-06-29 17:28:47 +02:00
Max Kellermann
8a68d085b4
util/IntrusiveList: add option "constant_time_size"
2022-06-29 17:28:39 +02:00
Max Kellermann
e437cc4faf
util/IntrusiveList: add size()
2022-06-29 17:28:35 +02:00
Max Kellermann
1fb858e2d7
util/IntrusiveList: add struct IntrusiveListMemberHookTraits
2022-06-29 17:28:16 +02:00
Max Kellermann
3945a3add9
util/MemberPointer: new library
2022-06-29 17:28:15 +02:00
Max Kellermann
5348a446a7
util/IntrusiveList: move various static functions to struct IntrusiveListBaseHook
2022-06-29 17:27:40 +02:00
Max Kellermann
e8e33d5fc4
util/IntrusiveList: add missing ToHook() calls
2022-06-29 17:27:37 +02:00
Max Kellermann
c28580745b
util/IntrusiveList: move struct HookDetection to top-level
2022-06-29 17:24:08 +02:00
Max Kellermann
e7b587d550
util/CopyConst: use std::add_const
2022-06-29 17:23:50 +02:00
Max Kellermann
5d34b9b5bb
util/SpanCast: move CopyConst to separate header
2022-06-29 17:23:44 +02:00
Max Kellermann
86be7938f1
util/SpanCast: swap the CopyConst template parameters
2022-06-29 17:23:41 +02:00
Max Kellermann
7ad5a5efec
util/OffsetPointer: use std::byte
2022-06-29 17:23:32 +02:00
Max Kellermann
64f2735e60
util/SpanCast: add ToStringView()
2022-06-29 17:23:14 +02:00
Max Kellermann
3a0a0facdf
util/SpanCast: suppress alignment warnings
2022-06-29 17:23:13 +02:00
Max Kellermann
ec66ee3bfb
tag/Handler: use std::string_view instead of StringView
2022-06-29 17:22:17 +02:00
Max Kellermann
ca9dd74fbf
tag/Builder: use std::string_view instead of StringView
2022-06-29 17:22:17 +02:00
Max Kellermann
2da847dd30
tag/Pool: use std::string_view instead of StringView
2022-06-29 17:22:17 +02:00
Max Kellermann
4cb5c3782b
util/HexFormat: require std::span
2022-06-29 17:22:17 +02:00
Max Kellermann
dcf39ee44e
.github/workflows/build.yml: add "python-version: 3.x"
...
This appears to be necessary as of actions/setup-python@v4 (commit
45d908e25f ).
2022-06-13 21:37:04 +02:00
Max Kellermann
f2cfa3e1c4
net/SocketError: add SocketErrorCategory()
2022-06-13 21:26:58 +02:00
Max Kellermann
0c2c20254b
system/Error: add IsLastError()
2022-06-13 21:23:11 +02:00
Max Kellermann
193d6a4fd4
system/Error: add LastErrorCategory()
2022-06-13 21:19:20 +02:00
Max Kellermann
acfeec7a5d
system/Error: add [[gnu::const]] attribute
2022-06-13 21:16:24 +02:00
dependabot[bot]
45d908e25f
build(deps): bump actions/setup-python from 3 to 4
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-13 15:23:52 +00:00
Naglis Jonaitis
fd9114e7e2
doc/user.rst: fix neighbor plugin config block name
2022-06-08 12:57:27 +02:00
Max Kellermann
b4f454a553
Merge pull request #1548 from MusicPlayerDaemon/dependabot/github_actions/actions/setup-python-3
...
build(deps): bump actions/setup-python from 1 to 3
2022-06-08 12:56:55 +02:00
Max Kellermann
299f813e28
Merge pull request #1549 from MusicPlayerDaemon/dependabot/github_actions/actions/checkout-3
...
build(deps): bump actions/checkout from 2 to 3
2022-06-08 12:56:21 +02:00
Max Kellermann
eedd490e2d
net/AddressInfo: add iterator type aliases
2022-06-07 10:11:26 +02:00
Max Kellermann
0a8aca516a
util/StringBuffer: use data() instead of &front()
2022-06-07 10:11:05 +02:00
Max Kellermann
70808bde64
util/ForeignFifoBuffer: add MoveFrom() overload with std::span
2022-06-07 10:09:08 +02:00
Max Kellermann
93bf0fc547
util/ForeignFifoBuffer: use iterators
2022-06-07 10:08:58 +02:00
Max Kellermann
95e7f8b1c8
util/ForeignFifoBuffer: more constexpr
2022-06-07 10:08:58 +02:00
dependabot[bot]
e2d6bb7444
build(deps): bump actions/checkout from 2 to 3
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-05 08:28:29 +00:00
dependabot[bot]
f89916e6fb
build(deps): bump actions/setup-python from 1 to 3
...
Bumps [actions/setup-python](https://github.com/actions/setup-python ) from 1 to 3.
- [Release notes](https://github.com/actions/setup-python/releases )
- [Commits](https://github.com/actions/setup-python/compare/v1...v3 )
---
updated-dependencies:
- dependency-name: actions/setup-python
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2022-06-05 08:28:27 +00:00
naveen
7d95b15cbc
chore: Included githubactions in the dependabot config
...
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.
Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot
GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com >
2022-06-05 01:30:13 +00:00
Max Kellermann
27e78c71e0
util/HexFormat: use std::span instead of ConstBuffer
2022-06-01 22:50:54 +02:00
Max Kellermann
8333927737
time/Zone: add native Windows implementation
2022-06-01 22:35:04 +02:00
Max Kellermann
db03db0dca
util/SpanCast: add FromBytesStrict()
2022-06-01 21:50:01 +02:00
Max Kellermann
bd96f6e572
util/SpanCast: add const support to FromBytesFloor()
2022-06-01 21:49:35 +02:00
Max Kellermann
04041f9583
util/Manual: use std::aligned_storage_t
...
By using std::launder(), we can re-enable -Wstrict-aliasing.
2022-05-31 16:44:07 +02:00
Max Kellermann
826d1b207e
util/Manual: add type aliases
2022-05-31 16:44:07 +02:00
Max Kellermann
f92bae887f
util/Manual: add noexcept
2022-05-31 16:44:07 +02:00
Max Kellermann
d2983b7fde
net/SocketAddress: include cleanup
2022-05-31 13:54:19 +02:00
Max Kellermann
059955a48c
net/SocketAddress: add #ifdefs for std::span
2022-05-31 13:51:12 +02:00
Max Kellermann
6ebac6a0b2
net/StaticSocketAddress: use std::string_view instead of StringView
2022-05-31 13:49:18 +02:00
Max Kellermann
b5a9d0654e
net/Resolver: use std::copy()
2022-05-31 13:44:25 +02:00
Max Kellermann
242ba727b2
net/HostParser: use std::string_view instead of StringView
2022-05-31 13:44:25 +02:00
Max Kellermann
d5db4ca0e7
net/SocketAddress: GetSteadyPart() returns std::span
2022-05-31 13:32:27 +02:00
Max Kellermann
d256d3dabe
util/StringCompare: use std::string_view instead of StringView
2022-05-31 13:24:45 +02:00
Max Kellermann
759da033fc
lib/curl/Escape: use std::string_view instead of StringView
2022-05-31 13:22:56 +02:00
Max Kellermann
c074338f4c
system/EventFD: include cleanup
2022-05-31 12:43:26 +02:00
Max Kellermann
3dd2434149
lib/crypto/Base64: add overload which returns AllocatedArray<std::byte>
2022-05-24 14:29:41 +02:00
Max Kellermann
3699514d18
lib/xiph/VorbisPicture: use std::string_view instead of StringView
2022-05-24 14:24:48 +02:00
Max Kellermann
f045cf43e4
output/snapcast/Client: work around clang 14 std::span cast bug
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1538
2022-05-24 14:18:50 +02:00
Max Kellermann
843dad19e9
output/snapcast/Client: use std::string_view instead of StringView
2022-05-24 14:18:33 +02:00
Max Kellermann
73e2ac4211
tag/FixString: use std::string_view instead of StringView
2022-05-24 14:18:33 +02:00
Max Kellermann
6d113de1f8
tag/Handler: pass std::span to OnPicture()
2022-05-24 14:18:33 +02:00
Max Kellermann
2e6f115bcc
Merge branch 'v0.23.x'
2022-05-24 10:58:40 +02:00
Max Kellermann
a3fba2f8f7
python/build/libs.py: update CURL to 7.83.1
2022-05-24 10:56:29 +02:00
Max Kellermann
e2b671f1b2
python/build/libs.py: add --disable-vulkan to FFmpeg configuration
...
Fixes Android build failure with NDK r25 beta4 because "vulkan_beta.h"
was not found.
2022-05-24 10:55:55 +02:00
Max Kellermann
2a35fbe29e
python/build/libs.py: fix the OpenSSL SHA256
2022-05-24 10:55:55 +02:00
Max Kellermann
81cde72fd0
meson.build: suppress -Wstringop-overflow due to bogus libfmt warnings
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1536
2022-05-24 10:39:30 +02:00
Naglis Jonaitis
bf9ffba4f7
doc/user.rst: fix playlist plugin name option
...
`playlist_plugin` blocks use `name` to identify the plugins.
2022-05-24 10:22:45 +02:00
Dave Hocker
c975d8b943
Fix deprecation warnings caused by name changes in OSX audio inerfaces
2022-05-24 10:20:47 +02:00
Max Kellermann
97f78059a2
util/AllocatedArray: add missing type alias "value_type"
2022-05-23 22:15:20 +02:00
Max Kellermann
fd47edb905
apple/AudioObject: call AllocatedArray::data() instead of begin()
...
Since commit 5fb97b81d1 , begin() returns
an iterator class and not a pointer.
Fixes one part of https://github.com/MusicPlayerDaemon/MPD/issues/1538
2022-05-23 22:06:54 +02:00
Max Kellermann
8ee442e9b1
Merge branch 'v0.23.x'
2022-05-23 21:35:26 +02:00
Max Kellermann
2730f91872
.github/workflows/build.yml: build everything, not just unit tests (Linux)
2022-05-23 21:32:42 +02:00
Max Kellermann
97ca85e155
.github/workflows/build.yml: verbose build (Linux)
2022-05-23 21:32:02 +02:00
Max Kellermann
39bb4c5871
.github/workflows/build.yml: build everything, not just unit tests
2022-05-23 21:28:28 +02:00
Max Kellermann
bdceb90c59
.github/workflows/build.yml: verbose build
2022-05-23 21:25:28 +02:00
Max Kellermann
6633c7fd42
lib/crypto/Base64: use std::string_view
2022-05-20 11:25:04 +02:00
Max Kellermann
01b32d5ee0
util/WritableBuffer: remove unused library
2022-05-20 11:22:03 +02:00
Max Kellermann
1260a0147a
lib/crypto/Base64: use std::span
2022-05-20 11:21:44 +02:00
Max Kellermann
ef54b7d9de
archive/iso9660: use std::span
2022-05-20 11:15:45 +02:00
Max Kellermann
f66315d2de
MusicChunk: use std::span
2022-05-20 11:15:45 +02:00
Max Kellermann
b50173ae8b
util/CircularBuffer: use std::span
2022-05-20 11:15:45 +02:00
Max Kellermann
b37c031fd1
util/{HugeAllocator,SparseBuffer}: use std::span
2022-05-20 11:15:45 +02:00
Max Kellermann
84e5da4bf0
pcm/Silence: use std::span
2022-05-20 11:15:45 +02:00
Max Kellermann
3bb7693200
decoder/HybridDsd: remove
...
This is a proprietary extension which nobody appears to use.
2022-05-20 10:08:17 +02:00
Max Kellermann
b22c00d0cd
Merge branch 'v0.23.x'
2022-05-20 10:04:19 +02:00
Max Kellermann
7006b075c3
util/AllocatedArray: fix -Wunused-parameter
2022-05-20 09:48:49 +02:00
Max Kellermann
774024a41b
net/SocketAddress: add std::span cast operator
2022-05-19 20:52:48 +02:00
Max Kellermann
5fb97b81d1
util/AllocatedArray: migrate from {Const,Writable}Buffer to std::span
2022-05-19 20:52:48 +02:00
Max Kellermann
8bd1b5228c
lib/upnp/Compat: suppress -Wunused-but-set-parameter
2022-05-19 20:10:41 +02:00
Max Kellermann
23dd613ff9
system/VmaName: suppress -Wunused-parameter
2022-05-19 14:01:57 +02:00
Max Kellermann
bb7be9a4cd
util/*FifoBuffer: migrate from WritableBuffer to std::span
2022-05-19 14:01:57 +02:00
Max Kellermann
570755f05a
io/BufferedReader: migrate from WritableBuffer to std::span
2022-05-19 13:25:19 +02:00
Max Kellermann
957d3e51e0
util/{Const,Writable}Buffer: add std::span cast operators
2022-05-19 13:25:02 +02:00
Max Kellermann
fc6c274c97
pcm/{Dop,Dsd*}: explicitly capture "this"
...
Implicit capturing is deprecated in C++20.
2022-05-19 13:25:02 +02:00
Max Kellermann
313b092ba8
system/meson.build: depend on libfmt, not our log.a
...
Fixes linker error.
2022-05-19 13:25:02 +02:00
Max Kellermann
0e9e213324
meson.build: switch to C++20
2022-05-19 09:46:59 +02:00
Max Kellermann
86e6f4fcc0
Merge branch 'v0.23.x'
2022-05-19 09:27:06 +02:00
Max Kellermann
a009e95afd
.github/ISSUE_TEMPLATE/bug_report.md: add "Configuration" section
2022-05-19 09:26:21 +02:00
Max Kellermann
32aafb3572
.github/ISSUE_TEMPLATE/question.md: remove, we have GitHub discussions now
2022-05-19 09:25:00 +02:00
Max Kellermann
b577783cf0
.github/FUNDING.yml: remove, no funding
...
This was an experiment, but I decided I don't need that.
2022-05-19 09:24:22 +02:00
Max Kellermann
aa7b872a14
.github/workflows/build.yml: run "apt-get update"
...
The build has been failing for a week or two because the package lists
in the image are outdated.
2022-05-19 09:23:08 +02:00
Caleb Xu
c6f7f57776
apple/Throw: add missing <cstring> header
...
strlen() and strcpy() are provided by the <string.h> and <cstring>
headers (as functions in global and std namespaces, respectively).
Compilers MAY provide an implementation for either of the functions
without including the extra header but the existence of a declaration
without the header is not assured.
2022-05-19 09:08:44 +02:00
Max Kellermann
122db76781
Merge tag 'v0.23.7'
...
release v0.23.7
2022-05-09 23:14:07 +02:00
Max Kellermann
106ad08cd2
increment version number to 0.23.8
2022-05-09 23:12:17 +02:00
Max Kellermann
0341ca1b6a
release v0.23.7
2022-05-09 23:04:30 +02:00
Max Kellermann
7581ea55db
python/build/libs.py: update CURL to 7.83.0
2022-05-09 23:03:14 +02:00
Max Kellermann
fc9cee38d8
python/build/libs.py: update OpenSSL to 3.0.3
2022-05-09 23:03:14 +02:00
Max Kellermann
b175e4128d
encoder/meson.build: always generate encoder/Features.h
...
Fixes regression from commit 85f9863e0a
2022-05-09 22:52:59 +02:00
Max Kellermann
97b07798b0
doc/protocol.rst: clarify repeat/single/random side effects
2022-05-09 22:50:57 +02:00
Max Kellermann
112fcd206d
Merge branch 'fix-hls-seeking' of https://github.com/burrocargado/MPD into v0.23.x
2022-05-09 22:44:53 +02:00
BurroCargado
11d1f56062
Fix seeking HLS on-demand streaming not working
...
This issue occurs when playing HLS streaming delivered
from a server that does not support partial requests.
The issue is reproduced as follows(using Ubuntu 20.04 PC):
1. Prepare HLS example content.
$ mkdir test
$ ffmpeg -i example.flac -vn -c:a aac -b:a 128000 -f hls -hls_list_size 0 test/output.m3u8
(ffmpeg 4.2.4 is used)
2. Prepare web server without partial requests support.
(Docker version 20.10.12 and NGINX official Docker image is used)
$ docker run --name tmp-nginx-container -d nginx
$ docker cp tmp-nginx-container:/etc/nginx/conf.d/default.conf .
$ docker rm -f tmp-nginx-container
Edit default.conf and add "max_ranges 0;" to "location / {...}".
This disables partial requests support,
removes 'Accept-Ranges: bytes' header from the server response.
Then, run the server:
$ docker run --name test-nginx -v $PWD/test:/usr/share/nginx/html:ro -v $PWD/default.conf:/etc/nginx/conf.d/default.conf -d -p 8080:80 nginx
3. Setup MPD to Play the next URL.
http://address-of-the-server:8080/output.m3u8
Seeking this stream results in "exception: Not seekable".
2022-05-07 12:18:56 +09:00
BurroCargado
bd840d4638
decoder/plugins/FFmpegDecoder: fix IsSeekable()
...
AVFMTCTX_UNSEEKABLE signals the stream is not seekable
according to FFmpeg source code description:
8e98dfc57f/libavformat/avformat.h (L1181)
2022-05-07 09:48:04 +09:00
Max Kellermann
601e5e6abc
net/AddressInfo: add noexcept
2022-04-26 21:17:01 +02:00
Max Kellermann
6bacb23002
decoder/ffmpeg: add "noexcept"
2022-04-26 21:07:25 +02:00
Max Kellermann
5c300a9f1a
tag/ReplayGainParser: add "noexcept"
2022-04-26 21:06:26 +02:00
Max Kellermann
6e1500c251
Merge branch 'v0.23.x'
2022-04-26 21:05:39 +02:00
Max Kellermann
c3d393f214
tag/Id3Picture: fix unaligned access
2022-04-26 21:03:48 +02:00
Max Kellermann
f88fc0ca1a
util/ByteOrder: add class PackedBE32
2022-04-26 21:03:05 +02:00
Max Kellermann
fb8d8242ab
tag/ApeLoader: fix unaligned access
...
Fixes part 4 of https://github.com/MusicPlayerDaemon/MPD/issues/1490
2022-04-26 21:00:41 +02:00
Max Kellermann
f2a3dfd700
decoder/ffmpeg: add missing nullptr checks
...
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1490
2022-04-26 20:51:57 +02:00
Max Kellermann
9e1b24f3a1
input/{Async,Buffering,Thread}InputStream: set VMA name
2022-04-26 20:45:49 +02:00
Max Kellermann
58a345d346
MusicBuffer: set VMA name
...
Shows the name in /proc/PID/maps, e.g.:
7fa57b000000-7fa57c000000 rw-p 00000000 00:00 0 [anon:MusicBuffer]
2022-04-26 20:44:36 +02:00
Max Kellermann
7ed67d216b
util/HugeAllocator: add SetName()
2022-04-26 20:44:36 +02:00
Max Kellermann
3ae660ca90
system/VmaName: new library
2022-04-26 20:31:56 +02:00
Max Kellermann
a742e1fc71
util/PeakBuffer, ...: use [[gnu::]] attributes
2022-04-26 20:31:56 +02:00
Max Kellermann
85f9863e0a
meson.build: always enable Wave encoder for Snapcast
...
Even if the "wave_encoder" option is disabled (and no other encoder
plugins are enabled), forcefully enable the Wave encoder (if Snapcast
is enabled).
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1500
2022-04-26 20:13:43 +02:00
Max Kellermann
ce88dee14d
Merge branch 'v0.23.x'
2022-04-26 18:30:34 +02:00
Max Kellermann
83572701f4
python/build/libs.py: update Boost to 1.79.0
2022-04-26 18:27:51 +02:00
Max Kellermann
fa7d7e9187
python/build/libs.py: update OpenSSL to 3.0.2
2022-04-26 18:27:51 +02:00
Max Kellermann
f818cde32c
python/build/libs.py: update FFmpeg to 5.0.1
2022-04-26 18:27:51 +02:00
Max Kellermann
9da93cd887
python/build/libs.py: update zlib to 1.2.12
2022-04-26 18:27:51 +02:00
Rosen Penev
026e7ea32a
update all subprojecs
...
Done with meson wrap update
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2022-04-26 18:01:53 +02:00
Max Kellermann
9659d19718
lib/upnp/Init: use if with initalizer
2022-04-26 17:58:33 +02:00
Rosen Penev
50d35c9677
upnp: use UpnpInit2 always
...
libupnp 1.14 removes the non 2 function. Fixes compilation there.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1499
2022-04-26 17:57:48 +02:00
Thomas Guillem
4260e78861
android: add gdb.sh
...
This script setup a dummy android native app folder and call ndk-gdb from it.
It needs a modification in ANDROID_NDK since ndk-gdb may attach to the wrong
pid, cf. comments in the script.
2022-04-26 17:47:54 +02:00
Thomas Guillem
7342ae2e33
android: set application debuggable
...
This debuggable flag should not be set with release builds. Generally, graddle
is taking care of that.
2022-04-26 17:46:51 +02:00
Arsen Arsenović
35dbc1a90c
mixer,output: prevent setting volume before outputs are really enabled
...
Previous versions of MPD would call SetVolume on enabled outputs before
they are ready, causing all of MPD to crash. Checking the really_enabled
flag prevents this, though it also prevents setting volume before the
player starts.
Before (with the PipeWire output):
[i] ~$ mpc clear
volume: 81% repeat: off random: off single: off consume: off
[i] ~$ systemctl --user restart mpd.service
[i] ~$ mpc volume 100
MPD error: Connection closed by the server
[i] ~ 1 $
After:
[i] ~$ # mpd is freshly started w/o anything in the queue
[i] ~$ mpc
volume:100% repeat: off random: off single: off consume: off
[i] ~$ mpc volume 80
MPD error: problems setting volume
[i] ~ 1 $ mpc
volume:100% repeat: off random: off single: off consume: off
[i] ~$
2022-04-26 17:45:29 +02:00
Arsen Arsenović
c7a4355153
outputs/pipewire: fix ParamChanged incorrectly setting volume
...
Previous versions of MPD would, on parameter change, set the PipeWire
volume before clearing the restore_volume flag, causing the call to
short circuit and do nothing. Instead, clear the flag before the call.
2022-04-26 17:44:19 +02:00
Max Kellermann
33a84a8ca2
output/shout: use shout_set_metadata_utf8()
2022-04-26 17:41:21 +02:00
Max Kellermann
1d04490ed3
output/shout: use shout_set_content_format()
2022-04-26 17:38:43 +02:00
Max Kellermann
4a30c2d79c
output/shout: use shout_set_meta()
2022-04-26 17:24:49 +02:00
Max Kellermann
83072d6b9c
output/shout: pass reference to Setup()
2022-04-26 16:49:18 +02:00
Max Kellermann
c779fc37eb
output/shout: declare minimum version 2.4.0
...
This version was released 7 years ago, and it's reasonable to require
at least this version.
2022-04-26 16:46:36 +02:00
Max Kellermann
e08c13ad7e
output/shout: add "noexcept"
2022-04-26 15:57:03 +02:00
Max Kellermann
2c82a6b2e0
output/shout: handle shout_metadata_add() errors
...
Fixes -Wunused-result
2022-04-26 15:56:55 +02:00
Max Kellermann
3929f17aef
NEWS: mention the libiconv fix
2022-04-26 15:56:54 +02:00
Andreas Ziegler
ee39af3419
fix typo in comment
2022-04-24 04:14:17 +00:00
aeolio
3882a5a263
src/lib/icu: fix iconv() detection when libiconv is installed
2022-04-20 16:10:39 +02:00
Max Kellermann
a360475c7b
Merge branch 'v0.23.x'
2022-03-26 06:49:51 +01:00
Vitaly Ostrosablin
ac06088948
Make volume changes to apply to disabled software mixers.
...
Move audio output state check ahead of mixer check and force volume
applying even for disabled software mixed outputs.
This fixes incorrect software mixer volume that used to occur when
volume was changed while output being disabled.
This is easily reproduced with following sequence of commands on
multi-output software mixed MPD setup.
mpc volume 38; mpc disable 3; mpc volume 88; mpc enable 3
On current MPD, following commands would result in output 3 playing at
volume 38, while all other enabled outputs would play at volume
88. Moreover, global volume would display average of outputs real
volumes. In my case, it's 75.
After applying this patch, following commands would produce expected
behavior. All outputs play at expected (88) volume. And volume is
correctly displayed as 88.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1423
Signed-off-by: Vitaly Ostrosablin tmp6154@yandex.ru
Signed-off-by: Vitaly Ostrosablin <tmp6154@yandex.ru >
2022-03-26 06:29:18 +01:00
Max Kellermann
a757eebfbb
decoder/OggSyncState: allow skipping up to 64 kB after seek
...
This is more of what we did in commit 70bd35abe2 because it turns
out there are Ogg-Opus files with pages larger than 40 kB.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1487
2022-03-16 16:54:50 +01:00
Max Kellermann
2be4f89555
test/DumpOgg: new debug program
2022-03-16 16:51:44 +01:00
Tim Sweet
3a3f605a56
decoder/opus: Implement bitrate calculation
2022-03-15 10:34:23 +01:00
Max Kellermann
407fa2720a
Merge tag 'v0.23.6'
...
release v0.23.6
2022-03-14 18:58:47 +01:00
Max Kellermann
4a5c7d8261
increment version number to 0.23.7
2022-03-14 18:55:55 +01:00
Max Kellermann
f591193dda
release v0.23.6
2022-03-14 18:55:47 +01:00
Max Kellermann
434869900e
android/build.py: fix typo in error message
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1379
2022-03-14 18:49:50 +01:00
Max Kellermann
2aed7378cc
TagAny: support CUE tracks
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1482
2022-03-14 18:42:31 +01:00
Max Kellermann
71cd6e6248
lib/xiph/meson.build: define FLAC__NO_DLL for static libFLAC build (Windows)
...
In libFLAC 0.3.4 (commit c9530118a4 ), the "dllimport" check has been
changed from "_MSC_VER" to "_WIN32", and now the MPD build is affected
by it.
Defining FLAC__NO_DLL disables the use of "dllimport", which allows
linking properly to the static libFLAC build.
2022-03-14 15:08:59 +01:00
Max Kellermann
c83294916a
python/build/libs.py: update Boost to 1.78.0
2022-03-14 14:52:24 +01:00
Max Kellermann
603bbe0afd
python/build/libs.py: update libnfs to 5.0.1
2022-03-14 14:52:24 +01:00
Max Kellermann
c361e235eb
python/build/libs.py: update CURL to 7.82.0
2022-03-14 14:52:24 +01:00
Max Kellermann
8a59493d96
python/build/libs.py: update OpenSSL to 3.0.1
2022-03-14 14:50:06 +01:00
Max Kellermann
7ef86cbf9f
python/build/libs.py: update FFmpeg to 5.0
2022-03-14 14:50:06 +01:00
Max Kellermann
c9530118a4
python/build/libs.py: update FLAC to 1.3.4
2022-03-14 14:31:13 +01:00
Max Kellermann
878d9abeb7
python/build/libs.py: update libogg to 1.3.5
2022-03-14 14:29:59 +01:00
Max Kellermann
2d705efe1c
python/build/libs.py: update libmpdclient to 2.20
2022-03-14 14:29:22 +01:00
Richard Schorrig
aeaef85507
WasapiOutputPlugin pause bug fix
...
Wasapi output plugin won't start playing after being paused
The cause is that the scope guard in the WASAPI work thread
(WasapiOutputPlugin.cxx, function WasapiOutputThread::Work(), in the
while (true) loop) is set up too 'late' in the execution. There is one
condition ("if (data_in_frames >= buffer_size_in_frames)") when it is
hit, the loop will continue without executing the scope guard. This
scope guard is responsible for emptying the buffer again, and if the
buffer is not emptied, the above mentioned condition will stay true.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1451
2022-03-14 14:26:00 +01:00
nick black
ebae25d175
plugins/FfmpegIO: include libavutil/mem.h
...
ffmpeg from current git master no longer exposes
av_malloc() nor av_free() through other included
headers. directly include libavutil/mem.h to fix
compilation with (as-yet-unreleased) ffmpeg.
2022-03-14 14:11:31 +01:00
jcorporation
5ad1a01d7a
Remove bmp, tiff and add webp for coverimage filenames
...
- supporting bmp and tiff seems outdated
- webp is more widely used for coverimages
2022-03-14 14:09:23 +01:00
Max Kellermann
8f84e1befd
decoder/plugins/FfmpegIo: return AVERROR_EOF at end of file
...
This part of the AVIOContext API is not documented :-(
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1448
2022-03-14 14:00:28 +01:00
Max Kellermann
7293b32025
util/HexFormat: faster implementation without snprintf()
2022-03-14 12:18:52 +01:00
Max Kellermann
fed8f12863
input/plugins/QobuzClient: pass std::string_view to QueryStringBuilder()
2022-03-14 12:11:46 +01:00
Max Kellermann
9975905faf
output/PipeWire: initialize field "stream" in Open()
...
Must be initialized for the check in SetVolume().
2022-03-09 14:29:46 +01:00
Max Kellermann
718ae433b2
Merge branch 'build-nits' of git://github.com/sp1ff/MPD
2022-02-27 17:23:17 +01:00
Michael Herstine
ed65f52f50
Address feedback on PR #1452 .
...
Move the invocation of `find_program` for doxygen into the if
branch & make failure to find the program fatal.
2022-02-27 08:00:12 -08:00
Michael Herstine
ba1d86ec80
Add (resurrect?) doxygen support.
...
Added a `doxygen` option to the `doc` build. It makes use of the
already-present but unused file `doxygen.conf.in`.
2022-02-20 10:42:39 -08:00
Max Kellermann
7661c408a4
Merge branch 'master' of git://github.com/jcorporation/MPD
2022-02-16 05:29:22 +01:00
Max Kellermann
ee8d5f18ef
doc/protocol.rst: fix misnamed priority filter
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1443
2022-02-16 05:29:02 +01:00
Jürgen Mang
de3b9b8232
Update protocol version to 0.24.0
2022-02-15 23:12:06 +01:00
Max Kellermann
8e99448819
lib/curl/Headers: make the comparison type "transparent"
2022-02-14 18:19:28 +01:00
Max Kellermann
1e548fb6e3
lib/curl/Headers: central type definition for the header map
2022-02-14 18:19:05 +01:00
Max Kellermann
fdc0329e64
archive/List: add option to disable archive plugins in mpd.conf
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1384
2022-02-14 17:54:21 +01:00
Max Kellermann
d3db0400b0
archive/List: convert pointer to reference
2022-02-14 16:43:44 +01:00
Max Kellermann
b1096a9935
test/{visit_archive,dump_text_file}: add basic config file support (not wired yet)
2022-02-14 16:43:37 +01:00
Max Kellermann
ab5b6f83fd
queue/Print: support sorting by priority
2022-02-14 14:10:33 +01:00
Max Kellermann
2172aaf1ce
song/PrioritySongFilter: new filter
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1412
2022-02-14 14:06:37 +01:00
Max Kellermann
c68dbc4e5c
queue/Queue: add method GetLight()
2022-02-14 13:33:34 +01:00
Max Kellermann
ec961f26e9
song/DetachedSong: add API docs
2022-02-14 13:27:52 +01:00
Max Kellermann
c3be961ccf
queue/Print: implement sorting
2022-02-14 13:07:13 +01:00
Max Kellermann
166ce0da5a
db/VHelper: move CompareTags() to tag/Sort.cxx
2022-02-14 12:37:05 +01:00
Max Kellermann
edbaea8df2
db/Selection: refactor IsEmpty() to IsFiltered()
2022-02-14 09:21:32 +01:00
Max Kellermann
af3a625f64
time/Convert: move GetTimeZoneOffset() to Zone.cxx
2022-02-14 09:21:10 +01:00
Max Kellermann
11d24a583d
command/queue: "playlistfind"/"playlistsearch" have a "window" parameter
2022-02-14 09:12:19 +01:00
Max Kellermann
e9e3d8c57c
queue/Selection: add "window" field
2022-02-14 09:12:18 +01:00
Max Kellermann
5588291a35
queue/Selection: wrap SongFilter in a new struct
2022-02-14 09:12:18 +01:00
Max Kellermann
4b41e766c6
queue/Queue{Save,Print}: remove redundant "Queue" prefix from file name
2022-02-14 09:12:06 +01:00
Max Kellermann
90d52b6501
Merge branch 'v0.23.x'
2022-02-14 09:11:50 +01:00
Max Kellermann
233184568c
doc/protocol.rst: describe the FILTER argument to playlist{find,search}
2022-02-14 09:11:41 +01:00
Wolfgang Müller
59da778009
doc/user.rst: Clarify how MPD reads metadata
...
The writing and reading of metadata involves lots of different programs
and libraries. Therefore it is prudent to point out how exactly MPD
receives metadata. Ideally this helps to point users to the right place
if their tags are not picked up correctly.
2022-02-14 09:11:11 +01:00
Max Kellermann
ad4cf79cc9
tag: new tag "Mood"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1435
2022-02-12 07:50:18 +01:00
dgcampea
4f3828237a
Fix DSCP LE value
...
Correct value is 0x04 since we need to account for the 2 ECN bits.
2022-02-02 16:29:01 +00:00
Max Kellermann
946cf25732
Merge branch 'v0.23.x'
2022-01-26 14:44:37 +01:00
Max Kellermann
108ce95b7c
android/Receiver: fix indent
2022-01-26 14:43:47 +01:00
Max Kellermann
86e9ed5f3a
decoder/opus: fix "readpicture" on Opus files
...
Don't return early from ScanOpusTags() if only
TagHandler::WantPicture() is set.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1413
2022-01-26 14:43:45 +01:00
Sam Bazley
fbecb05bf4
Fix Android build error: needs_exe_wrapper
...
lib/src/libmpdclient-2.19/meson.build:1:0: ERROR: Unknown options: "needs_exe_wrapper"
The "needs_exe_wrapper" option was incorrectly set under
[built-in options] rather than [properties].
2022-01-11 20:33:48 +01:00
Max Kellermann
be72d45356
output/httpd: add config option "dscp"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1401
2022-01-11 20:31:52 +01:00
Max Kellermann
219c416a1e
event/ServerSocket: rename ip_tos to dscp_class and support IPv6
2022-01-11 20:31:52 +01:00
Max Kellermann
16f7ec9950
net/DscpParser: new library
2022-01-11 20:31:52 +01:00
Max Kellermann
d79bf853b1
output/httpd: make configuration fields const
2022-01-10 22:59:50 +01:00
Max Kellermann
1ae6378d85
event/ServerSocket: add ip_tos setting
2022-01-10 22:59:50 +01:00
Max Kellermann
089a843abd
net/SocketDescriptor: add method SetIntOption()
2022-01-10 21:36:15 +01:00
Max Kellermann
aea4d3c4b0
lib/zlib/GunzipReader: use std::size_t
2022-01-10 16:59:13 +01:00
Sam Bazley
4983703375
Android: Detect output change with ACTION_AUDIO_BECOMING_NOISY
...
Improves the changes made in 57687779be by
using AudioManager.ACTION_AUDIO_BECOMING_NOISY rather than listening for
wired headset unplug events or Bluetooth headset disconnect events. This
method is more flexible, allowing the feature to work on other types of
audio output device, as well as Bluetooth devices that don't set their
device class correctly. This change also has the benefit of being more
responsive, pausing the audio before it is rerouted to the built-in
speaker.
https://developer.android.com/guide/topics/media-apps/volume-and-earphones
2022-01-04 16:42:53 +01:00
aeolio
3856224df9
lib/alsa/Error: add missing #include
2021-12-15 11:14:38 +01:00
aeolio
6d4bedfc56
lib/alsa/Error: fix typo
2021-12-15 11:14:34 +01:00
Max Kellermann
dda0dfc140
lib/curl/Request: move code from SetupEasy() to Setup.cxx
2021-12-08 20:03:30 +01:00
Max Kellermann
e0f56b9e2d
lib/curl/Request: move code to class CurlResponseHandlerAdapter
2021-12-08 19:51:54 +01:00
August2111
3c3c3eeeca
MSVC: use winsock2.h instead of sys/time.h for struct timeval
2021-12-08 19:45:03 +01:00
Max Kellermann
31c7151580
time/Calendar: add DaysInYear()
2021-12-08 19:44:31 +01:00
Max Kellermann
50a617764a
lib/curl/Handler: fix typo
2021-12-08 19:41:39 +01:00
Max Kellermann
7d67c87a47
io/FileReader: use std::size_t
2021-12-08 19:40:22 +01:00
Philipp Wollschlegel
c072902f23
io/FileOutputStream: merge win32 function Cancel
...
Win32 had a separate implementation for FileOutputStream::CANCEL Logic
was added to the other platform function, but forgotten in this one.
This merges the functions into one, as only the call for file deletion
is platform specific.
2021-12-08 19:35:11 +01:00
Max Kellermann
5ad4f3c54b
system/EventPipe: include cleanup
2021-12-08 19:32:06 +01:00
Max Kellermann
0b6055954d
thread/AsyncWaiter: new class
...
Merges some redundant code.
2021-12-08 19:26:57 +01:00
Max Kellermann
80c177e9a0
io/BufferedOutputStream: add missing char* cast
2021-12-07 12:07:13 +01:00
Max Kellermann
cdcef49eef
lib/curl/Request: add constructor with CurlEasy parameter
2021-12-07 12:01:09 +01:00
Max Kellermann
9e18aafccc
lib/curl/Request: use std::size_t
2021-12-07 12:00:12 +01:00
Max Kellermann
f7346c1d78
lib/curl/Request: move code to SetupEasy()
2021-12-07 11:57:42 +01:00
Max Kellermann
b709401814
lib/curl/Request: add API docs
2021-12-07 11:56:45 +01:00
Max Kellermann
4074db5f50
io/BufferedReader: use std::size_t
2021-12-07 11:54:11 +01:00
Max Kellermann
8c6bc02bf7
io/BufferedOutputStream: use std::byte
2021-12-07 11:47:45 +01:00
Max Kellermann
35c11afd54
player/Thread: add option "mixramp_analyzer"
2021-12-06 23:06:08 +01:00
Max Kellermann
c884e2f285
config/PlayerConfig: default buffer size is 8 MB
...
Computers are getting more and more RAM, and 8 MB is rarely ever
noticable, but allows longer MixRamp-assisted cross-fading.
2021-12-06 23:05:45 +01:00
Max Kellermann
b6ba17a865
Merge branch 'v0.23.x'
2021-12-06 21:32:48 +01:00
Max Kellermann
bea821f194
doc/user.rst: add MixRamp documentation
2021-12-06 21:32:39 +01:00
Max Kellermann
713c7585b5
pcm/MixRampAnalyzer: a MixRamp implementation
2021-12-06 21:09:28 +01:00
Max Kellermann
f12c25b7ae
pcm/ReplayGainAnalyzer: new library
2021-12-06 21:06:19 +01:00
Max Kellermann
0a54b987a1
test/run_filter: move ReadFrames() to separate source
2021-12-06 10:31:52 +01:00
Max Kellermann
2240327286
ReplayGainInfo: move to tag/
2021-12-06 09:28:36 +01:00
Rosen Penev
4e276256c0
more braced init list conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-12-06 09:16:04 +01:00
Max Kellermann
866e7ff3ce
config/PlayerConfig: move code to functions
2021-12-06 09:14:36 +01:00
Tim Siegel
d0f9062b56
mpdconf.example: fix a few spelling typos
2021-12-05 22:58:45 +01:00
Max Kellermann
2cafbb2aba
player/CrossFade: move code to CanCrossFade()
2021-12-03 23:45:34 +01:00
Max Kellermann
b78c64376f
player/Thread: move code to CheckCrossFade()
2021-12-03 23:32:41 +01:00
Max Kellermann
2518612b1b
player/CrossFade: add method IsMixRampEnabled()
2021-12-03 23:22:55 +01:00
Max Kellermann
dda521a150
ReplayGain{Config,Global}: move to config/
2021-12-03 23:08:16 +01:00
Max Kellermann
95a155b10d
Partition: pass configuration as struct
2021-12-03 23:03:41 +01:00
Max Kellermann
2384a240e0
increment version number to 0.24
2021-12-03 23:01:43 +01:00
Max Kellermann
b9cc036703
.github/workflows/build.yml: rebuild branch v0.23.x
2021-12-03 23:00:42 +01:00
Max Kellermann
4e9b88559b
SingleMode: convert "pure" to "const"
2021-12-03 16:09:34 +01:00
Max Kellermann
3452682a42
IcyMetaDataParser: move to tag/
2021-12-03 16:07:39 +01:00
Max Kellermann
9262b24504
AudioCompress: move to pcm/
2021-12-03 16:04:59 +01:00
Max Kellermann
a5fa43b526
fs/io: move to io/
2021-12-03 14:35:41 +01:00
Max Kellermann
8681a3d74c
replace TextFile references with LineReader
2021-12-03 14:22:56 +01:00
Max Kellermann
f9c4d88b12
fs/io/TextFile: add interface LineReader
2021-12-03 14:20:29 +01:00
Max Kellermann
799032505e
io/uring/Queue: add method RequireSubmitEntry()
...
Fixes assertion failure when the submit queue is empty.
2021-12-03 13:58:39 +01:00
Max Kellermann
c8f174ac92
io/uring/Operation: disallow copying
2021-12-03 13:52:04 +01:00
Max Kellermann
047e169f3e
util/BindMethod: merge MakeBind{Method,Function}Wrapper(), they are identical now
2021-12-03 13:51:56 +01:00
Max Kellermann
687327c9e8
util/BindMethod: merge structs {Method,Function}SignatureHelper into one
2021-12-03 13:51:56 +01:00
Max Kellermann
26dc37bd76
util/BindMethod: merge structs {Method,Function}WrapperGenerator into one
2021-12-03 13:51:55 +01:00
Max Kellermann
c693e4aa64
util/BindMethod: remove unused struct MethodWithSignature
2021-12-03 13:51:55 +01:00
Max Kellermann
acab731fef
util/BindMethod: simplify MakeBindFunctionWrapper()
2021-12-03 13:51:55 +01:00
Max Kellermann
7e4ba3cb72
util/BindMethod: add MethodSignatureHelper::function_pointer
2021-12-03 13:51:55 +01:00
Max Kellermann
172c4d9c7d
util/BindMethod: remove unnecessary template arguments from BindMethodWrapperGenerator
2021-12-03 13:51:55 +01:00
Max Kellermann
bd5f6cbc7b
util/BindMethod: simplify more templates using "auto" template arguments
2021-12-03 13:51:55 +01:00
Max Kellermann
6fcd1c734b
util/BindMethod: eliminate struct BindMethodWrapperGenerator2
2021-12-03 13:51:55 +01:00
Max Kellermann
eca097dbfb
util/BindMethod: simplify more templates using "auto" template arguments
2021-12-03 13:51:55 +01:00
Max Kellermann
51ffafa011
util/BindMethod: use std::remove_reference_t
2021-12-03 13:51:25 +01:00
Max Kellermann
8dca602346
util/BindMethod: simplify BindMethod()
2021-12-03 13:51:18 +01:00
Max Kellermann
0ed24f3a05
util/IntrusiveList: disallow copying IntrusiveListHook
2021-12-03 13:50:05 +01:00
Max Kellermann
e25e0030e7
increment version number to 0.23.6
2021-12-01 20:01:22 +01:00
Max Kellermann
df4b6b92f2
release v0.23.5
2021-12-01 20:00:00 +01:00
Max Kellermann
1c69913eca
decoder/flac: submit MixRamp only if there is actual data
2021-12-01 17:58:51 +01:00
Max Kellermann
cb5c6259fd
decoder/mad: submit MixRamp only if there is actual data
...
Fixes MixRamp failures when a MP3 file has two ID3 tags, one of them
without MixRamp.
2021-12-01 17:19:53 +01:00
Max Kellermann
bf287fefb5
decoder/mad: move parse_id3_mixramp() to tag/Id3MixRamp.cxx
2021-12-01 17:11:36 +01:00
Max Kellermann
20bf1d68e6
MixRampInfo: move to tag/
2021-12-01 17:09:02 +01:00
Max Kellermann
9bc4c168fd
tag/MixRamp: rename to MixRampParser.cxx
2021-12-01 17:07:53 +01:00
Max Kellermann
3415049d1c
test/tag/TestMixRampParser: include the header, not the .cxx file
2021-12-01 17:07:39 +01:00
Max Kellermann
a45949b597
tag/MixRamp: [[gnu::...]] attributes
2021-12-01 15:48:33 +01:00
Max Kellermann
6009d4abab
tag/MixRamp: use std::string_view
2021-12-01 15:47:54 +01:00
Max Kellermann
16fb843c9b
tag/MixRamp: fix typo which broken MixRamp
...
Fixes regression by commit 8e0d810968 which is 2 years old, and nobody
noticed. D'oh, how embarassing!
2021-12-01 15:46:31 +01:00
Max Kellermann
36b333459b
test/tag/TestMixRampParser: new unit test
2021-12-01 15:46:01 +01:00
Max Kellermann
4d3320233e
test/test_mixramp: move to test/tag/
2021-12-01 15:33:17 +01:00
Max Kellermann
933a1a41e6
lib/upnp/Discovery: use InjectEvent instead of DeferEvent
...
Fixes regression by commit 774b4313f2
2021-11-30 18:03:27 +01:00
August2111
1ff8626716
MSVC util/StringAPI.hxx add usage of MSVC compiler
2021-11-26 17:30:17 +01:00
Max Kellermann
c30466b84a
net/IPv4Address: add method GetPortBE()
2021-11-26 16:25:43 +01:00
Max Kellermann
868f1a4431
net/UniqueSocketDescriptor, ...: include <utility> instead of <algorithm>
...
Since C++11, std::swap() lives in <utility>.
2021-11-26 16:25:29 +01:00
Max Kellermann
05f529fffd
util/StringStrip: use [[gnu::...]] attributes
2021-11-26 16:24:55 +01:00
Max Kellermann
f01388559f
.github/workflows/build.yml: fix the ccache.key
2021-11-26 13:32:48 +01:00
Max Kellermann
27edd4a610
.github/workflows: merge build-{linux,macos}.yml into one
2021-11-26 13:32:08 +01:00
Max Kellermann
cc421b04cd
test/meson.build: add "protocol:gtest" where appropriate
2021-11-26 08:47:06 +01:00
Max Kellermann
3f2bc325a1
test/meson.build: fix test() indent
2021-11-26 08:40:40 +01:00
Max Kellermann
54686dfd79
test/meson.build: add dependencies on run_input
...
Fixes spurious unit test failures because run_input has not yet been
built.
2021-11-26 08:35:49 +01:00
Rosen Penev
f22cf02ed8
fix wrong namespace name
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-26 08:08:45 +01:00
Rosen Penev
5b51d0f733
use some auto
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-26 08:08:45 +01:00
Rosen Penev
e03f82636a
const reference conversion
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-23 12:33:03 -08:00
Rosen Penev
d53d85bd79
remove unused includes
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-23 12:33:03 -08:00
Max Kellermann
4682ae0898
command/database: support relative offsets for "searchadd"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1337
2021-11-23 12:17:32 +01:00
Max Kellermann
fd5b195879
.github/workflows/build-macos.yml: use actions/setup-python@v1
...
Without it, BSFishy/meson-build defaults to /usr/local/bin/python,
which is Python 2.
2021-11-23 12:17:32 +01:00
Max Kellermann
bb5df9839d
.github/workflows/build-macos.yml: install Meson, ninja and Boost
2021-11-23 12:17:32 +01:00
Max Kellermann
be34d55291
.github/workflows: add macOS build
2021-11-23 11:41:40 +01:00
Max Kellermann
c13911b171
.github/workflows: auto-build with GitHub Actions
2021-11-23 10:45:14 +01:00
Max Kellermann
6f83bdd6f3
Merge branch '1' of git://github.com/neheb/MPD
2021-11-23 10:39:07 +01:00
Rosen Penev
9bcd425a85
array conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-23 01:38:10 -08:00
Max Kellermann
ec917f70d2
Merge remote-tracking branches 'neheb/2' and 'neheb/3'
2021-11-23 09:23:43 +01:00
Rosen Penev
40ce4eeb43
use cinttypes header
...
stdint.h is deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-22 23:30:36 -08:00
Rosen Penev
29ae84e199
manual braced init
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-22 23:30:04 -08:00
Rosen Penev
250011f016
return by braced init list
...
shorter
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-22 23:28:08 -08:00
Max Kellermann
e08c85ae2d
doc/mpd.conf.5.rst: move ReplayGain documentation to user.rst
2021-11-22 22:25:04 +01:00
Max Kellermann
dcb5ca203c
db/DatabasePlaylist: increment only one variable
...
Fixes "searchaddpl" bug emitting bogus error "Bad position".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1338
2021-11-22 20:47:34 +01:00
Max Kellermann
77df5a8f24
lib/pcre: migrate to PCRE2
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1352
2021-11-22 19:32:45 +01:00
kaliko
d6bebd2507
doc/conf.py: Set sidebar width to 300px to limit wrapping
...
This enhances readability in sidebar, especially for "User’s Manual" and
"Protocol" pages
2021-11-20 10:49:15 +01:00
Max Kellermann
f74996c02f
Merge remote-tracking branches 'neheb/1', 'neheb/2', 'neheb/3', 'neheb/4' and 'neheb/5'
2021-11-20 07:55:24 +01:00
Max Kellermann
eea2d35d3a
util/AllocatedString, ...: add missing include for std::exchange()
...
Fixes building with GCC 12.
2021-11-19 16:06:20 +01:00
Max Kellermann
d94e8bd82d
queue/IdTable: include cleanup
2021-11-19 16:03:09 +01:00
Max Kellermann
b0c92e1a34
queue/IdTable: lazy-initialize the "data" array
...
With large "max_playlist_length" settings, the "data" array can be
very large, and initializing it during MPD startup causes page faults,
resulting in allocation of physical RAM. This commit postpones the
initialization until the queue is really large, to avoid wasting
memory.
2021-11-19 16:00:39 +01:00
Max Kellermann
ead5bcf048
queue/IdTable: make size const
2021-11-19 15:51:10 +01:00
kaliko
bdd268a524
doc/user.rst: update build dependencies on Debian Bullseye
2021-11-19 11:04:47 +01:00
Shen-Ta Hsieh
e783c2bd2c
util/LazyRandomEngine: use std::optional to avoid allocation
...
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com >
2021-11-14 03:53:42 +08:00
Rosen Penev
837fc98638
use const references
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 17:18:33 -08:00
Rosen Penev
5deca66fdc
add various nodiscard
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 17:17:26 -08:00
Rosen Penev
cfe2dd4147
use nullptr
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 17:16:19 -08:00
Rosen Penev
00f8d65a17
remove std::move
...
clang-tidy reports this is trivially copyable and thus std::move has no
effect.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 17:15:21 -08:00
Rosen Penev
4e0e4c00bf
treewide: replace lock_guard with scoped_lock
...
SonarLint reports the latter to be better:
std::scoped_lock basically provides the same feature as std::lock_guard,
but is more generic: It can lock several mutexes at the same time, with a
deadlock prevention mechanism (see {rule:cpp:S5524}). The equivalent code
to perform simultaneous locking with std::lock_guard is significantly more
complex. Therefore, it is simpler to use std::scoped_lock all the time,
even when locking only one mutex (there will be no performance impact).
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 17:13:03 -08:00
Max Kellermann
a8c77a6fba
Merge branch '1' of git://github.com/neheb/MPD
2021-11-11 10:33:17 +01:00
Rosen Penev
31aa6d0c4f
use auto with make_unique
...
C arrays can be used with make_unique in C++17.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 01:33:03 -08:00
Max Kellermann
d051c4931d
Merge branch '2' of git://github.com/neheb/MPD
2021-11-11 10:32:45 +01:00
Rosen Penev
94b0baceb0
convert address_family_ranking to std::array
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-11-11 01:27:31 -08:00
Max Kellermann
16feb261e2
increment version number to 0.23.5
2021-11-11 10:18:19 +01:00
Max Kellermann
f084bf7872
release v0.23.4
2021-11-11 10:16:36 +01:00
Max Kellermann
1112d3907a
Revert "systemd: add "RuntimeDirectory" directive"
...
This reverts commit 552c30eae4 .
It has caused various problems; for example, MPD wasn't able to write
the pid_file (which was already mitigated by commit a4e4217204 ).
And apparently, the socket file created in the same directory by
mpd.socket disappears when mpd.service (re)creates the directory. I
could not reproduce this problem with 247.3, but maybe this is a bug
in older systemd versions?
Until we figure out why this happens, let's remove the
RuntimeDirectory directive. A future MPD version may be launched as
regular user, not as root, which will eliminate one major problem with
RuntimeDirectory.
2021-11-11 10:16:13 +01:00
Max Kellermann
3464497880
command/database: add optional position parameter to "searchaddpl"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1328
2021-11-11 09:52:49 +01:00
Max Kellermann
651f57bced
command/playlist: save only if at least one song was added
2021-11-11 09:50:31 +01:00
Max Kellermann
b4e72aba6c
command/playlist: move code to SearchInsertIntoPlaylist()
2021-11-11 09:40:41 +01:00
0xC0ncord
061dd2dfef
output/plugins: fix build error with clang and -stdlib=libc++
...
This fixes this build error observed with clang and -stdlib=libc++:
../mpd-0.23.3/src/output/plugins/PipeWireOutputPlugin.cxx:661:55: error: implicit instantiation of undefined template 'std::array<std::byte, 64>'
std::array<std::byte, MAX_CHANNELS * MAX_INTERLEAVE> buffer;
^
/usr/include/c++/v1/__tuple:219:64: note: template is declared here
template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
^
2021-11-10 15:35:56 -05:00
Max Kellermann
5f4ec7de5b
decoder/ffmpeg, lib/ffmpeg: make AVCodec pointers "const"
...
For libavcodec 59 support.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1333
2021-11-09 21:09:14 +01:00
Max Audron
6f81bb4b09
upnp: add option to configure interface for db plugin
...
Add an option to the UPnP database plugin to configure which interface
is used by upnp to discover servers.
upnp by default selects the first interface that is not loopback, which
in some cases might not be the desired interface. For example if wanting
to access a DLNA server over a VPN connection.
The "interface" option can now be set to the name of the desired
interface to achieve this.
The default behaviour remains unchanged.
2021-11-08 23:04:07 +01:00
Max Audron
4ed60a5711
upnp: expose interface configuration on UpnpInit2()
...
Adds the Interface Name as an argument to the *Init functions to make it
possible to select which interface is used by upnp to detect servers.
Currently "nullptr" is passed in to let the upnp library select an
interface, as before.
2021-11-08 22:53:01 +01:00
Max Kellermann
c93195c94b
NEWS: fix typo
2021-11-05 14:45:43 +01:00
Max Kellermann
f30adac4bb
doc/mpdconf.example: add comments recommending not to use log_file and pid_file
2021-11-05 09:06:27 +01:00
Max Kellermann
a4e4217204
Main: ignore the "pid_file" setting if started as systemd service
...
Commit 552c30eae caused problems for those people who still had a
"pid_file" setting (even though that is obsolete with systemd),
because now /run/mpd is owned by root:root (our mpd.service has no
User=mpd directive, so systemd starts MPD as root).
To work around this problem, and to be able to keep
RuntimeDirectory=mpd (which solved a problem of other MPD users), the
best compromise seems to just ignore the "pid_file" setting when it is
of no use.
2021-11-05 09:02:56 +01:00
Max Kellermann
8754d705a1
CommandLine: rename struct options
2021-11-05 08:57:12 +01:00
Max Kellermann
23d4a2d6a5
Main: pass struct options by reference
2021-11-05 08:56:05 +01:00
Max Kellermann
ce77b148d9
CommandLine: add option --systemd
...
This way, MPD can reliably detect whether it was started as systemd
service, which is better than checking sd_booted(), which only checks
whether systemd manages all services, but still MPD could be started
manually.
2021-11-05 08:51:49 +01:00
Max Kellermann
be3eca39e8
NEWS: add missing lines
2021-11-04 17:59:02 +01:00
Max Kellermann
3413b1aeb4
output/alsa: add option thesycon_dsd_workaround
2021-11-04 17:55:53 +01:00
Max Kellermann
356d13e9dd
lib/alsa/HwSetup: add missing include
2021-11-04 17:55:15 +01:00
Max Kellermann
fa34bf0aaf
Merge branch 'feature/win32-disable-openmpt123' of git://github.com/ibmibmibm/MPD
2021-11-04 15:11:26 +01:00
Max Kellermann
5d0941476a
lib/alsa/Error: a std::system_error category for libasound errors
2021-11-04 14:59:00 +01:00
Max Kellermann
5ff0bbd0f8
lib/fmt/AudioFormatFormatter: add formatter for SampleFormat
2021-11-04 14:55:01 +01:00
Shen-Ta Hsieh
a3764e533c
python/build/libs.py: disable building libopenmpt cli
...
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com >
2021-11-04 21:54:12 +08:00
Shen-Ta Hsieh
3e05cba30e
python/build/libs.py: update libopenmpt configure flags
...
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com >
2021-11-04 15:23:24 +08:00
Max Kellermann
14b3c0f0af
event/Loop: destruct the Uring::Manager in the destructor before assert()
...
Fixes assertion failure when the EventLoop gets destructed before
Run() was ever called.
Fixes https://bugs.debian.org/998310
2021-11-03 18:32:14 +01:00
Max Kellermann
67aff05051
increment version number to 0.23.4
2021-10-31 18:17:35 +01:00
Max Kellermann
19a101c3ac
release v0.23.3
2021-10-31 18:13:10 +01:00
Max Kellermann
8da17a8211
doc/user.rst: add optimized build options to examples
2021-10-31 17:09:16 +01:00
Max Kellermann
2748929039
doc/user.rst: add -Dwrap_mode=forcefallback to Android/Windows examples
2021-10-31 17:08:59 +01:00
Max Kellermann
0c900a4bfa
doc/user.rst: pass -Dandroid_debug_keystore=... to ./android/build.py
2021-10-31 17:03:37 +01:00
Max Kellermann
f1d5d70010
android/run-javac.sh: switch to Java 7
2021-10-31 16:55:40 +01:00
Max Kellermann
56ebc7637d
python/build/libs.py: update FFmpeg to 4.4.1
2021-10-31 16:44:11 +01:00
Max Kellermann
996dd9fc8b
python/build/libs.py: update libopenmpt to 0.5.12
2021-10-31 16:42:50 +01:00
Max Kellermann
056514d598
output/snapcast: reset unflushed_input after successful read
...
With the "wave" encoder, this has no effect, but it's more correct.
2021-10-31 16:35:42 +01:00
Max Kellermann
9a21bdfd6a
output/snapcast: implement Pause()
...
This uncomments the code which had been present already in the first
Snapcast commit (copied from the "httpd" output plugin), but I
commented it because I did not know whether I needed to send silence
samples to all Snapcast clients.
As a side effect, this fixes playback when no Snapcast client is
connected; this was broken because Pause() always returned a positive
value when there were no clients.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1310
2021-10-31 16:26:29 +01:00
Max Kellermann
03f99dd26e
db/update/Walk: use GetFilenameSuffix() instead of uri_get_suffix()
...
Unlike GetFilenameSuffix(), uri_get_suffix() removes the query string
first, which breaks file names with question marks in the name.
Therefore, uri_get_suffix() shall only be applied to remote URIs.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1316
2021-10-31 13:18:24 +01:00
Max Kellermann
bfb1b641f9
db/update/InotifyUpdate: fix use-after-free bug
...
Regression by commit 2d8847f428
2021-10-28 13:39:38 +02:00
Naglis Jonaitis
72ba98c464
doc/protocol.rst: add missing backtick
2021-10-27 02:11:39 +03:00
Max Kellermann
dcd19c0592
config/Path: use StringView::Split()
2021-10-26 12:55:01 +02:00
Max Kellermann
109159e0f7
Permission: use StringView::Split()
2021-10-26 12:25:47 +02:00
Max Kellermann
409b877eea
output/ao: include cleanup
2021-10-26 12:20:18 +02:00
Max Kellermann
c5bf7948ff
fs/StandardDirectory: use the RUNTIME_DIRECTORY environment variable
2021-10-26 09:30:16 +02:00
Max Kellermann
b9f7127691
fs/StandardDirectory: add GetAppRuntimeDir()
2021-10-26 09:30:16 +02:00
Max Kellermann
1e6f5f012c
fs/StandardDirectory: add GetUserRuntimeDir()
2021-10-26 09:30:16 +02:00
Max Kellermann
225d85fd9b
fs/StandardDirectory: use "if" with initializer
2021-10-26 09:29:57 +02:00
Max Kellermann
1bb22f118d
fs/StandardDirectory: add more pure/const attributes
2021-10-26 09:04:20 +02:00
Max Kellermann
552c30eae4
systemd: add "RuntimeDirectory" directive
2021-10-26 08:38:36 +02:00
Max Kellermann
48e8a26813
command/playlist: allow range in playlistdelete
2021-10-25 12:23:37 +02:00
Max Kellermann
ade847bc89
PlaylistFile: fold spl_move_index() into handle_playlistmove()
2021-10-25 12:13:45 +02:00
Max Kellermann
a6173e0eae
command/playlist: add position parameter to "playlistadd"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1106
2021-10-25 12:10:47 +02:00
Max Kellermann
4529bb4a83
doc/protocol.rst: add "since" version notes
2021-10-25 08:47:23 +02:00
Max Kellermann
258ecb764f
PlaylistFile: add class PlaylistFileEditor
2021-10-23 13:54:50 +02:00
Max Kellermann
6f595e9abb
command/queue: add optional position parameter to "add"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1285
2021-10-23 13:12:44 +02:00
Max Kellermann
35c4c7e8bf
command/queue: move #ifdef out of AddDatabaseSelection()
2021-10-23 13:09:04 +02:00
Max Kellermann
293ed924d1
command/queue: pass Partition to AddDatabaseSelection()
2021-10-23 13:06:31 +02:00
Max Kellermann
c8121176b3
output/alsa: add option "stop_dsd_silence" to work around DSD DAC noise
2021-10-23 12:25:32 +02:00
Max Kellermann
ee270f9b00
meson.build: log_dep is only needed internally
2021-10-23 12:08:43 +02:00
Max Kellermann
bf1d77a4d8
output/alsa: un-inline several methods
2021-10-23 12:02:27 +02:00
Max Kellermann
a9344fafe9
lib/alsa/AllowedFormat: use StringView::RemoveSuffix()
2021-10-23 11:43:31 +02:00
Max Kellermann
b8890726f2
lib/alsa/AllowedFormat: use std::string_view
2021-10-23 11:42:30 +02:00
Max Kellermann
0f84332654
output/alsa: make "mode" const
2021-10-23 11:39:59 +02:00
Max Kellermann
46c82259f7
output/Control: make config fields const
2021-10-22 20:22:22 +02:00
Max Kellermann
2d03823283
output/Control: fold Configure() into the constructor
2021-10-22 20:21:58 +02:00
Max Kellermann
bba144eca5
output/Control: use C++ initializers
2021-10-22 20:21:43 +02:00
Max Kellermann
9af73dad93
output/Multiple: remove unused method Add()
2021-10-22 20:21:35 +02:00
Max Kellermann
f0d66bf6a6
output/Control: pass rvalue reference to move constructor
2021-10-22 20:14:37 +02:00
Max Kellermann
5ad53a7554
output/Thread: remove duplicate code by calling InternalCloseOutput()
2021-10-22 19:54:47 +02:00
Max Kellermann
7b2e3331f2
output/Filtered: improve API docs
2021-10-22 19:54:38 +02:00
Max Kellermann
3cb44f6652
increment version number to 0.23.3
2021-10-22 12:50:11 +02:00
Max Kellermann
b7fdff46f2
release v0.23.2
2021-10-22 12:45:45 +02:00
Max Kellermann
e16109330d
input/last: clear "uri" in OnCloseTimer()
...
Without clearing the "uri" field, the next Open() call attempts to
reuse the old InputStream, but it has already been closed, so Open()
always returns nullptr.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1300
2021-10-22 12:45:18 +02:00
Max Kellermann
72621531e0
protocol/Result: convert to Client method
2021-10-22 11:55:39 +02:00
Max Kellermann
0a48146efc
client/Client: pass std::string_view to Write()
...
Almost all callers have string literal, and the length is known at
compile time.
2021-10-22 11:54:14 +02:00
Max Kellermann
0c4bf12bfd
player/CrossFade: fix inverted check and wrong variable
...
The inverted check was introduced by commit 46d00dd85f , and commit
8ad17d25ef added a check for the wrong variable. D'oh!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1303
2021-10-22 11:49:38 +02:00
Max Kellermann
b8e0855ef3
output/pipewire: obey PipeWire's DSD bit order and interleave
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1297
2021-10-21 21:15:16 +02:00
Max Kellermann
6467502b9d
output/pipewire: restore SampleFormat::DSD after ToPipeWireAudioFormat() call
2021-10-21 21:15:13 +02:00
Max Kellermann
15b67f20e5
output/pipewire: un-inline ParamChanged()
2021-10-21 20:11:22 +02:00
Max Kellermann
0825179f00
output/pipewire: add local reference variables
2021-10-21 20:02:59 +02:00
Max Kellermann
97211d0aad
output/pipewire: rename field "buffer" to "pod_buffer"
2021-10-21 20:02:32 +02:00
Max Kellermann
029c499bfa
output/pipewire: use std::fill_n()
2021-10-21 20:01:44 +02:00
Max Kellermann
0ba867ec16
output/pipewire: use MAX_CHANNELS, not SPA_AUDIO_MAX_CHANNELS
...
MPD supports only 8 channels, so MAX_CHANNELS is enough, the array
doens't need to be SPA_AUDIO_MAX_CHANNELS (which is 64).
2021-10-21 20:01:01 +02:00
Max Kellermann
866d147122
output/pipewire: make field "channels" unsigned
2021-10-21 19:59:48 +02:00
Max Kellermann
32851d1bc7
output/pipewire: DSD support
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1297
2021-10-20 11:39:54 +02:00
Max Kellermann
78257408b4
output/pipewire: report errors from the "state_changed" callback
2021-10-20 11:24:57 +02:00
Max Kellermann
f447b7615e
output/pipewire: check pw_stream_connect() errors
2021-10-20 11:24:51 +02:00
Max Kellermann
1f780b7209
output/Thread: log exception details
2021-10-20 11:24:51 +02:00
Max Kellermann
04bf8a6b1a
output/pipewire: fix memory leak in SendTag()
2021-10-20 10:16:36 +02:00
Max Kellermann
c4c64854d4
output/pipewire: evaluate errno after libpipewire function calls
2021-10-20 10:13:27 +02:00
Max Kellermann
17562dc90b
output/pipewire: remove misplaced noexcept
2021-10-20 09:41:27 +02:00
Max Kellermann
7b24316734
output/pipewire: fix coding style
2021-10-20 09:41:10 +02:00
Max Kellermann
5fab107fd3
lib/nfs/FileReader: use the thread-safe InjectEvent
...
.. instead of DeferEvent, which is not thread-safe. This caused
various playback problems, which was initially caused by the
DeferEvent/InjectEvent split in commit 774b4313f2
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1298
2021-10-20 09:38:09 +02:00
Max Kellermann
f31920e092
event/Loop: add thread assert() to AddDefer()
...
Currently fails in class NfsFileReader due to
https://github.com/MusicPlayerDaemon/MPD/issues/1298
2021-10-20 09:26:27 +02:00
Max Kellermann
eb111a10e7
output/pipewire: remove redundant prefix and newline from log message
2021-10-19 14:38:37 +02:00
Max Kellermann
80b09360c6
NEWS: mention the previous commit
2021-10-19 14:38:37 +02:00
Nicolai Syvertsen
5ccf78855d
Implement SendTag for PipeWire output plugin
2021-10-19 14:31:40 +02:00
Max Kellermann
fd5a3b5880
client/Response: reimplement Error() without FmtError()
...
With libfmt versions older than 7, this leads to an endless recursion
between Error() and FmtError(), resulting in a crash due to stack
overflow. D'oh!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1295
2021-10-19 13:40:11 +02:00
Max Kellermann
6120c1360c
neighbor/Glue: remove unreachable "throw" statement
...
Should have been removed by commit a8087dc12c
2021-10-19 13:40:11 +02:00
Max Kellermann
a8087dc12c
neighbor/Glue: mention failed plugin name in error message
2021-10-19 13:29:00 +02:00
Max Kellermann
070c03dbf7
event/Thread, ...: fix printf->libfmt remains
2021-10-19 13:19:07 +02:00
Max Kellermann
0a9bec3754
increment version number to 0.23.2
2021-10-19 10:29:49 +02:00
Max Kellermann
fff25ac753
release v0.23.1
2021-10-19 10:27:28 +02:00
Max Kellermann
4f1e79b6b8
filter/ReplayGain: emit "mixer" event when replay gain changes volume
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1294
2021-10-19 10:03:21 +02:00
Max Kellermann
aa9933c0b5
output/pipewire: add noexcept
2021-10-19 08:58:50 +02:00
Max Kellermann
0697d1f859
output/pipewire: include cleanup
2021-10-19 08:57:33 +02:00
Max Kellermann
df033fa4aa
NEWS: mention the previous commit
2021-10-19 08:56:32 +02:00
Nicolai Syvertsen
b941a7df83
Implement volume updates for pipewire output
2021-10-19 00:01:45 +02:00
Max Kellermann
31151cec3c
command/playlist: "load" supports relative positions
...
This commit also increases the PROTOCOL_VERSION so clients can detect
the availability of the feature.
2021-10-18 22:08:22 +02:00
Max Kellermann
07e8c338df
command/queue: move position parameter functions to separate library
2021-10-18 22:07:04 +02:00
Max Kellermann
b22d7218aa
command/player, ...: use decimal notation
...
During the libfmt migration, I converted "%1.3f" to just "{:1.3}"
without the "f" suffix, but libfmt defaults to scientific notation,
which can break some MPD clients.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1291
2021-10-18 16:54:53 +02:00
Max Kellermann
d5be8c74b0
output/pipewire: attempt to change the graph sample rate
...
Requires PipeWire 0.3.32.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1283
2021-10-18 16:46:23 +02:00
Max Kellermann
c112cb60da
output/snapcast: fix typo which caused "Failed to get chunk"
...
This bug caused a 9 second offset in all time stamps. Due to that,
the Snapcast server thought the chunks are too old and discarded them.
Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1287
2021-10-18 16:40:11 +02:00
Max Kellermann
677fa4f9bc
doc/plugins.rst: mention that the snapcast output requires a format
2021-10-17 20:01:21 +02:00
Max Kellermann
907af2ad02
Permission: refactor getPermissionFromPassword() to return std::optional
...
This replaces the output parameter (which is bad API design). As a
side effect, it fixes the bad [[gnu::pure]] attribute added by commit
a636d2127 which caused optimizing compilers to miscompile calls to
that function. "Pure" functions can be assumed to have no output
arguments, so the compiler can assume the function doesn't modify
them.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1282
2021-10-17 19:58:50 +02:00
Thomas Zander
6a2e7bbc02
protocol/ArgParser.cxx: Add missing #include <stdio.h>
...
Fixes a build problem on platforms where stdio.h is not included
transitively. snprintf() is defined in stdio.h.
2021-10-16 17:38:07 +02:00
Max Kellermann
771c46032f
meson.build: add missing libfmt dependencies
...
Fixes https://github.com/MusicPlayerDaemon/MPD/discussions/1281
The problem occurred when there was libfmt-dev installed, but it was
too old (e.g. on Debian Buster), and Meson used the wrap fallback.
Those internal MPD libraries where the libfmt dependency was not
declared were still using the old system libfmt headers, which are not
ABI-compatible with MPD's own libfmt build.
2021-10-15 14:26:59 +02:00
Max Kellermann
85611aa456
storage/smbclient: add StoragePlugin.prefixes
...
Should have been part of commit
ef24cfa523
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1279
2021-10-15 10:24:30 +02:00
Max Kellermann
466b5cb08d
neighbor/smbclient: FmtError() instead of FormatErrno()
...
Fixes part 2 of https://github.com/MusicPlayerDaemon/MPD/issues/1279
2021-10-15 09:40:36 +02:00
Max Kellermann
3f2f3251cb
neighbor/smbclient: use [[gnu::pure]]
...
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1279
2021-10-15 09:39:34 +02:00
Max Kellermann
8ae85f3991
doc/protocol.rst: move POSITION from "search" to "findadd"
...
Whoops, I misplaced this one.
2021-10-14 15:36:25 +02:00
Max Kellermann
781fe4ff28
increment version number to 0.23.1
2021-10-14 15:36:16 +02:00
Max Kellermann
163c59128e
release v0.23
2021-10-14 15:25:21 +02:00
Max Kellermann
608896571c
command/queue: add position parameter to "load"
...
Another one from https://github.com/MusicPlayerDaemon/MPD/issues/888
2021-10-14 15:11:11 +02:00
Max Kellermann
2e5ca1cbd2
command/database: add "position" parameter to "findadd" and "searchadd"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/888
2021-10-14 15:03:02 +02:00
Max Kellermann
680fb51c37
Permission: add "player" to default permission set
...
Forgot that in commit 9a766f4cd9
2021-10-14 14:58:38 +02:00
Max Kellermann
77d74b404e
Permission: add option "host_permissions"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1115
2021-10-14 14:44:18 +02:00
Max Kellermann
a636d2127a
Permission: add "pure" attributes
2021-10-14 14:26:51 +02:00
Max Kellermann
9a766f4cd9
Permission: split permission "player" from "control"
...
Some users want certain clients to fully control playback, but do not
want them to be able to trigger database update.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1124
2021-10-14 14:19:51 +02:00
Max Kellermann
8ad17d25ef
player/CrossFade: do not cross-fade songs shorter than 20 seconds
...
From the feature request: "I generally like to have crossfade on, but
when it happens during such short tracks (e.g. 20 seconds or less) it
doesn't really sound good as those tracks are not really meant to be
crossfaded and intended to act as a bridge on their own."
Sounds reasonable. This commit doesn't add an option, but hard-codes
the limit to 20 seconds. If it turns out that users want to have it
configurable, we can still add the option.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1184
2021-10-14 13:47:24 +02:00
Max Kellermann
46d00dd85f
player/CrossFade: move code to CanCrossFadeSong()
2021-10-14 13:42:27 +02:00
Max Kellermann
ec52b13449
player/CrossFade: add method IsEnabled()
2021-10-14 13:41:50 +02:00
Max Kellermann
cf6ca1b0ba
player/CrossFade: use C++11 initializers
2021-10-14 13:38:42 +02:00
Max Kellermann
37bd6de658
db/simple: add option to hide CUE target songs
...
This reduces duplicates in the music database by hiding the original
song file when it is referenced by a CUE sheet.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1275
2021-10-14 13:28:37 +02:00
Max Kellermann
f7622ca332
db/update/Walk: move PurgeDanglingFromPlaylists() to Playlist.cxx
2021-10-14 13:12:10 +02:00
Max Kellermann
b82b56970b
db/simple/Song: reorder fields for better packing
2021-10-14 12:55:02 +02:00
Max Kellermann
e4eb5b79c9
output/shout: move shout_new() call to Enable()
...
Don't allocate any memory until the output is really enabled.
2021-10-14 12:28:36 +02:00
Max Kellermann
1cfea20b22
output/shout: remove the defunct "timeout" option
...
The implementation was removed 12 years ago in commit f6455d5f79 and
nobody missed it.
2021-10-14 12:04:13 +02:00
Max Kellermann
efa3ffa8d8
Revert "db/update/playlist: remove non-existent targets while scanning"
...
This reverts commit 9200fa6d06 . It was
wrong because it works only if the target song has already been
scanned.
2021-10-14 11:50:41 +02:00
Max Kellermann
1b8c94d6b9
db/update/Playlist: move code to another UpdatePlaylistFile() method
2021-10-14 11:36:45 +02:00
Max Kellermann
cd5c1f3f45
db/update/playlist: remove empty playlist directories
2021-10-13 19:23:24 +02:00
Max Kellermann
9200fa6d06
db/update/playlist: remove non-existent targets while scanning
2021-10-13 19:23:24 +02:00
Max Kellermann
1bbe9896f6
Main: make inotify errors non-fatal
2021-10-13 18:55:05 +02:00
Max Kellermann
2d8847f428
db/update/InotifyUpdate: convert to class, no global variables
2021-10-13 18:47:56 +02:00
Max Kellermann
72f6e018e7
Log: remove the obsolete printf-style functions
2021-10-13 17:41:19 +02:00
Max Kellermann
2fbbd540bb
more [[gnu::...]] attributes
2021-10-13 17:38:01 +02:00
Max Kellermann
18f64b5fb7
system/FatalError: remove obsolete library
2021-10-13 16:53:01 +02:00
Max Kellermann
d2a8b1e8a5
db/update/InotifySource: make errors non-fatal
2021-10-13 16:53:01 +02:00
Max Kellermann
184e8eca7c
win32/Win32Main: throw on error
2021-10-13 16:37:56 +02:00
Max Kellermann
0a8886704a
Main: move top-level exception handler to main()
...
Allows win32_main() to throw exceptions.
2021-10-13 16:37:34 +02:00
Max Kellermann
0712314d23
archive/{zzip,iso9660}: ignore file names which are invalid UTF-8
...
These malformed strings must not be transferred over the wire, because
the MPD protocol is defined to be UTF-8.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1274
2021-10-13 15:51:08 +02:00
Max Kellermann
f8cbba1850
util/Alloc: remove unused library
2021-10-13 14:48:16 +02:00
Max Kellermann
635ec3ce37
util/VarSize: use plain malloc()
2021-10-13 14:46:40 +02:00
Max Kellermann
8e71130e8a
tag/FixString: use class AllocatedArray
2021-10-13 14:40:33 +02:00
Max Kellermann
ed7baf3ae1
tag/Id3Scan: use StringView::Strip() instead of duplicating the string
2021-10-13 14:32:43 +02:00
Max Kellermann
1e159af2ce
tag/Id3Scan: merge duplicate code into InvokeOnTag()
2021-10-13 14:30:57 +02:00
Max Kellermann
dffed6e393
tag/Id3Scan: add class Id3String
2021-10-13 14:24:17 +02:00
Max Kellermann
bf656af555
playlist/SoundCloud: use AllocatedString for concatenation
2021-10-13 12:47:57 +02:00
Max Kellermann
d2b8852d19
playlist/SoundCloud: move code to TranslateSoundCloudUri()
2021-10-13 12:23:15 +02:00
Max Kellermann
7d4de71899
sticker/SongSticker: use AllocatedString for concatenation
2021-10-13 12:19:45 +02:00
Max Kellermann
e1c16d78e4
decoder/wavpack: use AllocatedString for concatenation
2021-10-13 12:15:57 +02:00
Max Kellermann
a49b49cba7
decoder/wavpack: fix WVC file support
...
The wrong variable was used. This has been broken by commit
4eeea640f4 seven years ago - and nobody as noticed, d'oh!
2021-10-13 12:11:39 +02:00
Max Kellermann
f510564d9d
more [[gnu::...]] attributes
2021-10-13 12:07:05 +02:00
Max Kellermann
1c4b484a56
avahi/Poll: use FineTimerEvent in AvahiTimeout
...
libavahi-client uses this one to schedule events immediately.
However, CoarseTimerEvent may be called too late, and cause timeouts.
2021-10-13 11:13:54 +02:00
Max Kellermann
b394d8d059
net/Resolver: include cleanup
2021-10-13 11:06:10 +02:00
Max Kellermann
a15c1c71d5
util/WritableBuffer: add WritableBuffer<void>::{FromVoid,ToVoid}()
2021-10-13 11:05:33 +02:00
Max Kellermann
8d679e7e00
util/IntrusiveList: add IntrusiveList::swap()
2021-10-13 11:04:42 +02:00
Max Kellermann
2b30ac2351
util/IntrusiveList: add another missing ToNode() call
2021-10-13 11:04:21 +02:00
Max Kellermann
1c97793b49
util/IntrusiveList: do not use the deprecated class std::iterator
...
Deprecated in C++17. Since C++17, one is supposed to declare those 5
types manually.
2021-10-13 11:03:49 +02:00
Max Kellermann
4dae8b41da
event/PipeEvent: new class wrapping SocketEvent
2021-10-13 10:45:55 +02:00
Max Kellermann
be8ed2f59e
tag/Settings: use [[gnu::const]]
2021-10-13 10:37:26 +02:00
Max Kellermann
08491fcd86
tag/Format: use [[gnu::pure]]
2021-10-13 10:37:26 +02:00
Max Kellermann
abed633fcb
tag/FixString: use [[gnu::pure]]
2021-10-13 10:37:26 +02:00
Max Kellermann
db2a9cb6d5
tag/Builder: use [[gnu::pure]]
2021-10-13 10:37:26 +02:00
Max Kellermann
7caeb3b0d8
tag/ParseName: use [[gnu::pure]]
2021-10-13 10:32:22 +02:00
Max Kellermann
08500be239
tag/VorbisComment: use [[gnu::pure]]
2021-10-13 10:31:51 +02:00
Max Kellermann
3ef7d8fecb
tag/Tag: use [[gnu::pure]]
2021-10-13 10:31:51 +02:00
Max Kellermann
ffde7223b9
tag/Table: use [[gnu::pure]]
2021-10-13 10:31:51 +02:00
Max Kellermann
4e84fa4a00
RemoteTagCache: use [[gnu::pure]]
2021-10-13 10:31:51 +02:00
Max Kellermann
78e49928b6
command/QueueCommands: disallow moving the current song relative to itself
...
This was a no-op previously, but this operation makes no sense.
2021-10-07 22:55:41 +02:00
Max Kellermann
c0bcfe244c
command/QueueCommands: reimplement relative "move"/"moveid" offsets
...
The existing implementation has been utterly broken forever; I cannot
explain what it actually does, but it doesn't do what the
documentation says.
2021-10-07 22:49:38 +02:00
Max Kellermann
e63ecd81ec
command/QueueCommands: eliminate id lookup from handle_addid()
...
Use MoveRange() instead of MoveId().
2021-10-07 22:44:06 +02:00
Max Kellermann
c47a858d15
command/QueueCommands: move code to RequireCurrentPosition()
2021-10-07 22:21:00 +02:00
Max Kellermann
076c9a0dd9
command/QueueCommands: offset relative "addid" positions by one
...
Now, "+0" means "right after the current song" and "-0" means "right
before the current song". Mnemonic: there are zero songs between the
current song and the newly added song.
2021-10-07 22:12:10 +02:00
Max Kellermann
3993176b76
command/QueueCommands: support relative offsets in "addid"
...
A similar feature was present long ago in MPD, but was deprecated in
version 0.16 because the implementation was broken. This commit
re-adds the feature in a way that's well-defined and not broken.
Close https://github.com/MusicPlayerDaemon/MPD/issues/1221
2021-10-07 21:55:56 +02:00
Max Kellermann
16cad48641
command/QueueCommands: validate the "addid" position before adding the song
...
Validate early, so we avoid the rollback if an error occurs.
2021-10-07 21:27:07 +02:00
Max Kellermann
7a6d0c2efc
command/Queue: move LookupRemoteTag() to the end
...
Skip the LookupRemoteTag() call if the MoveId() call fails.
2021-10-07 21:13:45 +02:00
Max Kellermann
f6035f2dda
util/UriRelative: use std::string_view
...
Eliminates lots of implicit std::string temporaries.
2021-10-07 14:49:53 +02:00
Max Kellermann
c34a1e29de
util/UriRelative: fix variable mixup
2021-10-07 14:44:41 +02:00
Max Kellermann
41a69027c2
test/util/TestUriRelative: add failing test for "./" prefix
2021-10-07 14:44:30 +02:00
Max Kellermann
711c614528
python/build/libs.py: update WildMidi to 0.4.4
2021-10-07 13:34:04 +02:00
Max Kellermann
6acb240f69
python/build/libs.py: update CURL to 7.79.1
2021-10-07 13:31:00 +02:00
Max Kellermann
45f3dd8b7a
Revert "python/build/libs.py: remove flac, switch to Meson wrap"
...
This reverts commit 6ed4aff4d3 . The
Meson wrap is broken on non-x86, because it unconditionally includes
<cpuid.h> which is an x86 only header.
2021-10-07 13:28:17 +02:00
James D. Smith
acc1bd6297
playlist/PlaylistSong: Remove dots from playlist file paths.
2021-10-07 13:15:40 +02:00
James D. Smith
49ed9dae34
util/UriUtil: New uri_squash_dot_segments.
2021-10-07 13:14:54 +02:00
Max Kellermann
cf554d306d
LocateUri: implement UriPluginKind::STORAGE properly
...
This way, URI schemes supported by arbitrary storage plugins are
allowed.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1270
2021-10-06 20:36:39 +02:00
Max Kellermann
ef24cfa523
storage/Plugin: add "prefixes"
2021-10-06 20:14:01 +02:00
Max Kellermann
5d35983298
decoder/openmpt: catch libopenmpt exceptions in scan_stream()
...
Fixes crash bug.
2021-10-06 20:14:01 +02:00
Max Kellermann
2dacb36789
LocateUri: throw std::invalid_argument instead of std::runtime_error
...
This should translate to ACK_ERROR_ARG instead of ACK_ERROR_UNKNOWN.
2021-10-06 19:26:33 +02:00
Max Kellermann
57a1403f08
output/pipewire: implement Delay(), fix busy loop while paused
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1265
2021-09-24 11:33:35 +02:00
Max Kellermann
bad3283182
output/pipewire: add flag "active", replaces some uses of "paused"
...
This way, we know whether we're explicitly "paused" or "not yet
activated because the ring buffer hasn't been filled yet".
2021-09-24 11:33:30 +02:00
Max Kellermann
6ed4aff4d3
python/build/libs.py: remove flac, switch to Meson wrap
2021-09-21 16:44:51 +02:00
Max Kellermann
e525465592
python/build/verify.py: support SHA256
2021-09-21 16:22:21 +02:00
Max Kellermann
10782f4c84
{android,win32}/build.py: use makedirs(exist_ok)
2021-09-21 16:04:31 +02:00
Max Kellermann
2a02576d6d
python/build/meson.py: move c_args, ... to [built-in options]
...
As per Meson 0.56.0:
https://mesonbuild.com/Machine-files.html#properties
2021-09-21 14:57:55 +02:00
Max Kellermann
9ea1578a97
lib/expat/meson.build: propagate the libexpat dependency
...
Fixes the build with libexpat from Meson wrap.
2021-09-21 14:38:00 +02:00
Max Kellermann
520028dcfc
python/build/libs.py: remove libexpat, switch to Meson wrap
2021-09-21 14:08:23 +02:00
Max Kellermann
e98cef06c7
python/build/meson.py: remove --libdir=lib MultiArch workaround
...
Not necessary anymore since Meson 0.50.0:
https://mesonbuild.com/Release-notes-for-0-50-0.html#libdir-defaults-to-lib-when-cross-compiling
2021-09-21 13:58:45 +02:00
Max Kellermann
aef0535c55
python/build/libs.py: remove libvorbis, switch to Meson wrap
2021-09-21 13:49:50 +02:00
Max Kellermann
6b1d0cb01d
meson.build: disable compiler warnings for subprojects
...
Requires Meson 0.56.0:
https://mesonbuild.com/Release-notes-for-0-56-0.html#per-subproject-warning_level-option
2021-09-21 13:48:16 +02:00
Max Kellermann
f23ecf00da
meson.build: set per-subproject "default_library"
...
Requires Meson 0.54.0:
https://mesonbuild.com/Release-notes-for-0-54-0.html#per-subproject-default_library-and-werror-options
2021-09-21 13:41:45 +02:00
Max Kellermann
a1c1e26875
meson.build: require Meson 0.56.0
...
I want to use per-subproject warning_level (0.56.0), default_library
(0.54.0).
2021-09-21 13:39:44 +02:00
Max Kellermann
410b8711f2
lib/curl/meson.build: add -DCURL_STATICLIB on Windows
...
Necessary since commit 6acf81d5ae
2021-09-21 13:24:35 +02:00
Max Kellermann
6acf81d5ae
python/build/libs.py: build CURL with cmake
2021-09-21 12:30:39 +02:00
Max Kellermann
4eb56d844e
python/build/libs.py: update Boost to 1.77.0
2021-09-21 12:22:17 +02:00
Max Kellermann
5faf6d061f
python/build/libs.py: build expat with cmake
2021-09-20 23:23:20 +02:00
Max Kellermann
d5a9f6d79d
python/build/libs.py: build libogg, libvorbis with cmake
2021-09-20 23:23:20 +02:00
Max Kellermann
2699889342
python/build/cmake.py: use CMAKE_TOOLCHAIN_FILE
...
Let cmake know that we're cross-crompiling.
2021-09-20 23:14:13 +02:00
Max Kellermann
e4f933361e
python/build/libs.py: update OpenSSL to 3.0.0
2021-09-20 22:54:02 +02:00
Max Kellermann
6f278977e9
build/python/project: add build(), calls _build()
...
Prepare to add some code around the _build() call.
2021-09-20 22:54:02 +02:00
Max Kellermann
4f2f705dca
build/python/make: rename build() to build_make()
...
Eliminate conflict with other Project classes.
2021-09-20 22:54:02 +02:00
Max Kellermann
f31e38145d
python/build/cmake.py: some ccache support
2021-09-20 22:54:02 +02:00
Max Kellermann
0231622169
build/python/cmake: add "windows_configure_args"
2021-09-20 22:46:54 +02:00
Max Kellermann
937423dbcf
event/Loop: check the quit flag after RunDeferred()
...
Allow DeferredEvents to call EventLoop::Break().
2021-09-10 12:14:18 +02:00
Rosen Penev
40483d8478
fix wrong emplace usage
...
emplace already calls std::pair. No need for it again.
No need to emplace when calling std::make_shared.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-09-07 21:14:37 -07:00
Rosen Penev
6ec5089cc9
remove std::make_pair
...
make_pair is an old C++98 function that can be replaced by modern
shorter constructs.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-09-07 21:13:22 -07:00
iconoclasthero
15f419e1cb
Update user.rst
...
NB: Check the sysconfdir setting to determine where mpd will look for mpd.conf; if you expect mpd to look for /etc/mpd.conf the sysconfdir must be '/etc' (i.e., not 'etc' which will result in mpd looking for /usr/local/etc/mpd.conf):
.. code-block:: none
meson configure output/release |grep sysconfdir
If this is not /etc (or another path you wish to specify):
.. code-block:: none
$ meson configure output/release -Dsysconfdir='/etc' ; meson configure output/release |grep syscon
sysconfdir /etc Sysconf data directory
2021-09-06 12:41:41 -04:00
Max Kellermann
bdd8c34c67
Merge branch 'move' of git://github.com/neheb/MPD
2021-08-29 06:47:05 +02:00
Max Kellermann
c9a9248c9f
java/Class: use Java::LocalObject
...
This eliminates all but one DeleteLocalRef() call.
2021-08-28 08:09:54 +02:00
Max Kellermann
31f7fede30
java/GlobalRef: remove method Set(), always require initialization
2021-08-28 08:08:30 +02:00
Max Kellermann
917fe549b0
java/Object: use type aliases
2021-08-28 08:05:57 +02:00
Max Kellermann
8e430e55af
Java/GlobalRef: add LocalRef cast constructor
2021-08-28 08:04:20 +02:00
Max Kellermann
9e61bda592
java/String: add class StringUTFChars()
2021-08-27 12:30:43 +02:00
Max Kellermann
56997290d7
io/BufferedOutputStream: add method Discard()
2021-08-27 12:06:36 +02:00
Max Kellermann
d2f84f3df8
io/BufferedOutputStream: allow specifying the buffer size
2021-08-27 12:06:20 +02:00
Max Kellermann
9da28e5c73
io/BufferedOutputStream: more API documentation
2021-08-27 12:06:02 +02:00
Max Kellermann
d1f9b06f84
io/BufferedOutputStream: add WriteT()
2021-08-27 12:05:26 +02:00
Max Kellermann
f9f3306db9
io/BufferedOutputStream: use std::size_t
2021-08-27 12:05:06 +02:00
Max Kellermann
19d19cd737
fs/io/BufferedOutputStream: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-08-27 12:04:44 +02:00
Max Kellermann
b1175acb59
util/StringView: hard-code C++17
2021-08-27 12:01:31 +02:00
Max Kellermann
672278e5fd
util/StringView: use [[gnu::]] attributes
2021-08-27 11:59:37 +02:00
Max Kellermann
da155f8822
util/StringCompare: use [[gnu::]] attributes
2021-08-27 11:58:25 +02:00
Max Kellermann
4026ef63b6
util/StringAPI: use [[gnu::]] attributes
2021-08-27 11:57:56 +02:00
Max Kellermann
b282682ba5
use using instead of typedef
2021-08-27 11:57:33 +02:00
Max Kellermann
ad00926e1b
util/AllocatedArray: add method release()
2021-08-27 11:24:50 +02:00
Rosen Penev
0b774df375
prevent use after move
...
These should be equivalent anyway.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-26 13:38:36 -07:00
Rosen Penev
53ffcf455c
make several member functions const
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-26 13:15:52 -07:00
Max Kellermann
9ca64d5fb3
filter/Chain: eliminate, just use a chain of TwoFilters instead
...
The ChainFilter class is extremely complicated code, and will grow to
be even more complicated when the Filter interface gets extended.
Let's just remove it; we can easily chain many TwoFilters instead.
2021-08-26 17:45:23 +02:00
Max Kellermann
bd79354f32
filter/TwoFilters: add ChainFilters()
2021-08-26 17:42:25 +02:00
Max Kellermann
49dcac5c21
filter/TwoFilters: add class PreparedTwoFilters
2021-08-26 17:36:19 +02:00
Max Kellermann
38a4b0d8d5
filter/TwoFilters: fix include guard
2021-08-26 14:36:52 +02:00
Max Kellermann
a224225e48
pcm/AudioFormat: use std::size_t
2021-08-26 13:42:15 +02:00
Max Kellermann
7d7fe756b3
pcm/AudioFormat: use [[gnu::pure]]
2021-08-26 13:42:15 +02:00
Max Kellermann
1cb7fe12ff
pcm/AudioFormat: add noexcept
2021-08-26 13:37:36 +02:00
Max Kellermann
8a29805767
Merge tag 'v0.22.11'
...
release v0.22.11
2021-08-24 22:19:38 +02:00
Max Kellermann
94c196108d
release v0.22.11
2021-08-24 22:15:22 +02:00
Max Kellermann
263d1ba002
Main: playlist_directory defaults to "/sdcard/Android/data/org.musicpd/files/playlists"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1233
2021-08-24 22:12:27 +02:00
Max Kellermann
2dba06dc34
android/Context: add GetExternalFilesDir()
2021-08-24 22:03:53 +02:00
Max Kellermann
811860c3b4
android/Context: use [[gnu::pure]]
2021-08-24 21:54:22 +02:00
Max Kellermann
8439119e24
filter/ffmpeg: support double-precision samples
...
Insert an "aformat" filter which converts double-precision to
single-precision.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:45:57 +02:00
Max Kellermann
b5b40d8235
filter/ffmpeg: automatically retry with "aformat"
...
If DetectFilterOutputFormat() fails to determine the output format,
insert an "aformat" filter which attempts to force a specific output
format.
Fixes part 2 of of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-24 13:31:13 +02:00
Max Kellermann
b904f8af03
lib/ffmpeg/Filter: add FilterContext::MakeAformat()
2021-08-24 13:30:17 +02:00
Max Kellermann
ebfbb74f9e
lib/ffmpeg/DetectFilterFormat: return AudioFormat::Undefined() on EAGAIN
2021-08-24 13:30:03 +02:00
Max Kellermann
7b4225aa1f
lib/ffmpeg/Filter: add ParseSingleInOut()
...
Merge some duplicate code.
2021-08-24 13:29:08 +02:00
Max Kellermann
71a5311b06
lib/ffmpeg/Filter: eliminate class FilterContext
...
Since AVFilterContext are freed automatically, this wrapper class
serves no purpose. Let's remove it.
2021-08-24 13:04:34 +02:00
Max Kellermann
a62a35e1db
lib/ffmpeg/Filter: remove FilterContext destructor
...
Fixes potential double-free bugs which currently did not occur because
the destructors happened to be called in the right order.
2021-08-24 12:56:05 +02:00
Max Kellermann
ca2439f595
filter/ffmpeg: pass "channel_layout" instead of "channels" to buffersrc
...
Fixes part 1 of https://github.com/MusicPlayerDaemon/MPD/issues/1235
2021-08-23 21:38:13 +02:00
Max Kellermann
f9a0db716a
android: build with NDK r23
2021-08-23 20:58:19 +02:00
Max Kellermann
34aa67ea87
Merge remote-tracking branches 'neheb/6', 'neheb/5', 'neheb/3', 'neheb/2' and 'neheb/1'
2021-08-23 20:36:26 +02:00
Dave Hocker
18be8c3318
Fix compile error on macOS 11.15.2 (introduced by commit 30e3ef4)
2021-08-21 11:16:22 -05:00
Rosen Penev
1d7a8f992f
clang-tidy: use auto
...
The type is duplicated otherwise
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-21 00:53:23 -07:00
Rosen Penev
da1783cdff
clang-tidy: remove pointless const
...
Found with readability-const-return-type
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-21 00:51:21 -07:00
Rosen Penev
20d74bb07e
clang-tidy: replace loop with std::all_of
...
Found with readability-use-anyofallof
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-21 00:49:36 -07:00
Rosen Penev
0f7a0b04ca
replace loop with find_if
...
loop is wrong anyway. It's missing a break;
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-21 00:48:30 -07:00
Rosen Penev
40c6a214e3
unique_ptr/new to make_unique
...
The latter is easier to read and is the "correct" thing to do.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-20 23:54:14 -07:00
Samir Benmendil
cfe024ea13
command/file: return directory_uri if real_uri is unset
...
Prevent a segfault when accessing album art.
Fix #1224 #1225
2021-08-17 10:55:43 +02:00
Max Kellermann
993d85125e
increment version number to 0.22.11
2021-08-17 10:55:10 +02:00
Max Kellermann
bedcf1cce5
Merge branch 'exp2' of git://github.com/neheb/MPD
2021-08-17 10:53:36 +02:00
Rosen Penev
30e3ef4c8e
constexpr/std::array conversions
...
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-16 21:05:56 -07:00
Rosen Penev
4c5fea96e4
constexpr global variable conversion
...
Found with cppcoreguidelines-avoid-non-const-global-variables
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-16 20:58:21 -07:00
Rosen Penev
46600931e4
clang-tidy: use default
...
Found with modernize-use-default
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-08-16 20:48:28 -07:00
Max Kellermann
a2387210bf
time/FileTime: move code to SystemClock.hxx
2021-08-10 19:53:53 +02:00
Max Kellermann
d7e7adb496
time/FileTime: add ChronoToFileTime()
2021-08-10 16:16:15 +02:00
Max Kellermann
45354a421c
time/FileTime: preserve the FILETIME resolution
...
Don't truncate the FILETIME to second resolution to pass it to
std::chrono::system_clock::from_time_t(); instead, calculate the
offset between the FILETIME epoch and the
std::system_clock::time_point epoch, and use that to initialize the
time_point directly.
2021-08-10 15:16:59 +02:00
Max Kellermann
9fc3c60910
time/FileTime: add FileTimeToChronoDuration()
2021-08-10 15:13:22 +02:00
Max Kellermann
1976003e91
time/FileTime: allow negative times
2021-08-10 15:13:16 +02:00
Max Kellermann
488afc47d4
time/FileTime: use uint_least64_t
2021-08-10 15:12:49 +02:00
Max Kellermann
017814adc7
test/time/TestFileTime: new unit test
2021-08-10 15:12:34 +02:00
Max Kellermann
7f94af8b2c
test/time/TestISO8601: disable on Windows for now
2021-08-10 15:07:19 +02:00
Max Kellermann
09d74f05c3
python/meson: set exe_wrapper=wine for Windows builds
...
Allows running the unit tests on Linux.
2021-08-10 15:04:54 +02:00
Max Kellermann
1af8694ef6
python/meson: set needs_exe_wrapper=true only for Android targets
2021-08-10 15:00:58 +02:00
Max Kellermann
b8eb9b466a
python/meson: split the f.write() call and use f-strings
2021-08-10 15:00:58 +02:00
Max Kellermann
bd9e449b69
python/project: re-add support for version suffix
...
Got lost in commit 0f56ddb805
2021-08-10 15:00:58 +02:00
Max Kellermann
f3d67115d7
output/wasapi: check ENABLE_DSD before setting dsd_mode
2021-08-10 15:00:58 +02:00
Max Kellermann
ee6603ed38
test/meson.build: add missing dependencies on libfmt
2021-08-10 14:31:49 +02:00
Max Kellermann
0dacde32f2
output/pipewire: append output name to PW node name
2021-08-10 11:30:25 +02:00
Max Kellermann
528e05f025
output/pipewire: add config option "remote"
2021-08-10 11:28:29 +02:00
Max Kellermann
269583f5dd
output/pipewire: allow specifying a target by its name
2021-08-10 11:17:16 +02:00
Max Kellermann
7c9f4f7e4f
output/pipewire: create inactive stream, fill ring_buffer first
...
This avoids underruns at the start of playback.
2021-08-10 10:50:42 +02:00
Max Kellermann
00fd692eba
output/pipewire: wait for buffer to fill before resuming
2021-08-10 10:48:25 +02:00
Max Kellermann
668c3782b2
output/pipewire: smaller ring buffer, 500ms should be enough
2021-08-10 10:43:56 +02:00
Max Kellermann
1e0af2dadf
output/pipewire: add type alias for boost::lockfree::spsc_queue
2021-08-10 10:43:54 +02:00
Max Kellermann
4ea2ea2a52
output/pipewire: update nbytes after calling PcmSilence()
...
This was missing in commit 8a243e6e28
2021-08-10 10:43:28 +02:00
Max Kellermann
8a243e6e28
output/pipewire: call pw_stream_flush() only if really draining
...
If draining was not requested, generate silence instead if there is no
data in the ring buffer.
The problem is that pw_stream_flush() appears to disable the stream
permanently, even though there is no state_changed callback - the
stream state remains at PW_STREAM_STATE_STREAMING, but the stream is
defunct. I have no idea why and I havn't found any documentation
about it.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1219
2021-08-10 06:30:58 +02:00
Max Kellermann
d33aa01000
output/pipewire: reset the "paused" flag
...
This was missing in commit 4d1ce7023b
2021-08-09 19:31:22 +02:00
Max Kellermann
bd893e6336
Merge tag 'v0.22.10'
...
release v0.22.10
2021-08-06 18:21:59 +02:00
Max Kellermann
64c39af556
release v0.22.10
2021-08-06 18:16:59 +02:00
Max Kellermann
04eb911a51
mixer/alsa: use cached values to work around rounding errors
...
This replaces 967af60327 with a more
effective workaround.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/822
2021-08-06 18:16:37 +02:00
Max Kellermann
351b39e0c5
mixer/alsa: skip the snd_mixer_handle_events() call in alsa_mixer_elem_callback()
...
snd_mixer_handle_events() has already been called by
DispatchSockets(). This way, we can also skip the exception handler.
2021-08-06 18:03:36 +02:00
Max Kellermann
3b6d4e6673
mixer/alsa: move alsa_mixer_elem_callback() into the AlsaMixer class
2021-08-06 18:01:19 +02:00
Max Kellermann
e8f328d8ad
mixer/alsa: move code to GetPercentVolume()
2021-08-06 17:56:30 +02:00
Max Kellermann
5f5b5f63af
mixer/alsa: move code to NormalizedToPercent()
2021-08-06 17:55:59 +02:00
Max Kellermann
ad6e303047
mixer/alsa: move code to GetNormalizedVolume()
2021-08-06 17:53:45 +02:00
Max Kellermann
b0e9538855
build/openssl: pass --cross-compile-prefix to ./Configure
2021-08-06 17:30:47 +02:00
Max Kellermann
694debd4cc
build/openssl: pass RANLIB=... to "make install"
...
The "install_dev" target runs ranlib during installation, and this
can break the Android build.
2021-08-06 17:28:28 +02:00
Max Kellermann
0f56ddb805
python/build/libs.py: update OpenSSL to 3.0.0-beta2
2021-08-06 17:22:41 +02:00
Max Kellermann
dde77ec6bd
python/build/libs.py: update CURL to 7.78.0
2021-08-06 17:20:52 +02:00
Max Kellermann
5d73eda115
doc/plugins.rst: move filter graph URL to ffmpeg.org
2021-08-06 17:20:52 +02:00
Max Kellermann
1985786ed2
db/simple: prune CUE entries from database for non-existent songs
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1019
2021-08-05 20:26:21 +02:00
Max Kellermann
8e0d39ae94
db/update/Playlist: prepend "../" only for relative URIs
...
Prepending "../" to absolute URIs would break them.
2021-08-05 20:19:33 +02:00
Max Kellermann
1761fb14af
fs/Traits: add PathTraitsUTF8::IsAbsoluteOrHasScheme()
2021-08-05 20:09:06 +02:00
Max Kellermann
ef2fc4e6f6
db/simple/Directory: remove obsolete API doc
2021-08-05 19:05:03 +02:00
Max Kellermann
b979245d6c
decoder/Bridge: call UpdateStreamTag() only if there is no pending seek
...
If UpdateStreamTag() gets called while an initial seek is pending, the
result will never be submitted to a MusicChunk. By avoiding the
UpdateStreamTag() call in that case (by moving UpdateStreamTag() to
after the PrepareInitialSeek() check), the song_tag is preserved until
UpdateStreamTag() is called again from SubmitData().
This fixes missing tags in the "httpd" output.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1137
2021-08-05 18:02:45 +02:00
Max Kellermann
a74b07728e
tag/Tag: add Merge() which takes Tag pointers
2021-08-05 17:36:14 +02:00
Max Kellermann
7d69cbbda7
tag/Tag: Merge() returns Tag, MergePtr() returns std::unique_ptr<Tag>
2021-08-05 17:32:23 +02:00
Constantin Fuerst
955502f881
output/oss: enable DoP
...
Explanation
This adds support for DOP using the PcmExport function if the macro
ENABLE_DSD is defined. If enabled within the config-file using "dop",
the boolean dop_setting will be true. If DSD input is encountered and
the setting is on, it is checked whether the oss-device supports the
required samplerate. If that is the case, dop_active is set to true
and conversion of the input is prevented. If the sample rate is not
supported, conversion to S32 is requested. When playing back, the
PcmExport is used to pack the incoming stream into PCM. Reasoning
This is required for OSs without the required driver support for
native DSD playback that also have no ALSA. Mainly *BSD users are the
target audience for this functionality, as ALSA here is only a proxy
without full functionality. Requirements
DAC that supports the DOP standard
Building with OSS, DSD and S32-Format
Supported Formats / Required PCM Formats
DSF, DFF and WavPack-DSD will work.
DSD64, 1 Channel -> S24:176.4kHz (untested, lack of time / missing samples)
DSD64, 2 Channel -> S24:352.8kHz
DSD64, 4 Channel -> S24:705.6kHz (untested, lmissing equipment)
DSD128, 1 Channel -> S24:352.8kHz (untested, lack of time / missing samples)
DSD128, 2 Channel -> S24:705.6kHz
DSD256, 1 Channel -> S24:705.6kHz (untested, lack of time / missing samples)
Changes
inclusion of required files
adding new domain for logging
adding dop_satisfied private function
adding required member variables for storing dop state and for dop-packing
adding dop boolean parameter to many functions that are required to act a little differently when dop is active
Testing
This has been tested to work with a Sabaj Da2 on FreeBSD, where the
red status indicator LED clearly shows that DSD playback is taking
place, instead of purple for "hi-res" which is seen when converting.
Issues
I have not tested this with S24 and right now AFMT_S32_NE is
required. If not defined, ENABLE_DSD will be undef'ed. This will be
addressed in a bit, however no DAC which supports DOP but not 32Bit is
known to me. Also, AFMT_S32_NE is not defined when building on FreeBSD
which is why this is just blatantly defined in the file at the moment.
Additionally, the new dop-option is not added into any documentation
whatsoever.
2021-08-05 16:21:43 +02:00
Max Kellermann
dee5d1b87b
output/oss: replace the AudioFormat field with 3 raw OSS integers
...
This simplifies Reopen().
2021-08-05 16:03:53 +02:00
Max Kellermann
d42342e0ba
output/oss: check returned value in oss_try_ioctl()
2021-08-05 15:53:30 +02:00
Max Kellermann
8da3f8c6a7
output/oss: oss_try_ioctl() throws on EINVAL
...
Eliminate some duplicate code.
2021-08-05 15:47:11 +02:00
Max Kellermann
c8c553c75c
pcm/Export: add method IsDopEnabled()
2021-08-05 15:35:11 +02:00
Max Kellermann
c97aabe43a
Merge branch 'v0.22.x'
2021-08-05 15:17:07 +02:00
Max Kellermann
17b0ac75ca
output/oss: always enable PcmExport for alsa_channel_order
...
We need this even when AFMT_S24_PACKED is not available, for the
correct channel order in multi-channel files. Internally, MPD uses
FLAC channel order, but OSS uses the same channel order as ALSA.
2021-08-05 15:11:54 +02:00
Max Kellermann
bde64a13e2
tag/Builder: do not acquire tag_pool_lock if TagItem list is empty
2021-08-05 14:32:58 +02:00
Max Kellermann
96875921b7
tag/Builder: use std::swap() in move operator
...
This way, we save the overhead for acquiring the tag_pool_lock.
2021-08-05 14:28:37 +02:00
Cebtenzzre
551c941b5a
tag/Builder: don't ignore the result of tag_pool_dup_item
...
Also, use RemoveAll() instead of directly clearing TagBuilder::items in
most cases, as its elements represent references that must be released.
Closes #1023
2021-08-05 14:25:55 +02:00
Cebtenzzre
624c77ab43
tag/Builder: another missing RemoveAll() call
2021-08-05 14:25:05 +02:00
Cebtenzzre
ba13b4b5d6
tag/Builder: use RemoveAll() to give up references
2021-08-05 14:23:48 +02:00
Cebtenzzre
4b2d9e544c
tag/Pool: add [[nodiscard]]
2021-08-05 14:20:59 +02:00
Max Kellermann
97c43954e8
input/tidal: remove defunct unmaintained plugin
...
This plugin has been defunct for several years. Tidal has not ever
replied to any of my emails, so they're apparently not interested in
MPD support.
2021-08-05 13:52:05 +02:00
Max Kellermann
b77acd35f7
output/winmm: fix struct/class mismatch
2021-08-05 11:40:47 +02:00
Max Kellermann
4873159872
meson.build: add "fallback" option to fmt dependency (for older Meson versions)
2021-08-05 11:28:23 +02:00
Max Kellermann
968624035c
mixer/pipewire: new plugin
2021-08-05 10:57:37 +02:00
Max Kellermann
b838bf3109
output/pipewire: un-inline StateChanged()
2021-08-05 10:48:17 +02:00
Max Kellermann
4d1ce7023b
output/pipewire: implement Pause()
2021-08-04 17:26:54 +02:00
Max Kellermann
52577ac87a
output/pipewire: implement Cancel() properly
2021-08-04 17:24:49 +02:00
Max Kellermann
9fa3984a2f
input/icy: adjust offset at end of stream in Read()
...
ProxyInputStream::Read() assigns the `offset` field, which is the
wrong offset because it does not consider Icy metadata removed from
the stream. Therefore, after every ProxyInputStream::Read() call,
IcyInputStream::Read() needs to override this offset. This was
missing at the end of the stream, when Read()==0.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1216
2021-08-02 16:40:04 +02:00
Max Kellermann
239698cb5a
output/pipewire: set channel positions
2021-07-30 15:55:37 +02:00
Max Kellermann
e55de6e9f0
output/pipewire: implement Drain()
2021-07-30 15:28:01 +02:00
Max Kellermann
cfaf2ed03c
output/pipewire: move code to CheckThrowError()
2021-07-30 15:24:20 +02:00
Max Kellermann
6015960871
output/pipewire: reset the "interrupted" flag in Cancel()
...
This fixes seeking.
2021-07-30 15:20:32 +02:00
Max Kellermann
26328cc915
output/pipewire: detect connection errors
2021-07-30 14:31:06 +02:00
Max Kellermann
cd512f0b40
output/pipewire: replace usleep() with with pw_thread_loop_wait()
2021-07-30 14:31:04 +02:00
Max Kellermann
be14dd59a8
output/pipewire: remove obsolete TODO comment
2021-07-30 13:50:55 +02:00
Max Kellermann
97e5787ff7
output/pipewire: call libpipewire only while holding the lock
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1210
2021-07-30 13:49:22 +02:00
Max Kellermann
6975d3ca4b
output/pipewire: switch from pw_main_loop to pw_thread_loop
...
We need this for pw_thread_loop_lock().
2021-07-30 13:42:59 +02:00
Max Kellermann
cdca27e6bb
decoder/Bridge: fix libfmt string
2021-07-30 13:32:27 +02:00
Max Kellermann
5355335f19
db/simple/ExportedSong: check src.OwnsTag(), not this->OwnsTag()
...
this->OwnsTag() accesses fields that are not yet initialized.
2021-07-30 13:10:09 +02:00
Sam Bazley
5b775ca5b4
decoder/ffmpeg: check if long_name is not null
2021-07-28 16:05:15 +01:00
Jacob Vosmaer
ea95da3b1a
archive/meson.build: add missing libfmt dependency
2021-07-26 23:26:07 +02:00
Sam Bazley
57687779be
Android: add option to pause MPD when headphones disconnect
2021-07-26 19:02:47 +01:00
Max Kellermann
64fa76c568
command/file: support "albumart" for virtual tracks in CUE sheets
...
Instead of checking for "cover.jpg" in the virtual directory
representing the CUE sheet, check its enclosing directory.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1206
2021-07-16 09:04:35 +02:00
Max Kellermann
19a44076cf
command/file: pass directory uri to read_stream_art()
2021-07-16 08:31:58 +02:00
Max Kellermann
809a18913a
fs/Traits: add overload GetParent(string_view)
2021-07-16 08:30:34 +02:00
Max Kellermann
5eab2d96f4
output/winmm: fix struct/class mismatch
2021-07-16 08:30:34 +02:00
Max Kellermann
716784f632
increment version number to 0.22.10
2021-07-16 07:23:00 +02:00
Khem Raj
d39b11ba5d
include <utility> for std::forward
...
Fixes
../git/src/Log.hxx:121:42: error: no member named 'forward' in namespace 'std'
LogFormat(LogLevel::ERROR, e, fmt, std::forward<Args>(args)...);
Signed-off-by: Khem Raj <raj.khem@gmail.com >
2021-06-29 19:34:28 -07:00
Max Kellermann
b29a43b4d7
decoder/mad, ...: more libfmt logging
2021-06-25 20:52:08 +02:00
Max Kellermann
f60a42e0b6
Log, client/Response: adapt to libfmt 8.0.0 API changes
2021-06-25 20:29:25 +02:00
Max Kellermann
85b0029ba2
meson.build: add missing dependencies on libfmt
2021-06-25 20:28:54 +02:00
Max Kellermann
0e0f46a1e0
Log: remove unused Format functions
2021-06-24 21:40:12 +02:00
Max Kellermann
6f539cfcd6
Partition, ...: use libfmt for logging
2021-06-24 21:40:11 +02:00
Max Kellermann
0185d58a2b
Log: add libfmt support
2021-06-24 21:14:42 +02:00
Naglis Jonaitis
eb630ca655
doc/user.rst: rectify admin permission
...
Updating the database no longer requires the `admin` permission, only
`control` is needed (changed in 2abad0f479 ).
See also: #1124
2021-06-24 16:44:38 +02:00
Max Kellermann
d7df5e1c90
LogBackend: pass std::string_view to Log()
2021-06-24 13:43:13 +02:00
Max Kellermann
e4e4576a39
Merge tag 'v0.22.9'
...
release v0.22.9
2021-06-23 21:02:06 +02:00
Max Kellermann
18628bf89e
release v0.22.9
2021-06-23 20:56:13 +02:00
Yetangitu
2052b461af
Fix android build error when confronted with package versions ending in +revision_information
...
The script seems to assume package version numbers always end in numeric versions with an optional alpha-suffix. Alas, were it only so simple... Sometimes the package is called fizzbang-1.2.3+release_info in which case the build fails. No more!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1177
2021-06-23 20:53:46 +02:00
Max Kellermann
5019bdcd52
TagAny: invoke ScanGenericTags() on remote files
...
This fixes reading ID3 tags on remote files with the commands
"readcomments" and "readpicture".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1180
2021-06-23 20:49:30 +02:00
Naglis Jonaitis
8be0bcbdb9
doc/plugins.rst: mention default libsamplerate type
2021-06-23 15:51:31 +02:00
Naglis Jonaitis
af72a22ed8
doc/user.rst: document restore_paused
2021-06-23 15:50:41 +02:00
Naglis Jonaitis
6ed9668fea
doc, README.md: update IRC server name/URL
2021-06-23 15:48:42 +02:00
Max Kellermann
175d2c6d29
Main: use AtScopeExit() to call ZeroconfDeinit()
...
Make sure that ZeroconfDeinit() gets called even if startup fails with
an exception. Fixes an assertion failure because an Avahi TimerEvent
is still active.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1192
2021-06-22 20:31:45 +02:00
Naglis Jonaitis
f789451007
doc/plugins.rst: fix PipeWire link
2021-06-19 21:29:37 +03:00
Max Kellermann
36680607d0
meson.build: use some warning options for plain C as well
2021-06-01 11:14:28 +02:00
Max Kellermann
fc54877c6b
meson.build: merge duplicate warning flags to test_common_flags
2021-06-01 11:04:27 +02:00
Rosen Penev
6af7be4a45
add constexpr
...
Found with cppcoreguidelines-interfaces-global-init
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-05-31 13:45:39 -07:00
Max Kellermann
ab487b9a99
Android: use startForegroundService() in Android 8+
...
Fixes the error:
IllegalStateException: Not allowed to start service Intent { cmp=org.musicpd/.Main (has extras) }: app is in background
2021-05-31 20:45:31 +02:00
Max Kellermann
ac59ec34f9
decoder/ffmpeg: fix build failure with FFmpeg 3.4
...
av_demuxer_iterate() was added in libavformat 58.9.100.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1178
2021-05-31 18:10:06 +02:00
Max Kellermann
82da57b7ce
decoder/ffmpeg: suppress -Wunused with libavformat<58.6.100
2021-05-31 16:49:48 +02:00
Max Kellermann
aa6dac9bd2
db/proxy: suppress -Wunused with libmpdclient<2.12
2021-05-31 16:49:08 +02:00
Rosen Penev
220d2bf026
clang-tidy: add explicit deleted constructors
...
Found with cppcoreguidelines-special-member-functions
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-05-30 22:47:20 -07:00
Rosen Penev
9ef1cf15a9
clang-tidy: default virtual destructors
...
Found with cppcoreguidelines-special-member-functions
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-05-30 22:46:46 -07:00
Max Kellermann
679b3bc00f
output/print, command/player: print bool as integer
...
Fixes protocol breakage after commit 0440c41cba
libfmt is too clever for the MPD protocol!
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1175
2021-05-28 18:02:00 +02:00
Max Kellermann
1f9e32c35e
NEWS: fix typo
2021-05-28 15:46:38 +02:00
Max Kellermann
36410daaa4
queue/PlaylistEdit: fix inverted check
...
Regression by commit 471c37be59
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1135
2021-05-28 13:56:01 +02:00
Max Kellermann
38bfef7d0b
Merge branch 'add-openmpt-decoder' of git://github.com/GrimReaperFloof/MPD
2021-05-28 13:53:43 +02:00
GrimReaperFloof
724754f16c
Fix std::to_string warning for booleans in openmpt decoder
2021-05-27 20:47:45 +02:00
Max Kellermann
4d32454697
android/LogListener: pass formatted message to OnLog()
2021-05-27 16:21:36 +02:00
Max Kellermann
4db882f666
android/LogListener: cache the jmethodID
2021-05-27 16:14:43 +02:00
Max Kellermann
a83bf97b98
android/LogListener: un-inline the constructor
2021-05-27 16:13:22 +02:00
Max Kellermann
262e1957b7
lib/icu/Converter: use libfmt
2021-05-27 16:09:56 +02:00
Max Kellermann
792411384d
protocol/ArgParser: add function MakeArgError()
...
Replaces FormatProtocolError().
2021-05-27 16:01:44 +02:00
Max Kellermann
78b0ff83e8
client/Response: include cleanup
2021-05-27 15:59:06 +02:00
Max Kellermann
23613355f3
client/Response: remove unused method FormatV()
2021-05-27 15:16:35 +02:00
Max Kellermann
0d97eba7a5
client/Response: refactor FormatError() to use libfmt
2021-05-27 15:15:47 +02:00
Max Kellermann
18efda719e
client/Response: remove unused method Format()
2021-05-27 15:14:54 +02:00
Max Kellermann
42239a30eb
client/Response: use Fmt() in FormatError()
2021-05-27 15:05:42 +02:00
Max Kellermann
a26bf261a9
input/last: call Close() in Open()
...
Prevents a possible bug which occurs when the caller-provided open()
function throws; then the "uri" field is never set.
2021-05-27 14:04:28 +02:00
Max Kellermann
c692286c67
input/last: clear "uri" field in Close()
...
Prevent false negative after the stream was closed automatically after
20 seconds.
2021-05-27 14:03:33 +02:00
GrimReaperFloof
43a9dc7082
Add note about emulate_amiga_type requiring libopenmpt 0.5
2021-05-26 23:43:38 +02:00
GrimReaperFloof
6f64fa070d
Add repeat count setting to openmpt decoder
2021-05-26 23:43:38 +02:00
GrimReaperFloof
dc5b9d989b
Backwards compatibility with older libopenmpt versions than 0.5
2021-05-26 23:43:38 +02:00
GrimReaperFloof
9e407f5989
Change WritableBuffer<uint8_t> to AllocatedArray<std::byte>
2021-05-26 23:43:38 +02:00
GrimReaperFloof
fec6aac0f1
Code deduplication: move mod_loadfile() into ModCommon.cxx
2021-05-26 23:43:38 +02:00
GrimReaperFloof
541c31c879
Add openmpt decoder plugin
2021-05-26 23:43:38 +02:00
Max Kellermann
4ee0a06e18
Merge branch 'v0.22.x'
2021-05-26 13:15:29 +02:00
Max Kellermann
3775766605
NEWS: mention new FFmpeg/ID3v2 tags
2021-05-26 13:07:03 +02:00
Max Kellermann
38e24208f6
decoder/ffmpeg: support the tags "album-sort", "artist-sort"
2021-05-26 13:04:47 +02:00
Max Kellermann
fbaedf2262
decoder/ffmpeg: support the "sort_album" tag
...
From libavformat/mov.c.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1173
2021-05-26 13:03:47 +02:00
Max Kellermann
8f3341cefb
decoder/ffmpeg: add comment
2021-05-26 13:03:41 +02:00
Max Kellermann
4ec4bab3a9
decoder/ffmpeg: remove "year" tag
...
This mapping was added 11 years ago in commit 766b9fd453 , but FFmpeg
doesn't appear to support it.
2021-05-26 13:03:27 +02:00
Max Kellermann
6d567bcd35
decoder/ffmpeg: fix ArtistSort and AlbumArtistSort mapping
...
These were added 11 years ago in commit 766b9fd453 , but I cannot find
any evidence in the FFmpeg repository that these names were ever
supported. This commit adds the tags as they are currently present in
libavformat/mov.c.
2021-05-26 13:03:26 +02:00
Max Kellermann
4f75eb9bfe
output/pipewire: remove unreachable "return" statement
2021-05-26 11:57:57 +02:00
Max Kellermann
d2bd12822f
Merge branch 'v0.22.x'
2021-05-26 11:57:41 +02:00
Max Kellermann
363d9f0180
db/update/Walk: load all .mpdignore files of all parent directories
...
When updating everything, this did work, but if updating only a
subdirectory, the ".mpdignore" in the parents were not used.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1172
2021-05-25 22:42:44 +02:00
Max Kellermann
db0682a469
db/update/Walk: move code to LoadExcludeList()
2021-05-25 22:38:01 +02:00
Max Kellermann
7a6823dcdf
zeroconf/AvahiPoll: the struct timeval is an absolute time point
...
Fixes broken libavahi-client timeouts.
2021-05-25 22:25:45 +02:00
Max Kellermann
bce144a232
zeroconf/AvahiPoll: move code to Schedule()
2021-05-25 22:23:55 +02:00
Max Kellermann
0cef84cac6
zeroconf/AvahiPoll: rename "timer" to "event"
2021-05-25 22:23:55 +02:00
Max Kellermann
56c0733b42
meson.build: disable -Wsuggest-override with GCC 8
2021-05-25 22:23:55 +02:00
Max Kellermann
0b0acb3981
meson.build: add more C++ warning flags
2021-05-25 22:03:49 +02:00
Max Kellermann
1375dcc4ec
meson.build: sort warning options
2021-05-25 21:49:03 +02:00
Max Kellermann
6aeb0e335b
meson.build: add comment for -Wno-non-virtual-dtor
2021-05-25 21:48:19 +02:00
Max Kellermann
c1e2537851
meson.build: add comment for clang-only warning options
2021-05-25 21:45:39 +02:00
Max Kellermann
8c690fb737
decoder/mad: move variable declaration into "case"
2021-05-25 21:34:09 +02:00
Max Kellermann
dad1c21b59
zeroconf/avahi: move variable declaration into "case"
2021-05-25 21:34:09 +02:00
Max Kellermann
dd10b2bd61
meson.build: remove warning options implied by -Wall -Wextra
2021-05-25 21:24:44 +02:00
Max Kellermann
48c7c540df
meson.build: use add_project_arguments() instead of add_global_arguments()
...
Don't propagate MPD-specific compiler flags to subprojects.
2021-05-25 21:08:06 +02:00
Max Kellermann
281270cd2a
meson.build: remove unused variables common_cflags, common_cxxflags
2021-05-25 21:07:05 +02:00
Max Kellermann
02502514f6
meson.build: require clang 7 (remove bug workaround)
2021-05-25 21:06:55 +02:00
Max Kellermann
1bc02123f9
meson.build: remove "-pedantic", implied by Meson
...
Meson adds "-Wpedantic" in warning_level 3 (which is MPD's default).
2021-05-25 21:01:15 +02:00
Max Kellermann
3488a47c41
subprojects/sqlite3.wrap: add SQLite wrap
2021-05-25 20:51:03 +02:00
Max Kellermann
fd82d67678
sticker/Database: pass NarrowPath to sqlite3_open()
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1171
2021-05-25 18:45:45 +02:00
Max Kellermann
e66c12105b
lib/sqlite/meson.build: add missing external dependency on libsqlite
2021-05-25 18:41:43 +02:00
Max Kellermann
8a9d678bac
Merge branch 'v0.22.x'
2021-05-25 18:21:42 +02:00
Namkhai B
dbe12a6b90
util/RuntimeError: Disable format-security for gcc
...
Fixes building under GCC 11
2021-05-25 18:19:19 +02:00
Max Kellermann
0440c41cba
client/Response: add method Fmt() based on libfmt
2021-05-25 16:01:56 +02:00
Max Kellermann
a9c704b76e
meson.build: libfmt integration
2021-05-25 15:48:49 +02:00
Philippe Antoine
d3a680cc87
meson: set only sanitizers for fuzzer when unspecified
...
That is when meson option b_sanitize is not used
2021-05-24 09:03:16 +02:00
Max Kellermann
62fc4d5cf4
increment version number to 0.22.9
2021-05-24 09:03:07 +02:00
Max Kellermann
0cca1b138c
Merge tag 'v0.22.8'
...
release v0.22.8
2021-05-22 17:35:30 +02:00
Max Kellermann
14465be847
release v0.22.8
2021-05-22 17:33:36 +02:00
Max Kellermann
0e49de867d
input/last: add nullptr check to Open(), fixes assertion failure
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1168
2021-05-22 17:33:25 +02:00
Max Kellermann
f2e4529707
increment version number to 0.22.8
2021-05-22 17:32:00 +02:00
Max Kellermann
d3576a1b71
input/last: add nullptr check to Open(), fixes assertion failure
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1165
2021-05-21 19:30:36 +02:00
Max Kellermann
96707c0426
Merge tag 'v0.22.7'
...
release v0.22.7
2021-05-19 18:43:19 +02:00
Max Kellermann
3547fc7e61
release v0.22.7
2021-05-19 18:13:26 +02:00
Max Kellermann
466a05bc52
CommandLine: update copyright year in --version output
2021-05-19 18:09:38 +02:00
Max Kellermann
6de4064cca
client/Response, command/file: use %lu instead of %zu on Windows
...
Fixes -Wformat warnings.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:06:40 +02:00
Max Kellermann
bcf0fdd3a8
meson.build: define NOUSER on Windows for lighter windows.h
...
A few exceptions are needed for sources which include COM header
(directly or indirectly).
This fixes lots of shadow warnings, see
https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:02:49 +02:00
Max Kellermann
a8f05a7efc
win32/HResult: un-inline HRESULTToString() to reduce header dependencies
2021-05-19 17:48:42 +02:00
Max Kellermann
c64a3b5dbb
fs/Glob: un-inline the Windows version to reduce header dependencies
2021-05-19 17:41:23 +02:00
Max Kellermann
16c38c438f
fs/Glob: use defaulted move constructor
2021-05-19 17:40:23 +02:00
Max Kellermann
48cc4a6ced
fs/Glob: remove redundant #ifdefs
2021-05-19 17:40:03 +02:00
Max Kellermann
a169a05e41
win32, ...: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-05-19 17:25:32 +02:00
Max Kellermann
a6cb3139db
meson.build: disable Windows header features not needed by MPD
2021-05-19 17:16:16 +02:00
Max Kellermann
239a83324e
meson.build: document Windows definitions
2021-05-19 17:15:25 +02:00
Max Kellermann
8efa5c7641
output/wasapi: use "%lu" in log calls
...
"%lu" is portable - it works with both POSIX and Microsoft flavors.
Fixes a part of https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 17:10:49 +02:00
Max Kellermann
28e7be248f
util/RuntimeError: disable -Wformat-security as a kludge
2021-05-19 14:57:20 +02:00
Max Kellermann
e016cc8940
lib/upnp/meson.build: auto-disable UPnP without CURL/expat
2021-05-19 14:37:13 +02:00
GrimReaperFloof
34f636ffc3
Change WritableBuffer<uint8_t> to AllocatedArray<std::byte>
2021-05-19 09:54:06 +02:00
GrimReaperFloof
a134f692bf
Code deduplication: move mod_loadfile() into ModCommon.cxx
2021-05-19 09:53:39 +02:00
Max Kellermann
d747576793
Merge branch 'npu' of git://github.com/neheb/MPD
2021-05-19 09:48:12 +02:00
Max Kellermann
d9578f6427
Merge branch 'flac-ogg' of git://github.com/jprjr/VGMPD
2021-05-19 09:33:42 +02:00
Max Kellermann
b2cec7a0a3
Merge branch 'v0.22.x'
2021-05-19 08:09:05 +02:00
Max Kellermann
85db2d6704
db/proxy: split search into chunks to avoid exceeding the output buffer
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1130
2021-05-19 08:04:50 +02:00
Max Kellermann
22ebb2bdd5
db/proxy: send "window" as separate parameter to SendConstraints()
2021-05-19 07:51:48 +02:00
Max Kellermann
e108568082
db/proxy: require libmpdclient 2.11 or later
...
Remove lots of #ifdefs.
2021-05-19 07:46:42 +02:00
Max Kellermann
360381e65d
doc/plugins.rst: mention the minimum MPD version
2021-05-19 07:46:42 +02:00
Max Kellermann
3ead778664
doc/plugins.rst: add libmpdclient website link
2021-05-19 07:45:47 +02:00
Max Kellermann
4fc08e39b4
db/proxy: require MPD 0.20 or later
...
Allows using ranges, always. This is required to fix
https://github.com/MusicPlayerDaemon/MPD/issues/1130 without adding
more runtime conditionals.
2021-05-19 07:41:04 +02:00
Max Kellermann
c3f9b38c97
command/PlaylistCommands: pass real_uri to LookupRemoteTag()
...
For querying tags, the real song URI should be used, because if the
(display) URI is different, requesting it will not produce a usable
response. This is a theoretical problem because none of the existing
playlist plugins sets the real_uri.
This requires changing the URI comparison in playlist::TagModified().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1154
2021-05-18 21:35:09 +02:00
Max Kellermann
dbb18a401b
command/file: cache the last "albumart" file
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1156
2021-05-18 17:04:09 +02:00
Max Kellermann
e1e41708af
input/LastInputStream: new class
2021-05-18 17:04:09 +02:00
Max Kellermann
a2bdac571a
Merge branch 'v0.22.x'
2021-05-17 19:33:15 +02:00
Max Kellermann
638dfc3981
{input,storage}/curl: set CURLOPT_HTTPAUTH=CURLAUTH_BASIC
...
With the default value CURLAUTH_ANY, libcurl needs to probe for
authentication methods first, and only the second request will have an
Authorization header.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1155
2021-05-17 19:26:05 +02:00
Max Kellermann
7c09e44ad4
python/build/libs.py: update OpenSSL to 3.0.0-alpha16
2021-05-17 18:42:05 +02:00
Max Kellermann
365b798f33
python/build/libs.py: update FFmpeg to 4.4
2021-05-17 18:42:05 +02:00
Max Kellermann
6f51d910ee
python/build/libs.py: update CURL to 7.76.1
2021-05-17 18:42:05 +02:00
Max Kellermann
1215818572
doc/meson.build: remove "upload" target
...
Since we migrated to readthedocs.io, we don't need this target
anymore. And Meson 0.58.0 apparently has a change breaking this
target.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1161
2021-05-17 18:33:00 +02:00
John Regan
87fa6bca54
flac encoder: enable Ogg FLAC and Ogg chaining
...
refactors GenerateOggSerial into a generic GenerateSerial
utility, under the util lib.
libFLAC may be encoded without Ogg support. If Ogg support is disabled,
libFLAC will still export Ogg-related methods (like setting a serial
number), and throw a runtime error when initializing an Ogg stream.
GenerateOggSerial does not depend on libogg. Refactoring it into
a generic GenerateSerial prevents having to add build-time checks
for libogg within the FLAC encoder plugin.
2021-05-15 11:31:01 -04:00
Max Kellermann
c3226a3195
doc/conf.py: Copyright 2021
2021-05-11 17:57:14 +02:00
Max Kellermann
51671af5a4
doc/conf.py: move "~git" suffix to release
2021-05-11 17:52:24 +02:00
Max Kellermann
2908f6565b
doc/conf.py: update version number to 0.23~git
2021-05-11 17:49:26 +02:00
skidoo23
514ed33a02
python/build: update Boost URL and version
2021-05-11 13:11:16 +02:00
GrimReaperFloof
a0334d1d94
Add resampling mode setting to modplug decoder
2021-05-07 19:48:52 +02:00
Max Kellermann
bfed47b82d
.travis.yml: switch the OSX build to xcode11.6
...
The clang/libc++ version in xcode10.3 does not support C++17 properly
and cannot build MPD.
2021-04-28 13:40:36 +02:00
Max Kellermann
8c51440057
test/test_mixramp: workaround for -Wdouble-promotion
2021-04-28 13:00:42 +02:00
Max Kellermann
018858ec97
.travis.yml: install standard Homebrew GTest formula
2021-04-27 16:23:23 +02:00
Max Kellermann
3c1988b68f
.travis.yml: switch from Ubuntu Bionic to Ubuntu Focal (20.04)
2021-04-27 16:23:23 +02:00
Max Kellermann
5452428d69
.travis.yml: switch to ppa:ricotz/toolchain for ninja 1.8 on Ubuntu Trusty
...
The old "ppa:mstipicevic/ninja-build-1-7-2" just provides ninja 1.7
which is too old and breaks the build.
2021-04-27 16:23:23 +02:00
Max Kellermann
d6bf6e161a
.travis.yml: remove obsolete comment
2021-04-27 15:48:19 +02:00
Max Kellermann
a71b76bb3c
test/test_pcm_format: another workaround for -Wdouble-promotion
2021-04-26 23:25:36 +02:00
Max Kellermann
c1429500b2
test/test_pcm_format: work around -Wdouble-promotion
2021-04-26 22:21:12 +02:00
Max Kellermann
0f02bbc2fe
output/jack: enable on Windows
...
This enables the JACK output plugin on Windows, but doesn't link
against libjack64.dll, instead loads the DLL at runtime with
LoadLibrary(). This kludge avoids the extremely fragile JACK shared
memory protocol by using the system's libjack64.dll, without requiring
the same DLL at build time.
2021-04-26 21:47:20 +02:00
Max Kellermann
b885f358a5
output/control: add missing nullptr checks
...
Fixes crash when pausing the default partition after an output was
moved to another partition.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1147
2021-04-26 21:34:58 +02:00
Max Kellermann
423f2df5e0
pcm/Volume: drop support for GCC older than 8
2021-04-20 20:01:43 +02:00
Max Kellermann
0122dc8452
util/BindMethod: drop support for GCC older than 7
2021-04-20 20:01:08 +02:00
Max Kellermann
650a30d794
Revert "tag/Pool: use strncmp() without strlen() to compare strings"
...
This reverts commit 1532983fb5 . This
optimization was bad because now all strings match if they are a
prefix of another string, and this caused collisions in the tag string
pool, corrupting the database.
2021-04-15 16:15:44 +02:00
Max Kellermann
1dc71f383a
python/build/boost.py: touch boost/version.hpp to avoid reinstalling all the time
2021-04-07 13:50:05 +02:00
Max Kellermann
95ad1b0cc6
use [[gnu::pure]] instead of gcc_pure
...
This is semi-standard and doesn't require the util/Compiler.h header.
2021-04-06 14:09:21 +02:00
Max Kellermann
52f46b94e9
util/AllocatedString: add concatenating constructor
2021-04-06 14:06:16 +02:00
Max Kellermann
e07e0bc9c1
util/AllocatedArray: include cleanup
2021-04-06 14:05:29 +02:00
Max Kellermann
4a1c231734
net/SocketError: use constexpr
2021-04-06 13:59:58 +02:00
Max Kellermann
fd0e958e95
net/SocketError: use auto
2021-04-06 13:58:46 +02:00
Max Kellermann
3d814115c8
net/SocketError: change "const" to "pure"
2021-04-06 13:58:32 +02:00
Max Kellermann
ca726a0110
util/StringBuffer: make capacity() static
...
This allows using it in constant expressions.
2021-04-06 13:46:07 +02:00
Max Kellermann
e01710cbd1
util/DereferenceIterator: simplify operator->()
...
This makes it compatible with containers storing std::unique_ptr.
2021-04-06 13:45:32 +02:00
Max Kellermann
c87a4a7d08
util/DereferenceIterator: fix static_cast in operator->()
2021-04-06 13:45:10 +02:00
Max Kellermann
b59170b702
Java/Exception: simplify RethrowException()
2021-04-06 13:35:59 +02:00
Max Kellermann
a237db556a
java/File: add non-static GetAbsolutePath() overload
2021-04-06 13:35:59 +02:00
Max Kellermann
285ba54fe5
java/String: remove unnecessary env parameter
2021-04-06 13:35:59 +02:00
Max Kellermann
ee86434a89
java/String: add const
2021-04-06 13:35:59 +02:00
Max Kellermann
95d5efbfe6
java/Ref: add nullptr comparison
2021-04-06 13:35:59 +02:00
Max Kellermann
c33f206ce8
java/Ref: add nullptr constructor
2021-04-06 13:29:35 +02:00
Max Kellermann
2d95ac2e94
Java/String: inherit the super class constructor
2021-04-06 13:29:24 +02:00
Max Kellermann
f58c14a74a
Java: no namespace indent
2021-04-06 13:29:13 +02:00
Max Kellermann
a52ce7bb7b
java/Ref: add move operator
2021-04-06 13:27:11 +02:00
Max Kellermann
16d187b7ed
java/Ref: remove const, add default initialiser
2021-04-06 13:26:54 +02:00
Max Kellermann
296ec4d07c
java/Ref: add nullptr check to destructor
...
May allow the compiler to optimize calls away.
2021-04-06 13:26:29 +02:00
Max Kellermann
6e58fd1583
lib/curl/Multi: reword API documentation
2021-03-29 20:19:21 +02:00
Max Kellermann
c5fec4ac2a
lib/curl/Multi: move operator bool() down
2021-03-29 20:19:21 +02:00
Max Kellermann
fe2ca1ddef
lib/curl/Multi: rename parameters
2021-03-29 20:19:19 +02:00
Jean-Francois Dockes
e960626804
Add npupnp support
...
libnpupnp is a C++ modification of libupnp.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-03-26 14:14:58 -07:00
Simon Persson
7dd2dce6ad
Support new tags in proxy plugin
...
Add support for the following tags when using the proxy database plugin:
WORK
CONDUCTOR
LABEL
GROUPING
MUSICBRAINZ_WORKID
COMPOSERSORT
ENSEMBLE
MOVEMENT
MOVEMENTNUMBER
LOCATION
2021-03-24 20:59:54 +01:00
Max Kellermann
a7ba10423d
Merge branch 'v0.22.x'
2021-03-13 08:41:10 +01:00
John Regan
6dfebf7df9
gme: add support for rsn files
...
Upcoming release of game-music-emu will support it, details here: https://bitbucket.org/mpyne/game-music-emu/pull-requests/23/rsn-support
2021-03-13 08:40:25 +01:00
Shen-Ta Hsieh
4bcdcca7f5
output/wasapi: use calculated new buffer instead old one
2021-03-13 08:39:56 +01:00
bitkeeper
c08a8581ee
Added cross-origin header to http headers of the http output.
...
The current http output doesn't provide a header for cross-origin support. This prevents to use the mpd http stream directly from an other webapplication due the origin from the webpage differs from then the audio stream.
The fix is to add the following header to the http response:
Access-Control-Allow-Origin: *
2021-03-10 21:27:19 +01:00
Simon Persson
8f1e7385b7
Add tags relevant to classical music.
...
This commit adds some tags that are (mostly) interesting for listeners
of classical music.
Ensemble
--------
This is an ensemble that is playing the music, such as Wiener
Philharmoniker. The tag can be used to distinguish the ensemble from the
conductor, composer, soloist, and ensemble, that are generally all in
the "ARTIST" tag.
Movement
-------
The movement number and movement (name) of this track, i.e. "II" and
"Allegro".
ComposerSort
------------
Allows us to look for Beethoven's 9th under B, for Beethoven, not L for
Ludwig.
Location
--------
This is the location of the recording, e.g. "Wiener Musikverein".
2021-03-10 21:24:25 +01:00
Max Kellermann
25354b9d8c
Merge branch 'v0.22.x'
2021-03-10 21:06:12 +01:00
Max Kellermann
25b0194036
output/wasapi: implement Drain()
2021-03-10 21:05:48 +01:00
Max Kellermann
77fe727e69
output/wasapi: move the "is_started" flag to class WasapiOutputThread
2021-03-10 20:43:28 +01:00
Max Kellermann
73f9824ddf
output/wasapi: eliminate friend declaration
2021-03-10 20:38:41 +01:00
Max Kellermann
1fe0c673bc
output/wasapi: implement Cancel() properly
...
Calling consume_all() is illegal in the producer thread.
2021-03-10 20:38:27 +01:00
Max Kellermann
8a045207a7
output/wasapi: add field paused
...
Fixes bogus Delay() results at the start of playback, because Delay()
thinks the output is paused.
2021-03-10 20:09:37 +01:00
Max Kellermann
fe7c5a4208
output/wasapi: initialize is_started in Open()
2021-03-10 20:07:22 +01:00
Max Kellermann
8024f7e84d
output/wasapi: move the thread->Play() call right before the consumed_size check
...
Fixes a bogus assertion failure (which can now be removed).
2021-03-10 20:07:19 +01:00
Max Kellermann
14f0134097
output/wasapi: make device_config const
2021-03-10 20:05:14 +01:00
Max Kellermann
1da27be84d
output/wasapi: move runtime fields below configuration fields
2021-03-10 20:00:08 +01:00
Max Kellermann
08135f2cb7
output/wasapi: make configuration fields const
2021-03-10 19:58:33 +01:00
Max Kellermann
5907656bbb
output/wasapi: stop the IAudioClient while paused
...
Instead of generating silence, do nothing, don't waste CPU time.
2021-03-10 17:48:49 +01:00
Max Kellermann
2ac2bd26f8
output/wasapi: combine two if statements to one switch
2021-03-10 17:45:54 +01:00
Max Kellermann
a2be91aea5
output/wasapi: add method WasapiOutputThread::InterruptWaiter()
2021-03-10 17:42:26 +01:00
Max Kellermann
579428172e
output/wasapi: remove the broken Delay() calculation code
...
This code is complicated - and broken: the producer thread is not
allowed to call consumer methods. Also the code is not necessary
because this plugin implements Interrupt().
2021-03-10 17:39:07 +01:00
Max Kellermann
3e484637f9
output/wasapi: rename OpenDevice() to ChooseDevice()
...
OpenDevice was a confusing name because it does not actually open a
device.
2021-03-10 17:34:10 +01:00
Max Kellermann
3e93c392d7
output/wasapi: make enumerator a local variable
2021-03-10 17:23:41 +01:00
Max Kellermann
0a97e68aa9
output/wasapi: start after the buffer has been filled
...
Postpone the Start() call until there is something to be played.
2021-03-08 23:03:25 +01:00
Max Kellermann
69783a44c8
output/wasapi: move Start()/Stop() calls to WasapiOutputThread::Work()
2021-03-08 22:58:20 +01:00
Max Kellermann
d72263d28d
win32/HResult: support AUDCLNT_E_NOT_{INITIALIZED,STOPPED}
2021-03-08 22:57:44 +01:00
Max Kellermann
24a205a1aa
win32/HResult: try to use FormatMessage()
2021-03-08 22:54:46 +01:00
Max Kellermann
3a948515ce
output/wasapi: check for exceptions after Wait()
...
This finishes problems which occur early in the WasapiOutputThread;
previously, the error was ignored and the output blocked forever
without doing anything (and without reporting the error).
2021-03-08 22:46:40 +01:00
Max Kellermann
9ade93983c
output/wasapi: rename method WaitDataPoped() to Wait()
2021-03-08 22:44:49 +01:00
Max Kellermann
6931ce9558
output/wasapi: make the Thread a field, not a base class
2021-03-08 22:30:19 +01:00
Max Kellermann
d6fb07a3e4
output/wasapi: start the WasapiOutputThread in its constructor
2021-03-08 22:29:33 +01:00
Max Kellermann
01d3c2705e
output/wasapi: Finish() calls Join()
2021-03-08 22:28:36 +01:00
Max Kellermann
29346dc9c5
output/wasapi: remove the thread management code from DoDisable()
...
This is duplicate; this has already been done in Close().
2021-03-08 22:27:46 +01:00
Max Kellermann
d19b3df3b0
test/run_output: call AudioOutput::Drain()
2021-03-08 22:20:55 +01:00
Max Kellermann
798e68ef62
output/wasapi: don't clear the exception in CheckException()
...
This is pointless; the method cannot be called again anyway.
2021-03-08 22:18:48 +01:00
Max Kellermann
79397db5b4
output/wasapi: remove the "thrown" field
...
It is pointless to let WasapiOutputThread wait for the
CheckException() call.
2021-03-08 22:17:45 +01:00
Max Kellermann
9256190a9b
output/wasapi: move catch block to the Work() function level
...
If an exception has been caught, the method cannot continue playback,
therefore it doesn't make sense to have the "catch" block inside the
"while" block (and not break the loop after catching an exception).
2021-03-08 22:15:36 +01:00
Max Kellermann
3a0dbb0a67
output/wasapi: make WasapiOutputThread::is_exclusive const
2021-03-08 22:09:23 +01:00
Max Kellermann
3d6c9d1b88
output/wasapi: catch all exception
2021-03-08 22:06:29 +01:00
Max Kellermann
5823e79fe7
output/wasapi: remove broken Drain() implementation
...
The current Drain() implementation does what Cancel() should do; it
does not wait for completion, but instead discards the buffer.
2021-03-08 21:41:34 +01:00
Max Kellermann
5f656dffda
output/wasapi: implement Cancel()
2021-03-08 19:58:15 +01:00
Max Kellermann
34d4d9157a
output/wasapi: add inline
2021-03-08 19:57:40 +01:00
Max Kellermann
22c329cdb4
output/wasapi: convert pointer to reference
2021-03-08 19:56:56 +01:00
Max Kellermann
980ef82216
output/wasapi: move SetEventHandle() call to thread constructor
2021-03-08 17:52:44 +01:00
Max Kellermann
84a06a72df
output/wasapi: fix coding style
2021-03-08 17:52:43 +01:00
Max Kellermann
4833d0891d
output/wasapi: eliminate kErrorId
2021-03-08 17:47:07 +01:00
Max Kellermann
cd53ca22c6
output/wasapi: remove unused function SafeTry()
2021-03-08 17:43:36 +01:00
Max Kellermann
4d9af9a81b
test/run_{input,output,convert}: switch file descriptors to binary mode
...
Fixes those programs on Windows.
2021-03-08 17:27:23 +01:00
Max Kellermann
d61341c0e3
io/FileDescriptor: add method SetBinaryMode()
2021-03-08 17:25:36 +01:00
Max Kellermann
eff50b263a
test/run_output: use class StaticFifoBuffer
2021-03-08 17:01:48 +01:00
Max Kellermann
2bebc79363
test/run_convert: use std::byte
2021-03-08 16:58:43 +01:00
Max Kellermann
e777fb4edb
test/run_convert: pass FileDescriptor to RunConvert()
2021-03-08 16:51:57 +01:00
Max Kellermann
3fb25d4062
test/run_convert: move code to RunConvert()
2021-03-08 16:46:21 +01:00
Max Kellermann
e227596c20
test/run_output: pass FileDescriptor to run_output()
2021-03-08 16:44:15 +01:00
Max Kellermann
ec76583c33
win32/Com: add COINIT_DISABLE_OLE1DDE
...
MSDN documentation suggests always passing this flag to reduce
overhead for an "obsolete technology".
2021-03-08 14:03:33 +01:00
Max Kellermann
927f1e03a3
win32/Com: make COINIT_APARTMENTTHREADED the default constructor
2021-03-08 14:02:49 +01:00
Max Kellermann
f2c679cfec
win32/Com: remove the unused COINIT_MULTITHREADED constructor
2021-03-08 14:02:49 +01:00
Max Kellermann
6a75c48dba
win32/HResult: add MakeHResultError()
...
None of the current FormatHResultError() callers need the format string.
2021-03-08 13:46:36 +01:00
Max Kellermann
48bdd09f64
win32/ComWorker: fold class COMWorkerThread into class COMWorker
2021-03-07 18:22:59 +01:00
Max Kellermann
cf108c389f
win32/ComWorker: remove parameter passing from Async()
...
Parameters should better be captured. This removes some complexity
from Async().
2021-03-07 18:20:59 +01:00
Max Kellermann
90d97053a8
win32/ComWorker: make COMWorker a real class, no static members
2021-03-06 20:46:29 +01:00
Max Kellermann
ee720064a7
Merge branch 'v0.22.x'
2021-03-05 19:41:17 +01:00
Shen-Ta Hsieh
e1fe9ebcd6
output/wasapi: Add dop support for WASAPI
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1102
2021-03-05 19:40:32 +01:00
Max Kellermann
e1b62fb90d
Merge branch 'v0.22.x'
2021-03-05 19:33:46 +01:00
Max Kellermann
93016ac6ab
output/wasapi: check AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED
...
Stop early, don't try more formats if it is clear that we have no
chance.
2021-03-05 19:33:38 +01:00
Max Kellermann
fc20a1f10a
output/wasapi: EnumerateDevices() logs, no std::vector
2021-03-05 19:27:52 +01:00
Max Kellermann
a4257e51d5
output/wasapi: reimplement SearchDevice() without EnumerateDevices()
2021-03-05 19:25:42 +01:00
Max Kellermann
2f2b3f1cdc
output/wasapi: SearchDevice() returns IMMDevice
2021-03-05 19:25:42 +01:00
Max Kellermann
2ff6a9ad2b
output/wasapi: GetDevice() returns IMMDevice
2021-03-05 19:25:42 +01:00
Max Kellermann
17d4873b60
output/wasapi: use default device only if none was configured
2021-03-05 19:25:42 +01:00
Max Kellermann
8b41c4f384
output/wasapi: release the COMWorker if OpenDevice() fails
...
Fixes assertion failure in the Thread destructor.
2021-03-05 19:25:42 +01:00
Max Kellermann
17f7098e27
output/wasapi: SafeTry() catches all exceptions
...
Fixes crash due to std::stoul() throwing std::invalid_argument.
2021-03-05 19:12:22 +01:00
Max Kellermann
9ff790b7bb
output/wasapi: move COM utilities to separate headers
2021-03-05 18:33:31 +01:00
Max Kellermann
ebc1fe2821
win32/ComPtr: operator*() returns reference
2021-03-05 17:39:48 +01:00
Max Kellermann
bc2988144e
test/run_output: use OptionParser, add option "--verbose"
2021-03-05 17:39:48 +01:00
Max Kellermann
b1a9958c66
test/run_output: add struct CommandLine
2021-03-05 17:39:48 +01:00
Max Kellermann
e6a81bb95c
output/wasapi: split the header
...
Reduce header dependencies.
2021-03-05 16:43:44 +01:00
Max Kellermann
9521c1ad58
output/wasapi: use forward declarations in the header
2021-03-05 16:42:38 +01:00
Max Kellermann
6d65cc48d7
output/wasapi: use [[gnu::pure]]
2021-03-05 16:42:15 +01:00
Max Kellermann
681956a963
output/wasapi: include cleanup
2021-03-05 16:42:14 +01:00
Max Kellermann
052f64d648
output/wasapi: include config.h for ENABLE_DSD
2021-03-05 16:35:21 +01:00
Max Kellermann
afe621c25c
output/wasapi: move to separate directory
2021-03-05 16:28:36 +01:00
Max Kellermann
422cf5f182
Merge branch 'v0.22.x'
2021-03-05 16:05:56 +01:00
Max Kellermann
637cf8a039
win32/WinEvent: add default value to Wait()
2021-03-05 16:05:32 +01:00
Max Kellermann
2011a6e2ee
win32/WinEvent: un-inline the constructor
...
Reduce header dependencies.
2021-03-05 16:01:23 +01:00
Max Kellermann
d54830de12
thread/WindowsFuture: include cleanup
2021-03-05 13:50:16 +01:00
Max Kellermann
a7e7312cca
win32/HResult: un-inline HResultCategory::message()
2021-03-05 13:40:40 +01:00
Max Kellermann
6b83fc6b57
win32/HResult: un-inline FormatHResultError()
...
Reduce header dependencies.
2021-03-05 13:40:38 +01:00
Max Kellermann
74f9e07151
win32/HResult: include cleanup
2021-03-05 13:40:37 +01:00
Max Kellermann
82a61ab3be
win32/meson.build: fix syntax error
2021-03-05 13:40:34 +01:00
Max Kellermann
54c1794cee
win32: build static library
...
Fixes linker failure on test/run_output.exe
2021-03-05 13:32:58 +01:00
Max Kellermann
c962a6be76
test/run_convert: fix Windows compiler errors
2021-03-05 13:24:28 +01:00
Max Kellermann
922c4bf3f0
test/TestLookupFile: fix Windows compiler errors
2021-03-05 13:22:34 +01:00
Max Kellermann
932756efce
win32/ComWorker: fix the FormatHResultError() return type
...
Casting to std::runtime_error loses information (and prevents RVO).
2021-03-05 13:17:40 +01:00
Max Kellermann
7838265482
win32/ComWorker: remove debug log messages
2021-03-05 13:16:09 +01:00
Max Kellermann
b14b0e5634
win32/ComWorker: reorder includes
2021-03-05 13:15:45 +01:00
Max Kellermann
4d2d0e7bb8
win32/ComWorker: include cleanup
2021-03-05 13:15:21 +01:00
Rosen Penev
44378b7dbe
use structured binding declarations
...
Shorter.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-03-04 20:28:02 +01:00
Max Kellermann
ef1acb4e2f
Merge branch 'v0.22.x'
2021-03-04 18:56:29 +01:00
Shen-Ta Hsieh
da642b2890
src/output: add algorithm for finding usable AudioFormat
...
* Use PcmExport for 24bit packed output
2021-03-04 18:53:58 +01:00
Shen-Ta Hsieh
6f77af20d0
src/output: Set fallback setting for DSD
2021-03-04 18:50:56 +01:00
Shen-Ta Hsieh
010f65a1d6
src/output: Add Interrupt interface
2021-03-04 18:50:09 +01:00
Shen-Ta Hsieh
c46f97454a
src/output: Reopen device on error
2021-03-04 18:49:28 +01:00
Shen-Ta Hsieh
844dbd2ec5
src/output: Use WinEvent for as a condition_variable without lock
2021-03-04 18:46:26 +01:00
Shen-Ta Hsieh
db7caa2dac
src/output: Move event and spsc_queue into thread object
2021-03-04 18:45:56 +01:00
Shen-Ta Hsieh
2974737746
src/win32: Add ComWorker to run all COM function on same thread
2021-03-04 18:43:43 +01:00
Shen-Ta Hsieh
b1d7567226
win32: Add ComWorker to run all COM function on same thread
2021-03-04 18:43:16 +01:00
Max Kellermann
5103eb3039
meson.build: compile Win32Main.cxx only on Windows
2021-03-04 18:43:00 +01:00
Shen-Ta Hsieh
0cccdcf9b2
src/win32: Add support for COINIT_APARTMENTTHREADED
2021-03-04 18:37:56 +01:00
Shen-Ta Hsieh
22b840c2f1
win32/Com: use if with init-statement
2021-03-04 18:37:35 +01:00
Shen-Ta Hsieh
ed1a995bff
thread: Add Future implement for mingw32 without pthread
2021-03-04 18:26:46 +01:00
Shen-Ta Hsieh
0f39dc1edb
output/wasapi: use AUDCLNT_BUFFERFLAGS_SILENT for paused output
2021-03-04 18:17:57 +01:00
Max Kellermann
dc9103befe
util/AllocatedString: remove Null(), IsNull()
2021-03-04 18:05:29 +01:00
Max Kellermann
67760f5283
util/AllocatedString: support casting a nulled instance to string_view
2021-03-04 18:05:29 +01:00
Max Kellermann
99405a4c93
util/AllocatedString: add operator=()
2021-03-04 18:05:26 +01:00
Max Kellermann
b833c5d2c7
util/AllocatedString: replace Clone() with copy constructor
2021-03-04 18:04:21 +01:00
Max Kellermann
bca5d79f88
util/AllocatedString: add const_pointer constructor
2021-03-04 18:04:17 +01:00
Max Kellermann
6e1c8edf09
util/AllocatedString: add string_view constructor
...
Replaces the static Duplicate() method.
2021-03-04 18:04:11 +01:00
Max Kellermann
32b7b2e2fa
util/AllocatedString: add default constructor
2021-03-04 18:04:06 +01:00
Max Kellermann
cfb7f8ab84
util/AllocatedString: rename to BasicAllocatedString
...
To make things simpler, AllocatedString is now a non-template class.
2021-03-04 18:03:56 +01:00
Max Kellermann
d4bbb8c851
Merge branch 'struc' of git://github.com/neheb/MPD
2021-03-04 17:50:53 +01:00
Érico Rolim
8d80280ab9
time/ISO8601: don't use glibc extension in strptime.
...
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that
directly.
2021-03-04 17:49:51 +01:00
Érico Rolim
c95e3dc065
storage/plugins/CurlStorage: don't use glibc extension in
...
ParseTimePoint.
%Z is a glibc extension to strptime, and is a no-op there, due to the
mapping between timezone names and their definition (especially when the
name comes from a different machine) being ambiguous / impossible. Time
in HTTP headers is guaranteed to be UTC.
Passing an unknown format to strptime() implementations that don't
support it will generally cause them to return NULL, which will lead to
ParseTimePoint throwing an exception and ParseTimeStamp using an
unnecessary fallback.
Since the timezone name goes at the end of the string, we don't need to
use %Z to skip it (could be an issue in a different time stamp format),
so simply removing %Z works best.
2021-03-04 17:48:23 +01:00
Max Kellermann
428f769c38
output/pipewire: new output plugin
...
Very rough draft. Barely works.
2021-03-03 18:44:39 +01:00
Max Kellermann
133c8834df
output/httpd: update API documentation
2021-03-02 18:24:57 +01:00
Max Kellermann
99217593bf
test/util/TestIntrusiveList: add AutoUnlink test
2021-03-02 18:15:37 +01:00
Max Kellermann
1c6e4a2b18
test/util/TestIntrusiveList: new unit test
2021-03-02 18:12:15 +01:00
Max Kellermann
a6eb264770
util/IntrusiveList: add type alias "Hook"
...
By casting to SafeLinkIntrusiveListHook if appropriate, this fixes a
bug in the erase() method, where erase() calls
IntrusiveListHook::unlink() instead of
SafeLinkIntrusiveListHook::unlink().
2021-03-02 17:51:50 +01:00
Max Kellermann
f5f296b13a
event/TimerWheel: add a "ready" list as a special case
...
This reduces delays of zero-duration timers from up to 1 second to
zero. libavahi-client schedules zero-duration timers often.
2021-03-02 17:14:33 +01:00
Max Kellermann
0091c4e12b
util/Exception: add FindNested()
2021-03-02 17:13:29 +01:00
Max Kellermann
80172e17ac
util/Exception: remove redundant std::exception catch clause
...
The "std::nested_exception" catch block already covers this perfectly.
2021-03-02 17:13:21 +01:00
Max Kellermann
2d96b05403
test/util/TestException: add CheckFindRetrowNested() unit test
2021-03-02 17:12:43 +01:00
Max Kellermann
ec0c1f0d02
util/Exception: fix comment typo
2021-03-02 17:12:20 +01:00
Max Kellermann
00a520a4c3
doc/user.rst: update Windows&Android build dependencies
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1112
2021-02-26 00:59:10 +01:00
Max Kellermann
946b3c1f80
util/IntrusiveList: add method erase_and_dispose()
2021-02-25 14:12:47 +01:00
Max Kellermann
a0dc398f36
util/IntrusiveList: erase() returns an iterator
2021-02-25 14:12:39 +01:00
Max Kellermann
b54d2d984a
util/IntrusiveList: use ToHook() in erase()
2021-02-25 14:12:10 +01:00
Max Kellermann
4ab73f9de9
util/IntrusiveList: add missing ToNode() cast in iterator_to()
2021-02-25 14:10:55 +01:00
Max Kellermann
5ebe23e4bb
db/upnp/Discovery: use class IntrusiveList
2021-02-24 20:39:42 +01:00
Max Kellermann
aa227cded1
input/qobuz: use class IntrusiveList
2021-02-24 20:31:47 +01:00
Max Kellermann
e406bdbb80
input/tidal: use class IntrusiveList
2021-02-24 20:31:13 +01:00
Max Kellermann
1048f23680
util/IntrusiveList: add hook class SafeLinkIntrusiveListHook
...
Similar to boost::intrusive::safe_link.
2021-02-24 20:29:16 +01:00
Max Kellermann
8fe8f09027
util/IntrusiveList: add noexcept
2021-02-24 20:17:28 +01:00
Max Kellermann
78670c0941
util/IntrusiveList: add constexpr
2021-02-24 20:16:54 +01:00
Max Kellermann
34f735890e
output/snapcast: remove obsolete TODO comment
2021-02-24 17:05:14 +01:00
Max Kellermann
f08810b202
output/snapcast: add missing #ifdef HAVE_ZEROCONF
2021-02-24 17:04:15 +01:00
Max Kellermann
7a68775e6c
output/snapcast: Zeroconf support
2021-02-24 17:03:30 +01:00
Max Kellermann
e4fccc85c8
Main: move Zeroconf to the I/O thread
...
This will allow using Zeroconf in output plugins (preparing for
Snapcast with Zeroconf).
2021-02-24 16:29:33 +01:00
Max Kellermann
2efa142ec9
output/init: use the real-time I/O thread only for the ALSA plugin
2021-02-24 16:09:11 +01:00
Max Kellermann
29b49dd630
zeroconf/{bonjour,avahi}: pass service_type as parameter
2021-02-24 15:11:11 +01:00
Max Kellermann
9d6bf7e720
test/run_avahi: refactor to RunZeroconf (both avahi and bonjour)
2021-02-24 15:09:10 +01:00
Max Kellermann
5f34508aae
zeroconf/Glue: move code to the ZeroconfHelper constructor
2021-02-24 15:09:10 +01:00
Max Kellermann
2d8ecd561b
zeroconf: return a publisher object
2021-02-24 15:09:10 +01:00
Max Kellermann
2059195ae9
zeroconf: add dependency on event_dep
2021-02-24 15:09:10 +01:00
Max Kellermann
d89856f77b
zeroconf/avahi/Helper: make class SharedAvahiClient final
2021-02-24 15:09:10 +01:00
Max Kellermann
975d5be046
zeroconf/avahi/Init: return a std::unique_ptr<AvahiHelper>
2021-02-24 14:41:37 +01:00
Max Kellermann
b01ef1b9a6
zeroconf/Bonjour: return a std::unique_ptr<BonjourHelper>
2021-02-24 14:25:06 +01:00
Max Kellermann
ceb76b6a82
zeroconf/Bonjour: pass a context pointer to the callback
2021-02-24 14:18:35 +01:00
Max Kellermann
a7e697b588
zeroconf/Bonjour: add const
2021-02-24 14:18:17 +01:00
Max Kellermann
3ecd918442
zeroconf/Bonjour: move the DNSServiceRegister() call to the constructor
2021-02-24 14:17:59 +01:00
Max Kellermann
4fbdb3a2d5
zeroconf/Bonjour: convert the callback function to a method
2021-02-24 14:15:26 +01:00
Max Kellermann
0157643667
zeroconf/Glue: add noexcept
2021-02-24 14:15:26 +01:00
Max Kellermann
fe741bd767
zeroconf/Glue: allow ZeroconfInit() to throw
2021-02-24 14:15:04 +01:00
Max Kellermann
06b9bdba2c
zeroconf/Bonjour: disallow copying
2021-02-24 13:53:36 +01:00
Max Kellermann
bd0aa74bdd
zeroconf/Bonjour: rename class BonjourMonitor to BonjourHelper
2021-02-24 13:53:35 +01:00
Max Kellermann
47461df59c
zeroconf/Bonjour: don't call DNSServiceRefDeallocate() if DNSServiceRegister() fails
...
According to
https://developer.apple.com/documentation/dnssd/1804733-dnsserviceregister
the DNSServiceRef is initialized only if DNSServiceRegister() returns
kDNSServiceErr_NoError. The faulty error handling code could
therefore crash.
2021-02-24 13:49:03 +01:00
Max Kellermann
04d5588fe5
zeroconf/Zeroconf*: drop prefix from file names
2021-02-24 13:33:59 +01:00
Max Kellermann
40d061621b
zeroconf/Avahi: remove useless log messages
2021-02-24 13:33:58 +01:00
Max Kellermann
a312629aad
zeroconf: pass global port to init function
2021-02-24 06:40:26 +01:00
Max Kellermann
d527d4b530
zeroconf/avahi/Publisher: new class, replacing lots of code from ZeroconfAvahi.cxx
2021-02-23 22:07:57 +01:00
Max Kellermann
978d2638d8
zeroconf/avahi/Client: new class, replacing lots of code from ZeroconfAvahi.cxx
2021-02-23 21:53:07 +01:00
Max Kellermann
cfcafdf822
zeroconf/avahi: add class AvahiGlue
2021-02-23 21:53:00 +01:00
Max Kellermann
07865d0707
zeroconf/avahi/Poll: move to namespace Avahi
2021-02-23 21:41:16 +01:00
Max Kellermann
1ac16516a1
event/TimerList: add option to avoid the Boost dependency
2021-02-22 23:35:16 +01:00
Max Kellermann
75e8795e3f
util/IntrusiveList: add method insert()
2021-02-22 23:32:51 +01:00
Max Kellermann
4912466d50
util/IntrusiveList: add method erase()
2021-02-22 23:32:47 +01:00
Max Kellermann
664674913e
event/Loop: include cleanup
2021-02-22 23:32:39 +01:00
Max Kellermann
31e3658823
Merge branch 'v0.22.x'
2021-02-22 23:25:07 +01:00
Max Kellermann
abd416735d
output/snapcast: implement SendTag()
2021-02-22 23:20:56 +01:00
Max Kellermann
6090bd2095
lib/yajl/Gen: new class
2021-02-22 23:12:08 +01:00
Max Kellermann
1777592ec0
lib/yajl/Handle: fix API documentation
2021-02-22 22:56:52 +01:00
Max Kellermann
8e8fbe14b1
output/snapcast: implement Drain()
2021-02-22 22:49:32 +01:00
Max Kellermann
a8a39b6a38
output/snapcast: queue chunks
2021-02-22 22:41:31 +01:00
Max Kellermann
f84cb6de5e
output/snapcast/client: remove obsolete TODO comment
...
See commit dfc67c45c7
2021-02-22 22:39:32 +01:00
Max Kellermann
dfc67c45c7
output/snapcast: calculate the latency for TIME responses
2021-02-22 21:57:20 +01:00
Max Kellermann
e875da5d38
output/snapcast/protocol: swap "received" and "sent"
...
Snapcast's protocol documentation is wrong, see
https://github.com/badaix/snapcast/pull/811
2021-02-22 21:42:42 +01:00
Max Kellermann
9b9522e3f5
zeroconf/avahi/Poll: rename internal variables
2021-02-22 15:01:01 +01:00
Max Kellermann
87963685fb
zeroconf/avahi/Poll: use C++11 initializer
2021-02-22 15:00:20 +01:00
Max Kellermann
0405a57f26
zeroconf/avahi/Poll: make EventLoop the first parameter
2021-02-22 14:52:21 +01:00
Max Kellermann
f29c69d6a9
zeroconf/avahi/Poll: rename timer to event
2021-02-22 14:39:28 +01:00
Max Kellermann
7ec4de841e
zeroconf/avahi/Poll: add constexpr
2021-02-22 14:34:32 +01:00
Max Kellermann
1f08d2d03c
zeroconf/avahi/Poll: add noexcept
2021-02-22 14:31:37 +01:00
Max Kellermann
c1a695d1ac
zeroconf/avahi/Poll: add method GetEventLoop()
2021-02-22 14:31:10 +01:00
Max Kellermann
ec05056e38
zeroconf/avahi/Poll: forbid copying
2021-02-22 14:26:08 +01:00
Max Kellermann
c0b9339d31
zeroconf/AvahiPoll: move to lib/avahi/
2021-02-22 14:24:00 +01:00
Max Kellermann
6eba621045
decoder/ffmpeg: fix build problem with FFmpeg 3.4
...
Regression by commit a22d1c88d7
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1097
2021-02-22 13:36:46 +01:00
Max Kellermann
a9ad8fa505
decoder/ffmpeg: move code to IsSeekable(AVFormatContext)
2021-02-22 13:33:25 +01:00
Max Kellermann
00a1731085
Merge branch 'timeout_in_second' of git://github.com/mxjeff/MPD
2021-02-20 20:11:38 +01:00
kaliko
6e3da00874
MPD_TIMEOUT is in seconds
...
At least I believe libmpdclient is reading env. var. as second:
https://github.com/MusicPlayerDaemon/libmpdclient/blob/master/src/settings.c#L142
ncmpc manual also mentions MPD_TIMEOUT being is second.
2021-02-20 15:22:18 +01:00
kaliko
38df01b266
Add password use with MPD_HOST
2021-02-20 15:21:15 +01:00
Max Kellermann
c729f16dcd
song/DetachedSong: copy the AudioFormat from LightSong
...
Enables the "Format" row in "playlistinfo" responses.
https://github.com/MusicPlayerDaemon/MPD/issues/1094
2021-02-18 22:16:11 +01:00
Max Kellermann
81d0c04ed4
song/DetachedSong: add noexcept
2021-02-18 22:01:52 +01:00
Max Kellermann
0924b63e10
event/TimerWheel: add empty flag to optimize a common case
2021-02-17 19:52:45 +01:00
Max Kellermann
ce6afe9379
output/httpd/Page: convert to type alias on AllocatedArray
2021-02-17 18:01:27 +01:00
Max Kellermann
6f04b2230a
output/httpd/Page: use std::byte
2021-02-17 17:54:38 +01:00
Max Kellermann
8d90b831e1
output/snapcast/Timestamp: drop static
2021-02-17 14:39:20 +01:00
Max Kellermann
d4710604c4
doc/plugins.rst: fix typo
2021-02-17 14:39:06 +01:00
Max Kellermann
85427826aa
increment version number to 0.22.7
2021-02-17 14:36:06 +01:00
Max Kellermann
9c8da03c5c
output/snapcast: new output plugin
...
New experimental code, first draft - it works, but there's a lot left
to do. Just look at all the TODO comments.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/975
2021-02-17 14:25:23 +01:00
Max Kellermann
85adefd9a4
encoder/wave: remove constexpr because memcpy() is not allowed
2021-02-17 14:19:02 +01:00
Max Kellermann
22804cfbe8
Merge branch 'patch-2' of git://github.com/fschlich/MPD
2021-02-17 07:25:06 +01:00
Florian Schlichting
25e0a90402
fix typo in protocol.rst
...
Exmaple -> Example
2021-02-17 03:18:23 +01:00
Max Kellermann
8a4b88a59d
encoder/wave: use the structs from RiffFormat.hxx
2021-02-16 19:50:52 +01:00
Max Kellermann
d2371af120
encoder/wave: add static_assert on sizeof(WaveHeader)
2021-02-16 19:50:46 +01:00
Max Kellermann
aa2e1bb310
encoder/wave: refactor fill_wave_header() to function
2021-02-16 19:50:43 +01:00
Max Kellermann
6153fca4fc
tag/RiffFormat: add struct RiffFmtChunk
2021-02-16 19:50:40 +01:00
Max Kellermann
f090af0a22
tag/RiffFormat: add static_asserts on sizeof()
2021-02-16 19:50:25 +01:00
Max Kellermann
58f420fdca
tag/RiffFormat: use CamelCase
2021-02-16 19:24:51 +01:00
Max Kellermann
ded2b31fbc
tag/Riff: split into RiffId3.?xx and RiffFormat.hxx
2021-02-16 19:23:01 +01:00
Max Kellermann
75c8d2235b
util/ByteOrder: add classes PackedBE16, PackedLE16, PackedLE32
2021-02-16 17:37:25 +01:00
Max Kellermann
f679961564
Merge tag 'v0.22.6'
...
release v0.22.6
2021-02-16 13:58:47 +01:00
Max Kellermann
938728820b
release v0.22.6
2021-02-16 13:56:14 +01:00
Max Kellermann
80531ef8d8
db/simple: fix ExportedSong move constructor for non-owning sources
...
If the constructor moves from an ExportedSong instance which refers to
somebody else's "Tag" instance, the newly constructed instance will
instead refer to its own empty "tag_buffer" field. This broke
SimpleDatabase::GetSong(), i.e. all songs on the queue restored from
the state file or added using the "addid" command.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1089
2021-02-16 13:52:25 +01:00
Max Kellermann
a91fba6a3d
increment version number to 0.22.6
2021-02-16 13:47:33 +01:00
Max Kellermann
471c37be59
queue/PlaylistEdit: convert start/end parameters to RangeArg
2021-02-15 22:51:09 +01:00
Max Kellermann
157ddcbab1
protocol/RangeArg: add methods ClipRelaxed(), CheckClip(), CheckAdjustEnd()
2021-02-15 22:50:49 +01:00
Max Kellermann
ab160aa359
queue/PlaylistEdit: check "current>=0" before updating it
2021-02-15 22:50:37 +01:00
Max Kellermann
ecc07e4e98
Merge tag 'v0.22.5'
...
release v0.22.5
2021-02-15 22:50:16 +01:00
Max Kellermann
f8be403c34
release v0.22.5
2021-02-15 21:18:18 +01:00
Max Kellermann
28a5cdf319
android/meson.build: update the SDK platform to 29
...
Needed for `requestLegacyExternalStorage` (commit ca02fb7782 ).
2021-02-15 21:17:26 +01:00
Max Kellermann
6b1d264b35
command/queue: better error message for open-ended range with "move"
...
The "move" command doesn't allow open-ended ranges because they don't
make a lot of sense; moving an open-ended range is only possible if
the destination index is before the range, and in that case, the
client should be well aware how many songs there are.
Closes https://github.com/MusicPlayerDaemon/MPD/pull/1057
2021-02-15 20:57:22 +01:00
Max Kellermann
a6c10e9a1c
protocol/ArgParser: check for invalid ranges
...
Catch errors like that early, before invalid ranges get passed to
internal MPD subsystems.
2021-02-15 20:55:30 +01:00
Max Kellermann
19a46064e9
protocol/RangeArg: add methods IsWellFormed(), IsEmpty(), HasAtLeast(), Count()
2021-02-15 20:54:51 +01:00
Max Kellermann
b57eeaa720
protocol/RangeArg: add static method Single()
2021-02-15 20:29:37 +01:00
Max Kellermann
ad059d5804
protocol/RangeArg: add method IsOpenEnded()
2021-02-15 20:29:35 +01:00
Max Kellermann
6e1940e930
protocol/RangeArg: add static method OpenEnded()
2021-02-15 20:29:34 +01:00
Max Kellermann
103194e32d
protocol/RangeArg: add missing noexcept
2021-02-15 19:56:02 +01:00
Naglis Jonaitis
cbc830fd65
doc/client.rst: fix typo
2021-02-15 20:23:32 +02:00
Shen-Ta Hsieh
481c330c17
src/output: Set thread name for Wasapi output thread
2021-02-15 17:51:49 +01:00
Shen-Ta Hsieh
7ef489e057
src/win32: run clang-format
2021-02-15 17:50:51 +01:00
Shen-Ta Hsieh
d9e5d5ff5b
src/win32: Add error message for NO_ERROR
2021-02-15 17:45:25 +01:00
Max Kellermann
ca02fb7782
android/AndroidManifest.xml: enable requestLegacyExternalStorage
...
This is a workaround for the new scoped storage design in Android 11:
https://developer.android.com/about/versions/11/privacy/storage
This needs a proper solution eventually, but this quick fix will do
until we change "targetSdkVersion" to 30.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1061
2021-02-15 17:43:05 +01:00
Max Kellermann
d4d06da2f8
db/simple: fix dangling LightSong::tag reference in moved ExportedSong
...
After commit 1afa33c3c7 , an old bug was revealed:
SimpleDatabase::GetSong() constructs an ExportedSong instance by
moving the return value of Song::Export(), which causes the
LightSong::tag field to be dangling on the moved-from
ExportedSong::tag_buffer. This broke tags from CUE sheets.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1070
2021-02-15 17:38:37 +01:00
Max Kellermann
efde78db77
output/Thread: skip drain calls if there is no data to be played
...
Keep track of whether there is data being played, and don't call
AudioOutput::Drain() after Cancel() has been called already.
2021-02-15 16:39:13 +01:00
Max Kellermann
f1b8bcd6b2
output/pulse: don't drain if stream is suspended or corked
...
In this state, we can't make any progress.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1084
2021-02-15 16:07:16 +01:00
Max Kellermann
c2bc3704e1
output/pulse: move code to virtual method Drain()
...
Drain only if it was requested explicitly.
2021-02-15 15:59:54 +01:00
Max Kellermann
def120aca4
output/pulse: eliminate the pause field
...
It is useless, because we're always checking pa_stream_is_corked().
2021-02-15 15:59:46 +01:00
Max Kellermann
6d2b09ac2b
doc/developer.rst: update branch names
2021-02-15 13:41:46 +01:00
Max Kellermann
98a9f81d61
doc/client.rst: new chapter about client development
2021-02-15 13:26:25 +01:00
Max Kellermann
78b43a9930
doc/protocol.rst: document add on local socket
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1022
2021-02-15 13:00:18 +01:00
AndriiZ
f5460b35a3
Add cacert option for Curl plugin. Allows to set cacert for curl lib ( #3 )
...
Add cacert option for curl plugin
add cacert option for Curl plugin. Allows to set cacert for curl lib
Added documentation line into doc/plugins.rst with explanation for cacert option
2021-02-13 13:49:15 +02:00
Max Kellermann
3456b1e50d
use std::size_t
2021-02-12 18:39:28 +01:00
Max Kellermann
fe6abe1750
zlib/Error: add noexcept
2021-02-12 18:37:32 +01:00
Max Kellermann
6cdb3ff21e
use [[gnu::pure]] instead of gcc_pure
...
This is semi-standard and doesn't require the util/Compiler.h header.
2021-02-12 18:34:16 +01:00
Max Kellermann
01af2778ab
time/ISO8601: throw std::invalid_argument on error
...
Throwing std::runtime_error was slightly wrong.
2021-02-12 18:31:56 +01:00
Max Kellermann
ad03c70753
event/TimerWheel: workaround for GCC9 bug
2021-02-12 18:29:02 +01:00
Max Kellermann
7fe0095fa7
util/IntrusiveList: add noexcept to defaulted constructor
2021-02-11 21:22:15 +01:00
Max Kellermann
a4b236348f
Merge branch 'v0.22.x'
2021-02-07 22:04:07 +01:00
Max Kellermann
da5ff779c6
python/build/libs.py: enable CURL/schannel support on Windows
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1031
2021-02-07 21:58:08 +01:00
Max Kellermann
e7da5b104d
archive/iso9660: another fix for unaligned reads
...
Commit 79b2366387 added the field `skip`
to support unaligned reads, but set the `offset` field to a wrong
value. This resulted in miscalculation of `remaining`, causing
an assertion failure.
The fix is to assign `offset` the correct value, but consider the
`skip` value in the assertion.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1067
2021-02-07 21:41:51 +01:00
Max Kellermann
aa40aae5bd
doc/user.rst: add section about profiling MPD
2021-02-07 21:38:24 +01:00
Max Kellermann
4be76f3c8f
archive/iso9660: check "skip==0" before doing optimized large read
...
After a Seek() to an odd offset, some data needs to be skipped from
the start of the block, and reading right into the given buffer
doesn't work.
2021-02-07 21:38:13 +01:00
Max Kellermann
c58c53293c
test/run_input: add option --seek
2021-02-07 21:20:17 +01:00
Max Kellermann
8695a2806a
test/run_input: document more options
2021-02-07 21:17:10 +01:00
vkostas
a59f1b21a6
Fix: Separate Conductor from Performer
...
Conductor was incorrectly saved to Performer tag in MPD database
2021-02-07 20:45:01 +01:00
Max Kellermann
5a16e3ffa3
event/TimerWheel: optimized container for CoarseTimerEvent
2021-02-05 18:24:25 +01:00
Max Kellermann
d1957b83c8
event/Chrono: add type alias TimePoint
2021-02-05 18:19:23 +01:00
Max Kellermann
1b4fd74575
event/TimerEvent: rename to FineTimerEvent
...
... and make TimerEvent a type alias for FineTimerEvent (i.e. swap
names).
2021-02-05 18:18:05 +01:00
Max Kellermann
def962b6cb
event/{Coarse,Fine,Far}TimerEvent: aliases for TimerEvent
...
Preparing for a variant of TimerEvent with coarse 1-second
granularity, but cheaper (with a timer wheel).
2021-02-05 18:16:05 +01:00
Max Kellermann
e802f1f61a
event/Loop: move TimerSet to separate class
2021-02-05 18:09:21 +01:00
Max Kellermann
271b287356
event/TimerEvent: assign due in Schedule()
2021-02-05 17:57:05 +01:00
Max Kellermann
2a30acd99c
event/Loop: use [[gnu::pure]]
2021-02-05 17:55:33 +01:00
Max Kellermann
a8e70f18fd
event/*: use using instead of typedef
2021-02-05 17:54:16 +01:00
Max Kellermann
ddd9f20a0b
fs/io/GunzipReader: document that the constructor throws
2021-02-04 17:29:00 +01:00
Max Kellermann
f4a5d671fe
util/{Const,Writable}Buffer: include cleanup
2021-02-04 17:27:48 +01:00
Richard Backhouse
c72006dbcc
zeroconf/ZeroconfBonjour: Cleanup formatting from previous commit
2021-01-23 06:13:05 -05:00
Richard Backhouse
06fe30e2bd
zeroconf/ZeroconfBonjour: Fix compile errors resulting from "refactor to SocketEvent" and reenable bonjour for darwin build
2021-01-23 06:06:49 -05:00
Max Kellermann
08e76815ba
io/FileDescriptor: use std::byte
2021-01-22 12:50:16 +01:00
Max Kellermann
33ac3eb551
lib/curl/Easy: add methods SetVerify{Host,Peer}()
2021-01-22 12:34:04 +01:00
Max Kellermann
d56a51cb5e
Merge branch 'v0.22.x'
2021-01-21 22:28:11 +01:00
Max Kellermann
9e2d09dabc
net/SocketError: add syscall specific check functions
...
Fixes Windows compatibility.
2021-01-21 22:05:21 +01:00
Max Kellermann
2719f62feb
net/SocketError: relicense to BSD-2
2021-01-21 21:31:02 +01:00
Max Kellermann
065a0c09f8
fs/io/StdioOutputStream: include cleanup
2021-01-21 21:13:40 +01:00
Max Kellermann
04731fb7cc
util/StringPointer: add operator==(std::nullptr_t)
2021-01-21 21:08:52 +01:00
Max Kellermann
12ff5a547f
fs/io/FileOutputStream: add noexcept
2021-01-21 21:04:19 +01:00
Max Kellermann
9b2eb74f95
util/AllocatedString: fix operator= parameter type
2021-01-21 20:44:07 +01:00
Max Kellermann
84084baa65
util/AllocatedString: remove wrong std:: prefix
2021-01-21 20:16:32 +01:00
Max Kellermann
3bc45fbf68
util/AllocatedString: remove Null(), IsNull()
2021-01-21 20:12:05 +01:00
Max Kellermann
36168a24f5
util/AllocatedString: support casting a nulled instance to string_view
2021-01-21 20:06:01 +01:00
Max Kellermann
5e67443a1a
util/{Const,Writable}Buffer: always enable assertions
2021-01-21 20:04:00 +01:00
Max Kellermann
17858143b3
util/{Const,Writable}Buffer: enable constexpr on more methods
2021-01-21 20:03:53 +01:00
Max Kellermann
c44a7b2705
util/AllocatedArray: add operator=(nullptr)
2021-01-21 20:03:38 +01:00
Max Kellermann
0ded23591b
util/AllocatedString: add operator=()
2021-01-21 20:02:52 +01:00
Max Kellermann
c1a7aa652d
util/AllocatedString: replace Clone() with copy constructor
2021-01-21 20:02:41 +01:00
Max Kellermann
8d47f51399
util/AllocatedString: add const_pointer constructor
2021-01-21 18:06:10 +01:00
Max Kellermann
a81c9bfb81
util/AllocatedString: add string_view constructor
...
Replaces the static Duplicate() method.
2021-01-21 18:05:51 +01:00
Max Kellermann
1caf57644f
util/AllocatedString: add default constructor
2021-01-21 18:05:50 +01:00
Max Kellermann
c70b63c183
util/AllocatedString: rename to BasicAllocatedString
...
To make things simpler, AllocatedString is now a non-template class.
2021-01-21 18:04:03 +01:00
Max Kellermann
1b89b4ef83
Merge branch 'v0.22.x'
2021-01-21 17:45:15 +01:00
Max Kellermann
234cedd6c6
increment version number to 0.22.5
2021-01-21 17:43:25 +01:00
Max Kellermann
8279cafd6d
Merge tag 'v0.22.4'
...
release v0.22.4
2021-01-21 17:42:26 +01:00
Max Kellermann
5b946e9d95
android/AndroidManifest.xml: android release 0.22.4
2021-01-21 17:36:00 +01:00
Max Kellermann
b46ca50dcc
android/AndroidManifest.xml: raise targetSdkVersion to 29
...
The Google overlords require me to change to 29 or else I can't upload
new releases to Google Play.
https://developer.android.com/distribute/best-practices/develop/target-sdk
2021-01-21 17:35:59 +01:00
Max Kellermann
a0d76c3be9
release v0.22.4
2021-01-21 17:21:20 +01:00
Max Kellermann
995aafe9cc
protocol: add command "binarylimit"
...
Increasing the protocol version to 0.22.4 to allow clients to detect
this feature.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1038
2021-01-21 17:17:10 +01:00
Max Kellermann
6e33566cee
client/FileCommands: validate the given offset
2021-01-21 16:57:38 +01:00
Max Kellermann
3b3c1d466d
event/FullyBufferedSocket: add method GetOutputMaxSize()
2021-01-21 16:49:38 +01:00
Max Kellermann
056ab199ab
util/PeakBuffer: add method max_size()
2021-01-21 16:45:56 +01:00
Max Kellermann
eea0e084af
util/PeakBuffer: use std::byte instead of std::uint8_t
2021-01-21 16:45:31 +01:00
Max Kellermann
fa82f558be
util/PeakBuffer: add noexcept
2021-01-21 16:45:17 +01:00
Max Kellermann
6b555b7017
util/PeakBuffer: use std::size_t
2021-01-21 16:45:14 +01:00
Max Kellermann
dafba203e7
util/ForeignFifoBuffer: use auto
2021-01-21 16:38:32 +01:00
Max Kellermann
a5d382348e
command/Request: ParseUnsigned() returns unsigned
...
Of course, it should do that!
2021-01-21 16:33:17 +01:00
Max Kellermann
74396448df
input/curl: disable verify_peer on Android by default
...
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-21 14:55:09 +01:00
Max Kellermann
168d6257b4
python/build/libs.py: build CURL with OpenSSL support
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1059
2021-01-21 14:33:14 +01:00
Max Kellermann
014c2a82bd
event/SignalMonitor: fix non-Linux build failure
...
Regression by commit cd4b673b6c
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1060
2021-01-21 14:05:23 +01:00
Max Kellermann
1afa33c3c7
db/simple/Song: Export() merges tags with "target"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1048
2021-01-21 13:57:59 +01:00
Max Kellermann
3a7c9c7c84
db/simple/ExportedSong: add option to own a Tag
2021-01-21 13:52:01 +01:00
Max Kellermann
6d08e761c8
db/simple/ExportedSong: new class
2021-01-21 13:52:01 +01:00
Max Kellermann
fee282f49c
SongPrint: use LightSong::GetDuration()
...
This properly prints the "Time"/"duration" values for songs in virtual
CUE folders.
This is loosely related to
https://github.com/MusicPlayerDaemon/MPD/issues/1048
2021-01-21 13:52:00 +01:00
Max Kellermann
07d2bc6898
util/StringView: add method SplitLast()
2021-01-21 13:20:01 +01:00
Max Kellermann
9551166f27
command/file: use %zu to format a size_t
...
`PRIoffset` was wrong, because it expects an `offset_type`
(i.e. `uint64_t`). This broke on 32 bit machines where `size_t` has
32 bits.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1058
2021-01-20 20:44:47 +01:00
Max Kellermann
2a8c420cff
client/Response: add printf attribute
2021-01-20 20:43:16 +01:00
Max Kellermann
ec1e04a65d
Merge branch 'bugfix/1043/remove-basepath-handling' of git://github.com/PVince81/MPD into v0.22.x
2021-01-20 20:02:31 +01:00
Max Kellermann
97a2122f41
doc/mpd.conf.5.rst: updated ReplayGain website links
...
"The documentation for mpd.conf still links to https://replaygain.org
– according to archive.org, this domain has been defunct since
2014-09-14, shortly after got domain squatted and ever since hosts
dubious content."
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1050
2021-01-20 14:58:35 +01:00
Max Kellermann
3825175bfc
python/build/ffmpeg.py: remove obsolete -no-integrated-as workaround
2021-01-19 20:17:47 +01:00
Max Kellermann
68f4be323c
doc/user.rst: require Android NDK r22
2021-01-19 20:17:36 +01:00
Max Kellermann
4949cd98f3
output/sles: add missing include for assert()
2021-01-19 20:17:17 +01:00
Max Kellermann
a14ce4c7cb
lib/pcre/RegexPointer: work around bogus -Wmaybe-uninitialized with GCC 11
2021-01-19 19:58:04 +01:00
Max Kellermann
85a5b7dec4
python/build/libs.py: update CURL to 7.74.0
2021-01-19 18:08:17 +01:00
Max Kellermann
153d464ce8
python/build/libs.py: update Boost to 1.75.0
2021-01-19 18:05:17 +01:00
Itai Y. Efrat
83391e2bd9
doc/protocol.rst: fix playlist(find|search)
...
The `{TAG} {NEEDLE}` input format documented seems to be a holdover
of pre-0.21 filters, and the commands support the new format.
2021-01-19 17:27:14 +01:00
Rosen Penev
594dfe572b
clang-tidy: mark a bunch of variables constexpr
...
Found with cppcoreguidelines-interfaces-global-init
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2021-01-16 18:35:31 -08:00
Max Kellermann
906e82f600
event/Loop: fix assertion failure due to wrong "busy" value
...
If an InjectEvent callback schedules a timer, the loop will restart,
but the "busy" flag is still false. The fix is to move the "again"
check before the "busy" setting.
2021-01-12 17:28:42 +01:00
Max Kellermann
bcb7e954e9
net/Resolver: add simple getaddrinfo() wrapper
2021-01-12 15:43:26 +01:00
Max Kellermann
866c87c65e
net/ToString: include cleanup
2021-01-12 12:22:44 +01:00
Max Kellermann
4ba36d7cb9
net/SocketError: relicense to BSD-2
2021-01-11 22:31:46 +01:00
Max Kellermann
13f8a912e3
event/Loop: simplify wake_event initializer
2021-01-11 20:14:20 +01:00
Max Kellermann
51f110a990
system/EventPipe: use class Unique{Socket,File}Descriptor
2021-01-11 17:51:22 +01:00
Max Kellermann
17eae74c1c
system/EventFD: Get() returns FileDescriptor
2021-01-11 17:38:30 +01:00
Max Kellermann
cd4b673b6c
event/WakeFD: convert macro to class with a GetSocket() method
2021-01-11 17:02:54 +01:00
Ethan Halsall
0d606c743b
add additional opus encoder options
2021-01-09 22:04:00 -06:00
Vincent Petry
ec0d3ac95d
Remove relative path handling which was not needed
...
The original base relative path was introduced due to an erroneous test
where the URL started with three slashes: "https:/// " instead of two,
which led to implementing handling for such cases but broke the two
slashes case.
This fix removes the base relative path handling because with two
slashes the path is anyway always relative to the host (aka absolute
URI, without host).
This reverts 216f62ea14 and part of 74b2fc7fdc
Signed-off-by: Vincent Petry <PVince81@yahoo.fr >
2021-01-08 16:50:27 +01:00
Max Kellermann
81ea749248
Merge branch 'v0.22.x'
2021-01-05 13:11:29 +01:00
Max Kellermann
e99f6b5b38
Merge branch 'bugfix/1039/fix-webdav' of git://github.com/PVince81/MPD into v0.22.x
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1039
2021-01-05 13:09:15 +01:00
Vincent Petry
74b2fc7fdc
Use uri_has_scheme for Webdav response href
...
Use uri_has_scheme to find out if the href in Webdav responses is absolute
to use the matching base path extraction.
Signed-off-by: Vincent Petry <PVince81@yahoo.fr >
2021-01-05 12:04:08 +01:00
Vincent Petry
216f62ea14
Webdav href in response can be relative
...
Fixed Webdav base path stripping in cases where href is a relative path.
Signed-off-by: Vincent Petry <PVince81@yahoo.fr >
2021-01-04 21:50:03 +01:00
Vincent Petry
b7d0001390
Fix parsing propstat blocks
...
There can be more than one propstat block each with their own status
code. We're only interested in the one with the 200 status, the found
properties.
This fixes parsing to make sure we process all propstat blocks instead
of just the last one, which might have a 404 status for not-found
properties.
Signed-off-by: Vincent Petry <PVince81@yahoo.fr >
2021-01-04 21:49:38 +01:00
Vincent Petry
687788e4d3
Fix Webdav storage PROPFIND request
...
Remove additional "a:prop" in PROPFIND request to match RFC 4918 section 9.1.3.
Added Content-Type header as the body is not a true multipart POST.
Signed-off-by: Vincent Petry <PVince81@yahoo.fr >
2021-01-04 14:28:42 +01:00
Max Kellermann
e009ad1a72
thread/Id: relicense to BSD-2
2021-01-03 19:25:20 +01:00
Max Kellermann
abbd980671
Merge branch 'v0.22.x'
2021-01-01 19:59:15 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Max Kellermann
5a4ebf8291
doc/protocol.rst: document that tag changed trigger "player" idle event
2020-12-18 20:41:43 +01:00
Itai Y. Efrat
7ae3664c91
doc/protocol.rst: fix MPD version on oneshot
2020-12-16 19:36:16 +02:00
Itai Y. Efrat
1caed3e390
doc/protocol.rst: fix mistake in footnotes
2020-12-16 19:06:47 +02:00
Max Kellermann
937da63ba6
util/StringView: add {Starts,Ends}With(char)
2020-12-15 17:04:39 +01:00
Max Kellermann
1f312b2e42
curl/Handler: disallow OnData() to throw
...
This eliminates some complexity from class CurlRequest.
2020-12-15 17:03:24 +01:00
Max Kellermann
1e3089ffb7
curl/Request: move struct Pause to class CurlResponseHandler
2020-12-15 17:01:18 +01:00
Max Kellermann
5d7ff150dd
curl/Request: add more wrapper methods
2020-12-15 16:56:20 +01:00
Max Kellermann
c767501c12
Merge branch 'v0.22.x'
2020-12-15 14:11:06 +01:00
EdJoPaTo
7adb907a55
doc/protocol.rst: ensure all commands have targets
2020-12-15 14:10:28 +01:00
EdJoPaTo
00602d28a4
doc/protocol.rst: ensure all commands have targets
2020-12-15 13:49:57 +01:00
Max Kellermann
7a56837141
odbus/Watch: support DBUS_WATCH_{ERROR,HANGUP}
2020-12-14 15:10:19 +01:00
Max Kellermann
ed1caffc79
odbus/Watch: use SocketEvent::ReleaseSocket() to allow another Open()
2020-12-14 15:10:15 +01:00
Max Kellermann
65473b5113
lib/dbus/FilterHelper: new class
2020-12-14 15:07:12 +01:00
Max Kellermann
178d115ccb
lib/dbus/Glue: add noexcept
2020-12-14 13:19:51 +01:00
kaliko
af2896547a
doc/protocol.rst: Add missing "originaldate" to the list of supported tags
2020-12-14 13:03:30 +01:00
Max Kellermann
10e5b0759c
lib/dbus/Glue: relicense to BSD-2
2020-12-14 13:02:37 +01:00
arcnmx
0a81e462db
event/SocketEvent: remove FD before closing socket
...
SocketEvent knows the FD is still open and is about to close it, so
it's unnecessary to rely on the kernel (via AbandonFD) to clean up the
epoll_wait list.
### Why this is relevant
- `AbandonFD` assumes that upon closing the socket, the FD will be automatically removed from the epoll list. That fd is associated with a reference to the `SocketEvent`, so this is an important and dangerous assumption to get wrong. In the case that the FD isn't immediately removed from the list by the kernel, the event loop can crash due to the `SocketEvent` being destroyed and it being a use-after-free bug at that point.
- If a socket FD happens to be duplicated, then closing the SocketEvent FD will not automatically remove it from epoll, and will trigger said bug/crash. It is only automatically removed when all FD references to the underlying socket/resource are closed?
- A `fork()` is one example where a socket FD can be duplicated and result in this situation.
- `CLOEXEC` might be considered mitigation for this but also introduces a race condition where the crash can occur between a `fork()` and `exec()` without additional synchronization to freeze the event loop.
One could argue the mpd event loop isn't fork-safe, and thus should be allowed to use `AbandonFD` however it likes. A decision on whether this is intended should probably be declared; but either way this fix seems appropriate in cases where `Abandon` isn't actually necessary. It also might be possible to fix `AbandonFD` to mark the `SocketEvent` as removed without using `EPOLL_CTL_DEL`?
[edit: made this dependent on HAVE_THREADED_EVENT_LOOP which is always
true for MPD, but not for ncmpc, for example - mk]
2020-12-04 10:32:46 +01:00
Max Kellermann
5cbbe8ae2e
event/TimerEvent: update API documentation
2020-12-04 09:57:19 +01:00
Max Kellermann
00fafa16c7
event/SocketEvent: remove assert(), reduce header dependencies
2020-12-04 09:56:28 +01:00
Max Kellermann
cea8db7eaa
event/SocketEvent: add comment
2020-12-04 09:55:08 +01:00
Max Kellermann
b56c0e69e4
event/SocketEvent: add another assert() to Open()
2020-12-04 09:24:02 +01:00
Max Kellermann
b27e82e4a9
event/SocketEvent: allow Schedule() with IMPLICIT_FLAGS
...
Relax the API (instead of tightening it further like commit
7bc1c9925b tried to do unsuccessfully).
2020-12-04 09:17:45 +01:00
Max Kellermann
ad48834469
Revert "event/SocketEvent: add assert()"
...
This reverts commit 7bc1c9925b . It
caused a crash with the ALSA plugin family (through
MultiSocketMonitor::ReplaceSocketList() and
MultiSocketMonitor::AddSocket()). Until we have a proper fix, the
assertion patch is reverted.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1020
2020-12-02 20:43:29 +01:00
Max Kellermann
9d6b5e2ba1
event/TimerEvent: rename IsActive() to IsPending()
2020-12-02 15:41:11 +01:00
Max Kellermann
33ba190bec
event/TimerEvent: add ScheduleEarlier()
2020-12-02 15:30:37 +01:00
Max Kellermann
3783350d25
event/SocketEvent: document Dispatch()
2020-12-02 15:24:23 +01:00
Max Kellermann
173405a343
event/SocketEvent: make Dispatch() private
2020-12-02 15:14:51 +01:00
Max Kellermann
7bc1c9925b
event/SocketEvent: add assert()
2020-12-02 15:12:30 +01:00
Max Kellermann
ce4c69dd95
test/util/TestException: new unit test
2020-12-02 15:09:47 +01:00
Max Kellermann
8eea825462
test/util/TestTemplateString: new unit test
2020-12-02 15:03:51 +01:00
Max Kellermann
49e1ce7c43
test/TestUtil: move to test/util/
2020-12-02 15:02:45 +01:00
Max Kellermann
618f94f589
util/TemplateString: add StringView cast operator
2020-12-02 15:00:49 +01:00
Max Kellermann
ad2c22844c
util/TemplateString: add FromLiteral()
2020-12-02 15:00:39 +01:00
Max Kellermann
b8df851414
io/FileDescriptor: use std::size_t
2020-12-02 14:56:00 +01:00
Max Kellermann
a584141cae
io/Open: add flags parameter to OpenReadOnly()
2020-12-02 14:52:51 +01:00
Max Kellermann
4e88f95f94
event/Loop: move the "again" check out of the mutex scope
2020-12-01 20:29:21 +01:00
Max Kellermann
790e540c19
event/Loop: use ClockCache
2020-12-01 20:25:42 +01:00
Max Kellermann
16074c565f
time/ClockCache: new library
2020-12-01 20:22:26 +01:00
Max Kellermann
2a1dd55b11
event/Loop: include cleanup
2020-12-01 20:19:40 +01:00
Max Kellermann
be20f760ab
event/Loop: disallow copying
2020-12-01 20:18:33 +01:00
Max Kellermann
8050394003
event/Loop: add noexcept
2020-12-01 20:10:53 +01:00
Max Kellermann
ff8b5bc61b
event/Loop: reorder methods
2020-12-01 20:09:25 +01:00
Max Kellermann
ef8797821f
event/Loop: inline field initializers
2020-12-01 20:07:35 +01:00
Max Kellermann
5f2797e7cc
event/Loop: add more assertions to dtor
2020-12-01 20:05:54 +01:00
Max Kellermann
e286702f4c
event/Loop: rename AddDeferred() to AddDefer()
2020-12-01 17:26:39 +01:00
Max Kellermann
c58aaf545f
event/IdleEvent: make a special case of DeferEvent
2020-12-01 17:14:24 +01:00
Max Kellermann
990f2dc1cf
event/DeferEvent: use class IntrusiveList instead of boost::intrusive::list
2020-12-01 17:14:24 +01:00
Max Kellermann
774b4313f2
event/DeferEvent: split the thread-safe version into new class InjectEvent
2020-12-01 17:14:24 +01:00
Max Kellermann
1ecbc2ff0f
event/DeferEvent: explicitly forbid copying
2020-12-01 17:14:24 +01:00
Max Kellermann
fd8e38f8cd
event/DeferEvent: use using instead of typedef
2020-12-01 17:14:24 +01:00
Max Kellermann
e86d4db55c
Merge branch 'v0.22.x'
2020-12-01 17:14:21 +01:00
Max Kellermann
d9583faf06
input/{tidal,qobus}: add missing includes for assert()
2020-12-01 17:14:11 +01:00
Max Kellermann
2788cf9330
input/tidal: add missing include for assert()
2020-12-01 17:13:13 +01:00
Max Kellermann
9420c74101
util/AllocatedArray: add nullptr constructor
2020-11-30 22:30:57 +01:00
Max Kellermann
b1bef9c21d
util/AllocatedArray: add method data()
2020-11-30 22:30:28 +01:00
Max Kellermann
5b0ef7ea98
util/AllocatedArray: add types pointer, const_pointer
2020-11-30 22:30:25 +01:00
Max Kellermann
ab53c414bc
util/StringView: add method SplitLast()
2020-11-30 22:29:38 +01:00
Max Kellermann
d547ace749
io/FileDescriptor: use std::size_t
2020-11-30 22:27:16 +01:00
Max Kellermann
b47e0cffdd
util/TemplateString: rename CharAsString() to FromChar()
2020-11-30 22:23:28 +01:00
Max Kellermann
3af35aee9e
util/TemplateString: add cast operators
2020-11-30 22:22:24 +01:00
Max Kellermann
02314ac7dd
util/TemplateString: rewrite as constexpr functions
...
Hooray C++17!
2020-11-30 22:19:57 +01:00
Max Kellermann
e7c4e87ac4
util/TemplateString: remove unnecessary implementation for static variable
...
This is obsolete since C++17.
2020-11-30 22:13:13 +01:00
Max Kellermann
de58bfbb7f
util/TemplateString: use std::size_t
2020-11-30 22:13:08 +01:00
Max Kellermann
0dda4c06b1
util/TemplateString: no indent after namespace
2020-11-30 22:13:04 +01:00
Max Kellermann
79fd6143ec
lib/dbus/Values: use T::Traits, not T
...
This template was never instantiated, so the problem never occurred.
2020-11-30 22:11:18 +01:00
Max Kellermann
8f89e3f7f4
lib/dbus/Values: use using instead of typedef
2020-11-30 22:11:14 +01:00
Max Kellermann
fc01d11b8d
odbus/Types: use using instead of typedef
2020-11-30 22:08:37 +01:00
Max Kellermann
0c28d8dcbe
time/ISO8601: support YYYY-MM (without day of month)
2020-11-30 21:55:12 +01:00
Max Kellermann
764eaadd25
time/Math: new library
2020-11-30 21:55:05 +01:00
Max Kellermann
273771ffec
net/SocketAddress: add CastTo()
2020-11-30 21:51:07 +01:00
Max Kellermann
32ce9ce919
net/IPv[46]Address: pass SocketAddress by value to Cast()
2020-11-30 21:49:07 +01:00
Max Kellermann
34a070f5a6
net/IPv[46]Address: add Cast(const sockaddr_in&)
2020-11-30 21:49:02 +01:00
Danilo Spinella
92bfdffa42
lib/ffmpeg/Filter: Add define required for avutil
2020-11-30 20:06:21 +01:00
Max Kellermann
ac4975cd7a
util/MimeType: relicense to BSD-2
2020-11-18 15:28:21 +01:00
Max Kellermann
fbbbfb9668
Merge branch 'v0.22.x'
2020-11-16 09:41:20 +01:00
Max Kellermann
38b41fc3fd
filter/ffmpeg: detect the output sample format
...
Some FFmpeg filters change the sample format, and since MPD assumes
this never happens, this results in loud noise instead of music. This
commit finally implements the TODO comment by sending one frame of
silence to the filter and checking the output frame's format.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1009
2020-11-16 09:39:34 +01:00
Max Kellermann
394f69bee1
output/Control: allow copy elision (fix -Wpessimizing-move)
2020-11-15 19:55:11 +01:00
Stapper
ba5531f9dd
Fixes #994 - moveoutput: new AudioOutputControl created from copyMoving an output to a partition is now done via MultipleOutputs::AddCopy(),using a new AudioOutputControl constructor. Tags and always_on settings willpersist when moving outputs between partitions.
2020-11-15 19:47:53 +01:00
Max Kellermann
eb9f5339b6
Merge branch 'v0.22.x' into master
2020-11-11 12:43:50 +01:00
Max Kellermann
60d19b2380
doc/plugins.rst: add missing list-table declaration
2020-11-11 12:28:15 +01:00
Max Kellermann
a9714e73c8
Merge branch 'bind' of git://github.com/neheb/MPD into master
2020-11-10 16:02:34 +01:00
kaliko
004d6a3b66
doc/mpd.1.rst: Update config file documentation.
...
Have similar information about config file in both mpd.1 ans mpd.conf.5
2020-11-10 15:58:34 +01:00
kaliko
3e79e62c17
doc/mpd.conf.5.rst: Update mpd.conf manual
...
Update description with content from user manual [0].
Remove obsolete information regarding "required parameters" and log_level
[0] https://www.musicpd.org/doc/html/user.html#the-configuration-file
2020-11-10 15:58:30 +01:00
kaliko
27b69330f4
doc/mpdconf.example: add database exemples
2020-11-10 15:58:10 +01:00
kaliko
6b50b67339
doc/mpdconf.example: add available log levels
2020-11-10 15:58:03 +01:00
kaliko
51ca775a1c
doc/mpdconf.example: Strip trailing space, fixed typo.
2020-11-10 15:57:54 +01:00
Max Kellermann
1092882f38
decoder/dsdiff: apply padding to odd-sized chunks
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1001
2020-11-10 15:55:33 +01:00
Max Kellermann
8a7986c3bf
doc/plugins.rst: add DSD spec links
2020-11-10 15:53:35 +01:00
Max Kellermann
a99bc91eb0
Merge tag 'v0.22.3' into master
...
release v0.22.3
2020-11-06 16:14:46 +01:00
Max Kellermann
c7bd8c663d
increment version number to 0.22.4
2020-11-06 16:14:23 +01:00
Max Kellermann
f6c65cba58
release v0.22.3
2020-11-06 16:12:54 +01:00
Max Kellermann
f849b07766
storage/curl: fix nullptr dereference
...
Pass a std::string to PathTraitsUTF8::Relative(), implicitly casting
it to std::string_view. This selects the right overload which returns
std::string_view instead of `const char *`; the latter could return
`nullptr` which would cause the implicit conversion of the return
value to std::string_view to crash.
Regression caused by commits ead208987d and a98d627c0b .
Closes https://github.com/MusicPlayerDaemon/MPD/issues/995
2020-11-06 15:35:47 +01:00
Rosen Penev
071d3c71d8
clang-tidy: replace std::bind with lambdas
...
Found with modernize-avoid-bind
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2020-11-05 18:09:30 -08:00
Max Kellermann
afbcac9fb1
util/MimeType: use IterableSplitString() in ParseMimeTypeParameters()
2020-11-04 21:29:42 +01:00
Max Kellermann
51e5b56b3a
playlist/registry: remove duplicate function ExtractMimeTypeMainPart()
...
This is the same as GetMimeTypeBase(), which has already been applied.
2020-11-04 21:20:43 +01:00
Max Kellermann
bb07fd42ce
util/MimeType: migrate GetMimeTypeBase() to std::string_view
2020-11-04 21:20:03 +01:00
Max Kellermann
bab626c325
util/UriExtract: remove the query string at the beginning of uri_get_suffix()
2020-11-04 21:15:41 +01:00
Max Kellermann
2a9131498f
util/UriExtract: pass std::string_view to uri_get_suffix()
2020-11-04 21:13:57 +01:00
Max Kellermann
35a232105e
util/UriExtract: uri_get_suffix() returns std::string_view
...
No need to copy it to a buffer.
2020-11-04 21:08:26 +01:00
Max Kellermann
19dd1a25d7
{decoder,archive,playlist}/plugin: pass std::string_view to SupportsMimeType()
2020-11-04 21:00:49 +01:00
Max Kellermann
53396c0e50
Merge branch 'v0.22.x' into master
2020-11-04 20:37:25 +01:00
Max Kellermann
0b8208fe7f
Merge branch 'clng11' of git://github.com/neheb/MPD into master
2020-11-04 20:34:55 +01:00
Max Kellermann
2da3cff1e8
filter/LoadChain: use the AutoConvertFilter
...
This adds support for input samples other than 16 bit to the FFmpeg
filter plugin.
2020-11-04 20:15:19 +01:00
Max Kellermann
0c965d0573
filter/AutoConvert: move the Filter class to TwoFilters.cxx
2020-11-04 20:15:19 +01:00
Max Kellermann
77c14692c9
filter/AutoConvert: eliminate AutoConvertFilter if possible
...
If no conversion is necessary, return the child Filter as-is. This
allows removing all nullptr checks from AutoConvertFilter.
2020-11-04 20:15:19 +01:00
Max Kellermann
226eb26300
filter/ffmpeg: interleave the output AVFrame
...
If the FFmpeg filter outputs planar data, interleave it, just like the
FFmpeg decoder plugin does.
2020-11-04 20:15:19 +01:00
Max Kellermann
2d606fa989
decoder/ffmpeg: move code to lib/ffmpeg/Interleave.cxx
...
To be reused by the FFmpeg filter plugin.
2020-11-04 20:15:19 +01:00
Max Kellermann
7a0342c8bb
decoder/ffmpeg: use AVFrame fields instead of AVCodecContext fields
2020-11-04 20:06:45 +01:00
Max Kellermann
42c9d765cf
lib/ffmpeg/Buffer: add missing include
2020-11-04 20:06:41 +01:00
Max Kellermann
a8a80ee689
lib/ffmpeg/Buffer: disallow copying
2020-11-04 19:51:21 +01:00
Max Kellermann
f9bdb4b0b8
lib/ffmpeg/Buffer: add noexcept
2020-11-04 19:50:38 +01:00
Max Kellermann
9332527872
lib/ffmpeg/{Buffer,Time}: remove obsolete "#undef SampleFormat"
...
This compatibility macro has been removed from FFmpeg long ago.
2020-11-04 19:50:33 +01:00
Max Kellermann
84f772357e
filter/convert: convert_filter_new() returns std::unique_ptr
2020-11-04 16:47:11 +01:00
Max Kellermann
f2b9785a67
filter/chain: pass std::string_view to filter_chain_append()
2020-11-04 16:37:53 +01:00
Max Kellermann
eeaec99c59
filter/LoadChain: use IterableSplitString()
2020-11-04 16:36:11 +01:00
Max Kellermann
b0002e3b73
filter/chain: copy the child name
...
filter_chain_parse() passes a temporary string pointer which results
in a use-after-free in the PreparedChainFilter::Child::Open() error
message.
2020-11-04 16:34:38 +01:00
Max Kellermann
27c589da97
filter/chain: remove unused field ChainFilter::Child::name
2020-11-04 16:26:50 +01:00
Max Kellermann
6484af472b
increment version number to 0.22.3
2020-11-04 16:14:40 +01:00
Max Kellermann
92a218b7a9
playlist/registry: add option "as_directory"
...
This allows users to disable the "CUE files as directories" feature
without having to disable the CUE playlist plugin completely. This
feature has been annoying some users.
2020-11-04 16:13:12 +01:00
Max Kellermann
d69a1f98af
doc/plugins.rst: more markup
2020-11-04 16:11:26 +01:00
Max Kellermann
23a6f62ea3
doc/user.rst: fix typo
2020-11-04 15:59:40 +01:00
Max Kellermann
e0d3ca71b3
meson.build: switch to C11
...
It's been 9 years already, and there's no point in insisting on the 21
year old C standard. MPD doesn't have a lot of C code left, but why
not compile it with the latest language revision.
2020-11-04 14:38:58 +01:00
Max Kellermann
4f40b9f7cf
meson.build: disable ld.so lazy binding and enable relro
...
Since MPD is a long-running daemon, it doesn't make sense to use
dynamic binding. That allows the relocations to be read-only
("relro"), which a hardening feature.
2020-11-04 13:43:21 +01:00
Max Kellermann
bb009daf66
playlist/registry: simplify ExtractMimeTypeMainPart()
2020-11-04 13:34:04 +01:00
Max Kellermann
3d276d50b4
event/PollBackend: use vector::push_back() instead of resize()
2020-10-30 16:35:20 +01:00
Max Kellermann
b1b731340e
event/PollBackend: add Item constructor
2020-10-30 16:32:45 +01:00
Max Kellermann
b9b02b4ff2
event/PollBackend: use unordered_map::find() instead of operator[]
...
The latter creates a new object, but we know that the key already
exists.
2020-10-30 16:25:41 +01:00
Max Kellermann
ab5d23da11
event/PollBackend: use unordered_map::emplace() in Add()
2020-10-30 16:24:32 +01:00
Max Kellermann
0554fe3652
event/PollBackend: use std::size_t
2020-10-30 16:09:29 +01:00
Max Kellermann
b0282fe36f
event/PollGroupWinSelect: add Item constructor
2020-10-30 16:07:23 +01:00
Max Kellermann
69b45e693b
event/WinSelect: use unordered_map::find() instead of operator[]
...
The latter creates a new object, but we know that the key already
exists.
2020-10-30 16:05:25 +01:00
Max Kellermann
9e97acc28d
event/WinSelect: merge duplicate code into ApplyReady()
2020-10-30 15:55:23 +01:00
Max Kellermann
b1e446a931
event/WinSelect: add missing const to deleted copy ctor/operator
2020-10-30 15:45:29 +01:00
Max Kellermann
938319cd44
event/WinSelect: reorder method prototypes
2020-10-30 15:45:12 +01:00
Max Kellermann
fee29001fa
event/WinSelect: use unordered_map::emplace() in Add()
...
This allow using erase() with iterator, without a key lookup.
2020-10-30 15:32:11 +01:00
Max Kellermann
6d894a1806
event/WinSelect: use SOCKET as std::unordered_map key
2020-10-30 15:25:09 +01:00
Rosen Penev
f1fc5d79ca
clang-tidy: convert to all/any_of
...
Found with readability-use-anyofallof
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2020-10-28 15:51:21 -07:00
Rosen Penev
0fd2c74a66
use structured binding declarations
...
Shorter.
Signed-off-by: Rosen Penev <rosenp@gmail.com >
2020-10-28 15:41:31 -07:00
Max Kellermann
bb99cf37e3
Merge tag 'v0.22.2' into master
...
release v0.22.2
2020-10-28 17:33:10 +01:00
Max Kellermann
7c47fe746c
event/Loop: AbandonFD() unlinks the SocketEvent
...
Fixes use-after-free bugs causing assertion failures at shutdown,
because all "abandoned" SocketEvents are still in the linked list.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/986
Closes https://github.com/MusicPlayerDaemon/MPD/issues/987
2020-10-28 15:01:32 +01:00
Max Kellermann
65a1c4a016
event/Loop: pass SocketEvent& to AbandonFD()
2020-10-28 14:59:28 +01:00
Max Kellermann
46418d0f2d
event/ServerSocket: remove obsolete API documentation
2020-10-28 14:52:31 +01:00
arcnmx
ad585e179f
system/FileDescriptor: fix Duplicate result
...
dup2 returns new_fd on success, not 0
2020-10-20 09:32:43 -07:00
Max Kellermann
8348a1ec8f
event/PollGroup: rename to PollBackend
2020-10-19 14:52:59 +02:00
Max Kellermann
c18e00daa4
event/PollGroup: move event flags to a separate header
...
Reduce header dependencies for SocketEvent.hxx.
2020-10-19 14:48:41 +02:00
Max Kellermann
418ba96334
event/SocketEvent: forbid copying
2020-10-18 20:07:49 +02:00
Max Kellermann
a60e782959
event/Loop: reorder assertions
2020-10-18 20:05:22 +02:00
Max Kellermann
8bab5733d7
event/Loop: add assertions
2020-10-18 20:04:16 +02:00
Max Kellermann
e3270dfd68
event/SocketEvent: use class IntrusiveList<>
2020-10-18 20:02:47 +02:00
Max Kellermann
a14997ffb8
event/Loop: manage all SocketEvents in a linked list
...
Not only those which are "ready".
2020-10-18 20:01:38 +02:00
Max Kellermann
dd94f97572
event/Loop: un-inline AddFD(), ModifyFD()
...
Prepare for adding more code here.
2020-10-18 19:58:42 +02:00
Max Kellermann
7d502fb448
event/Loop: round epoll_wait() timeout up
...
This implements proper rounding, amending commit dcbb9fe07c
2020-10-18 19:58:42 +02:00
Max Kellermann
3ac87bbcda
io/uring/Queue: use IntrusiveList<>
2020-10-18 19:37:54 +02:00
Max Kellermann
f64799622d
event/IdleEvent: use class IntrusiveList<>
2020-10-18 19:28:12 +02:00
Max Kellermann
6f0ad2b6c5
util/IntrusiveList: replacement for boost::intrusive::list
2020-10-18 19:23:34 +02:00
Max Kellermann
b5750afb24
event/IdleEvent: use auto
2020-10-18 19:23:34 +02:00
Max Kellermann
442dd5e955
event/IdleEvent: forbid copying
2020-10-18 19:23:25 +02:00
Max Kellermann
172c2ae1aa
Merge tag 'v0.22.1' into master
...
release v0.22.1
2020-10-17 13:58:36 +02:00
Max Kellermann
4f0e0af319
Merge branch 'v0.22.x' into master
2020-10-16 19:02:03 +02:00
Max Kellermann
cb382b1e7d
event/PollGroupWinSelect: add missing return value
...
Fixes regression from commit 1473d8474f
2020-10-16 19:02:00 +02:00
Max Kellermann
871bf3b88f
command: add command "getvol"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/979
2020-10-16 17:51:51 +02:00
Max Kellermann
08360e401d
meson.build: increment protocol version to 0.23
2020-10-16 17:46:47 +02:00
Max Kellermann
b611b1824a
event/Loop: move code to Wait()
2020-10-15 20:21:00 +02:00
Max Kellermann
1473d8474f
event/PollGroup: ReadEvents() returns PollResult
2020-10-15 20:15:09 +02:00
Max Kellermann
0ecc3394c3
Merge branch 'v0.22.x' into master
2020-10-15 20:14:36 +02:00
Max Kellermann
725985379a
event/SocketEvent: add ScheduleImplicit(), Is{Read,Write}Pending()
2020-10-15 17:01:30 +02:00
Max Kellermann
8849b9b62c
event/SocketEvent: move Abandon() up
2020-10-15 16:59:45 +02:00
Max Kellermann
caa2611ad5
event/SocketEvent: add Abandon()
2020-10-15 16:57:55 +02:00
Max Kellermann
f8ff597963
event/SocketEvent: document Close()
2020-10-15 16:55:31 +02:00
Max Kellermann
ff6e434caf
event/SocketEvent: rename Steal() to ReleaseSocket()
2020-10-15 16:54:33 +02:00
Max Kellermann
95bb12880d
net/UniqueSocketDescriptor: add noexcept
2020-10-15 16:46:29 +02:00
Max Kellermann
257196664a
net/SocketAddress: add missing include
2020-10-15 16:45:50 +02:00
Max Kellermann
643bf95366
util/OffsetPointer: use std::ptrdiff_t
2020-10-15 16:41:39 +02:00
Max Kellermann
36a187da39
util/Cast: include cleanup
2020-10-15 16:40:26 +02:00
Max Kellermann
fec80f2835
util/Cast: use std::ptrdiff_t
2020-10-15 16:40:18 +02:00
Max Kellermann
4e47653cf6
lib/curl/Global: ignore curl_multi_socket_action() errors
...
Keep the logging library out of this low-level libcurl wrapper.
2020-10-15 16:31:31 +02:00
Max Kellermann
c13004f985
lib/curl/Multi: add Add(), Remove(), ...
2020-10-15 16:25:57 +02:00
Max Kellermann
baba41e304
lib/curl/Global: adjust parameter name
2020-10-15 16:16:02 +02:00
Max Kellermann
d87e09a8b4
lib/dbus/ReadIter: remove obsolete GCC warning workaround
...
We need at least GCC 8 anyway.
2020-10-15 16:08:29 +02:00
Max Kellermann
33146ac353
lib/dbus/Watch: adjust parameter name
2020-10-15 16:06:19 +02:00
Max Kellermann
bb20af8f20
util/StringStrip: use std::strlen()
2020-10-15 12:54:47 +02:00
Max Kellermann
9355ec44e0
util/StringStrip: use std::size_t
2020-10-15 12:53:02 +02:00
Max Kellermann
c63bd323ce
util/StringCompare: use std::memcmp()
2020-10-15 12:48:33 +02:00
Max Kellermann
55db7105c5
event/SocketEvent: check/clear scheduled_flags in Close()
...
Fixes regression by commit 521e573be9
2020-10-14 21:08:39 +02:00
Max Kellermann
1c079e554b
io/UniqueFileDescriptor: add method Release()
2020-10-14 20:50:02 +02:00
Max Kellermann
48afb68f3a
event/SocketEvent: remove assert() from GetScheduledFlags()
...
Fixes regression by commit 7901b04c78
2020-10-14 20:50:02 +02:00
Max Kellermann
21f409d5e2
event/SocketEvent: fix grammar
2020-10-14 16:30:38 +02:00
Max Kellermann
521e573be9
event/SocketEvent: use EventLoop::AbandonFD() in Close()
2020-10-14 16:29:49 +02:00
Max Kellermann
abf9ae2dd9
event/Loop: rename Abandon() to AbandonFD()
2020-10-14 16:26:06 +02:00
Max Kellermann
9f013f7de4
event/SocketEvent: allow Close() without socket
2020-10-14 16:26:01 +02:00
Max Kellermann
7fc04fd5cd
event/SocketEvent: move Dispatch() down
2020-10-14 16:21:41 +02:00
Max Kellermann
7901b04c78
event/SocketEvent: allow Cancel() without socket
2020-10-14 16:20:43 +02:00
Max Kellermann
653eea5840
event/SocketEvent: remove unnecessary initializer
2020-10-14 16:18:39 +02:00
Max Kellermann
5a4055fb08
event/SocketMonitor: refactor to SocketEvent
...
Similar to commits 1686f4e857 and
30a5dd267b
2020-10-14 15:54:12 +02:00
Max Kellermann
4d68a12f03
event/Loop: split the AtScopeExit()
...
Fixes the !HAVE_THREADED_EVENT_LOOP build.
2020-10-14 14:47:59 +02:00
Max Kellermann
0e951da64b
event/Loop: add missing #ifdef
2020-10-14 14:37:29 +02:00
Max Kellermann
38dab040b3
event/Loop: add compile-time option to disable multithreading
...
Not for MPD, but for other applications which might want to copy its
event loop, but do not need multi-threading.
2020-10-14 14:08:38 +02:00
Max Kellermann
e9f6af61f9
event/Loop: forward-declare class {Idle,Defer}Event
2020-10-14 14:05:17 +02:00
Max Kellermann
b06c4e2711
event/{Idle,Defer}Event: use base_hook instead of member_hook
...
Allows forward declaration.
2020-10-14 14:04:30 +02:00
Max Kellermann
1686f4e857
event/IdleMonitor: refactor to IdleEvent
...
Instead of using this as a base class implementing a virtual method,
the new class IdleEvent can be used as a variable, decoupling
IdleMonitor's internal state from the derived class.
This is similar to commit 30a5dd267b
which refactored TimeoutMonitor to TimerEvent.
2020-10-14 13:47:25 +02:00
Max Kellermann
9f57732af2
meson.build: increment version to 0.23~git
...
The new stable branch v0.22.x was forked off and is feature-frozen, so
the "master" branch will become the next major version eventually.
2020-10-14 12:13:12 +02:00
Max Kellermann
329382c1da
event/SignalMonitor: add noexcept
2020-10-13 17:26:33 +02:00
Max Kellermann
fadc03df21
meson.build: move macros to event/Features.h
2020-10-13 16:15:52 +02:00
Max Kellermann
54ee0e28ab
event/PollGroup: check _WIN32 instead of USE_WINSELECT
2020-10-13 15:27:58 +02:00
Max Kellermann
92fc53ebef
event/PollGroupWinSelect: use range-based for
2020-10-12 12:44:23 +02:00
Max Kellermann
7e7a1613cf
event/PollGroupWinSelect: use std::copy_n()
2020-10-12 12:40:32 +02:00
Max Kellermann
f73c4643ef
event/PollGroupWinSelect: move IsEmpty() check to GetPtr()
2020-10-12 12:39:10 +02:00
Max Kellermann
8b94e8f260
event/PollGroupWinSelect: use SOCKET instead of int
2020-10-12 12:13:46 +02:00
Max Kellermann
41bc17a27f
event/SocketMonitor: add ready_flags
...
By making each SocketMonitor keep track of its ready flags, this
removes a lot of overhead from EventLoop::RemoveFD().
2020-10-09 17:28:11 +02:00