Commit Graph

885 Commits

Author SHA1 Message Date
Max Kellermann 10e5b0759c lib/dbus/Glue: relicense to BSD-2 2020-12-14 13:02:37 +01:00
Max Kellermann 9d6b5e2ba1 event/TimerEvent: rename IsActive() to IsPending() 2020-12-02 15:41:11 +01:00
Max Kellermann e86d4db55c Merge branch 'v0.22.x' 2020-12-01 17:14:21 +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 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
Danilo Spinella 92bfdffa42 lib/ffmpeg/Filter: Add define required for avutil 2020-11-30 20:06: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
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 53396c0e50 Merge branch 'v0.22.x' into master 2020-11-04 20:37:25 +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 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
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 7b9295ff99 lib/yajl/Handle: strip newlines from error messages
Closes https://github.com/MusicPlayerDaemon/MPD/issues/981
2020-10-28 16:06:52 +01:00
Max Kellermann 5f61d440eb lib/yajl/Handle: un-inline the throwing code
Reduces header dependencies.
2020-10-28 16:02:14 +01: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 6a65b4c305 lib/nfs/patches: disable the snprintf->sprintf_s alias
snprintf() is available on mingw, and the libnfs kludge broke the
build with mingw, because sprintf_s() was now both an inline function
and a "dllimport" function (because the macro renamed the inline
function snprintf() to sprintf_s() in mingw's stdio.h).
2020-10-17 13:56:02 +02:00
Max Kellermann 0ecc3394c3 Merge branch 'v0.22.x' into master 2020-10-15 20:14:36 +02:00
Max Kellermann ff6e434caf event/SocketEvent: rename Steal() to ReleaseSocket() 2020-10-15 16:54:33 +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 1406144210 lib/dbus/Watch: add missing include for assert() 2020-10-15 16:05:05 +02:00
Max Kellermann 7901b04c78 event/SocketEvent: allow Cancel() without socket 2020-10-14 16:20:43 +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 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 eeb96eb367 event/TimerEvent: add type alias for std::chrono::steady_clock::duration 2020-10-08 20:48:50 +02:00
Max Kellermann 75802ebcc6 StateFileConfig, ...: drop obsolete out-of-class definition 2020-10-08 20:38:11 +02:00
Rosen Penev 821d08999a remove GCC5 hacks
GCC5 cannot build mpd.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-09-16 18:10:27 -07:00
Max Kellermann 67c7116f05 Merge branch 'v0.21.x' into master 2020-09-04 18:35:21 +02:00
Max Kellermann bdfe6c2c45 lib/dbus/Values: use using instead of typedef 2020-07-23 16:26:18 +02:00
Max Kellermann 5e1a2e2a93 lib/dbus/Values: add uint32_t and uint64_t support 2020-07-23 16:26:18 +02:00
Max Kellermann 7376f31c97 lib/dbus/Message: add noexcept 2020-07-23 16:26:18 +02:00
Max Kellermann 155fc8fa5a include cleanup 2020-07-23 16:26:18 +02:00
Rosen Penev c876d6a51c lib/icu: fix build without libc iconv support
Need to check for it in iconv.h. Otherwise meson prefixes a __builtin variant in the check.
2020-07-23 14:09:43 +02:00
Max Kellermann fbfa1723e7 lib/smbclient/Mutex: remove obsolete library 2020-07-20 22:40:27 +02:00
Max Kellermann bb3f487ee5 lib/smbclient/Context: add global Mutex for smbc_{new,free}_context()
Preparing to replace `smbclient_mutex`, for finer-grained locking.
2020-07-20 22:32:00 +02:00
Max Kellermann 7d97d0ae87 lib/smbclient/Init: move code to SmbclientContext::New()
We no longer need to call smbc_init() because we don't need the compat
layer anymore.
2020-07-20 22:23:18 +02:00
Max Kellermann f6dc9bcad6 */smbclient: use the new API with SMBCCTX parameter
As a side effect, the input plugin closes the SMB/CIFS connection
after closing the file.

This solves one part of
https://github.com/MusicPlayerDaemon/MPD/issues/916
2020-07-20 22:05:05 +02:00
Max Kellermann 697531a948 lib/smbclient/Context: new wrapper for SMBCCTX 2020-07-20 22:01:10 +02:00