Commit Graph

15761 Commits

Author SHA1 Message Date
Max Kellermann
9adda30c38 NEWS: move two lines below Windows/Android 2020-05-27 14:33:43 +02:00
Shen-Ta Hsieh
c5f80dc543
Add .clang-format 2020-05-27 18:58:55 +08:00
Max Kellermann
d2d4a0251e .gitignore: add emacs lsp-mode files 2020-05-26 21:07:56 +02:00
Max Kellermann
f7b6431b6f meson.build: work around Meson bug detecting strndup() on Windows
Work around Meson bug https://github.com/mesonbuild/meson/issues/3672
2020-05-26 20:50:56 +02:00
Max Kellermann
03b9bd3a9e python/build/libs.py: update FFmpeg to 4.2.3 2020-05-26 18:54:56 +02:00
Max Kellermann
6cc58ccb9b lib/icu/Converter: add missing <string_view> include 2020-05-26 17:48:01 +02:00
Max Kellermann
210c270624 test/test_pcm_export: eliminate zero-length arrays
C++ doesn't allow that.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/875
2020-05-26 16:50:40 +02:00
Max Kellermann
be94b4373a util/OffsetPointer: add noexcept 2020-05-14 15:44:23 +02:00
Max Kellermann
eeec0ee804 dsd/Dsd2Pcm: convert struct GenerateCtableValue to lambda
Since we have dropped support for GCC 6 a while ago, we can use
constexpr lambdas now.
2020-05-07 15:04:51 +02:00
Max Kellermann
a24ef280cc meson.build: require GCC 8 or clang 5
Commit 60f957ed64 broken the GCC 7 build, but instead of working
around missing C++17 features in old compilers, let's update the
compiler version requirements.

This commit raises the clang requirement to version 5 because this is
the first version to support `constexpr` lambdas, to be used to
`Dsd2Pcm.cxx`.
2020-05-07 15:04:50 +02:00
Max Kellermann
d1d6a3871e Merge branch 'v0.21.x' 2020-05-07 15:04:41 +02:00
Max Kellermann
61aed60f6d python/build/libs.py: update CURL to 7.70.0 2020-05-07 14:18:55 +02:00
Max Kellermann
2cc323c9fe python/build/libs.py: update Boost to 1.73.0 2020-05-07 14:18:21 +02:00
Max Kellermann
f24ab120ee android/build.py: use -fpic instead of -fPIC on ARM/Aarch64
Sync with the Android NDK build scripts.
2020-05-07 13:58:36 +02:00
Max Kellermann
68349bc55c android/build.py: use -mfpu=vfpv3-d16 on ARMv7
This flag is used by the Android NDK build scripts as well, and this
fixes a build failure (assembler error) with FFmpeg and NDK r21.
2020-05-07 13:50:33 +02:00
Max Kellermann
60f957ed64 util/MimeType: use string_view::substr()
Fixes regression from commit db93bb996c because
ParseMimeTypeParameters() assumed the items were null-terminated, but
after that commit, they were not anymore.
2020-05-06 20:33:13 +02:00
Max Kellermann
864d26cd1b Merge branch 'bind' of git://github.com/neheb/MPD 2020-05-06 06:14:55 +02:00
Max Kellermann
ba576ffa37 Merge branch 'v0.21.x' 2020-05-05 19:00:53 +02:00
Max Kellermann
209364adf2 db/simple: fix crash when mounting twice
The `db->close()` call was a `nullptr` dereference because the `db`
variable had already been moved.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/839
2020-05-05 18:57:29 +02:00
Max Kellermann
dae8da7066 input/uring: new input plugin using io_uring
This is the final piece of the series to establish io_uring support on
Linux.

MPD doesn't need io_uring for its efficient bulk I/O support, but to
allow file I/O to be cancelled.  This is a big problem on CIFS/NFS
mounts where processes sleep uninterruptable if the file server
disappears, deadlocking MPD.

With io_uring, a flaky NFS connection allows MPD to continue to work
(even though there are still deadlocks inside MPD which need to be
addressed).

This plugin does not yet use cancellable `open()` using
`IORING_OP_OPENAT`.  This will be implemented later.

Lots of other optimization opportunities for io_uring are still
missing as well - for example the database update could benefit a lot,
but unfortunately, io_uring doesn't have `readdir()` support just yet.
2020-05-05 17:41:03 +02:00
Max Kellermann
cdf8ac001c event/Loop: integrate io_uring support 2020-05-05 17:13:14 +02:00
Max Kellermann
62d0ceabcc io/uring: basic Linux io_uring support 2020-05-05 17:10:17 +02:00
Max Kellermann
935e622915 event/Loop: allow calling AddFD()... before starting the EventThread
Relax the assertions.  This is necessary if BlockingCall() is used
before the thread is started.
2020-05-05 17:10:17 +02:00
Max Kellermann
1efbbfcd6f GitVersion: make GIT_VERSION const 2020-05-05 15:12:40 +02:00
Max Kellermann
e0edf0b206 meson.build: move VERSION and others to Version.h 2020-05-05 15:12:11 +02:00
Max Kellermann
4e9fa36176 meson.build: remove unused macro PACKAGE_VERSION 2020-05-05 15:08:39 +02:00
Max Kellermann
8f178401e4 */plugins/meson.build: define feature macros in Features.h
This makes ccache more efficient when recompiling with different
plugins.
2020-05-05 15:06:50 +02:00
Max Kellermann
8c1d78873d system/KernelVersion: new library 2020-05-05 14:30:56 +02:00
Max Kellermann
9815d10137 system/FileDescriptor: move to io/ 2020-05-05 14:27:03 +02:00
Max Kellermann
97f7270aa8 fs/FileSystem: remove unused function FOpen() 2020-05-05 14:19:29 +02:00
Max Kellermann
1787aa5e00 decoder/sidplay: drop support for libsidplayfp < 1.8 2020-05-05 13:53:10 +02:00
Rosen Penev
e6a77e1297
remove std::bind usage as much as possible
Reduces unstripped size. stripped size is the same.

Also took the time to remove using std::placeholders.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-04 15:40:28 -07:00
skidoo23
e251fd0053 Add info about new song length format 2020-04-30 13:35:29 +02:00
Max Kellermann
24afdee35c command/all: "tagtypes" requires no permissions
The command is used to configure the client's connection, and this
shouldn't require any permissions.  The client should be able to do
that before sending a password.
2020-04-30 13:08:09 +02:00
Max Kellermann
7aea285361 Revert "Fix unsafe float comparison."
This reverts commit a5273d6992.  It was
wrong and broke the MixRamp unit test.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/844
2020-04-30 06:57:36 +02:00
Rosen Penev
47a7707df1 Math.hxx: fix wrong macro name
_GLIBCXX_USE_C99_MATH_TR1 is the correct one.

_GLIBCXX_USE_C99_MATH is always defined.
2020-04-29 23:20:04 +02:00
Max Kellermann
6fdae1139f increment version number to 0.21.24 2020-04-29 23:20:04 +02:00
skidoo23
a485c4856c decoder/sidplay: support new song length format with libsidplayfp 2.0 2020-04-29 16:27:54 +02:00
Sören Tempel
3c955639a7 doc: Document required order of currentsong response
The parser implemented in libmpdclient requires the first key-value pair
of the server response to be the file pair. This is due to the fact that
libmpdclient scan pairs sequentially and first attempts to extract the
file pair before parsing the currentsong response further. See:

	5c751a761e/src/song.c (L559-L563)

Meta data encoded as pairs in the currentsong response will be ignored
if they are placed before the file pair in the response.
2020-04-27 17:47:24 +02:00
Max Kellermann
bca9678683 tag/FixString: use IsNonPrintableASCII()
Fixes breakage of non-ASCII characters, regression from commit
cc72ceb368

Fixes https://github.com/MusicPlayerDaemon/MPD/issues/842
2020-04-27 14:01:54 +02:00
Max Kellermann
814b2a218d util/CharUtil: add IsNonPrintableASCII()
Prepare to fix cc72ceb368
2020-04-27 14:01:54 +02:00
John Regan
6423670eae gme: use song-reported fade-out time when available 2020-04-26 09:24:34 -04:00
John Regan
90a2109fd1 gme: add configurable fade-out time
Also include fade-out time in song length.
2020-04-26 09:21:57 -04:00
Max Kellermann
464b90210c tag/GenParseName: include stdlib.h for EXIT_SUCCESS
Closes https://github.com/MusicPlayerDaemon/MPD/issues/838
2020-04-24 20:39:24 +02:00
Max Kellermann
fa45a8adfa tag/ParseName: generate an optimized tag_name_parse() at build time 2020-04-24 16:28:29 +02:00
Max Kellermann
1532983fb5 tag/Pool: use strncmp() without strlen() to compare strings 2020-04-24 16:16:19 +02:00
Max Kellermann
ae5b2643da tag/Builder: reserve room in std::vector in default constructor
This reduces resource waste for resizing the std::vector in most
cases.
2020-04-24 16:16:19 +02:00
Max Kellermann
02556ffce9 tag/Tag: use class DereferenceIterator 2020-04-24 16:02:36 +02:00
Max Kellermann
18ca734819 util/DereferenceIterator: new utility class 2020-04-24 16:02:31 +02:00
Max Kellermann
8a28f7b0a1 tag/FixString: add optimistic quick check
Optimizes a few nanoseconds from the common code path.
2020-04-24 15:57:40 +02:00