Commit Graph

12133 Commits

Author SHA1 Message Date
Max Kellermann
7d599c1afc Main: add Config constructor 2019-05-29 22:22:05 +02:00
Max Kellermann
7c565bce1d Main: move two more functions down 2019-05-29 22:20:02 +02:00
Max Kellermann
d17ff18ec0 Main: move main() to the bottom 2019-05-29 22:18:06 +02:00
Max Kellermann
efc6b1b77a Main: fold mpd_main_after_fork() into MainConfigured() 2019-05-29 22:16:32 +02:00
Max Kellermann
fdbec694c6 config/Param: add method With() 2019-05-29 21:50:04 +02:00
Max Kellermann
b86d8d0cd8 config/Param: add method ThrowWithNested() 2019-05-29 21:46:27 +02:00
Max Kellermann
0b4e7b3317 client/List: use using instead of typedef 2019-05-29 21:36:27 +02:00
Max Kellermann
472e4bfd41 client/List: fold CloseAll() into destructor 2019-05-29 21:33:22 +02:00
Max Kellermann
d3d70a7eed client/List: use auto 2019-05-29 21:31:43 +02:00
Max Kellermann
39046bed85 Instance: wrap ClientList in std::unique_ptr<> 2019-05-29 21:29:55 +02:00
Max Kellermann
71a5c8b819 Main: allocate Instance on the stack 2019-05-29 21:22:25 +02:00
Max Kellermann
620a39afb4 thread/Slack: use std::chrono::duration 2019-05-29 21:11:32 +02:00
Max Kellermann
14cee01ba1 Main: simplify Android startup 2019-05-29 15:08:39 +02:00
Max Kellermann
c782fdb698 Main: use AtScopeExit() to free Android objects 2019-05-29 15:08:38 +02:00
Max Kellermann
49ba76167e Main: add overload with ConfigData parameter 2019-05-29 15:08:26 +02:00
Max Kellermann
93ab957800 Main: convert int return types to void 2019-05-29 14:52:58 +02:00
Max Kellermann
155c915733 input/buffering: make "mutex" public 2019-05-29 13:44:05 +02:00
Max Kellermann
971450f0d4 input/InputStream: make IsEOF() and IsAvailable() const 2019-05-29 13:31:54 +02:00
Max Kellermann
40a48cfba0 PluginUnavailable: add subclass PluginUnconfigured
PluginUnconfigured exceptions are logged with level "info" instead of
"error".  This suppresses some rather boring messages in the default
log level.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/565
2019-05-23 14:25:14 +02:00
Max Kellermann
9d1906da8a {event,output}/Thread: downgrade realtime scheduling errors to "info"
These messages can be confusing, but they are not critical.
2019-05-23 14:24:27 +02:00
Max Kellermann
3d2b180cf8 LogBackend: set default log level to "default"
This is the documented value, but for unknown reasons, "info" was
really the default.

This was never noticed because there are only very few "info" level
messages.
2019-05-23 14:14:58 +02:00
Max Kellermann
f987947730 Log: add Log() and LogFormat() overloads with std::exception_ptr
Make LogError()/FormatError() wrappers for those.  Now we can log
exceptions with a lower level.
2019-05-23 12:23:28 +02:00
Max Kellermann
e0d5d88104 Log: make LogLevel the first parameter
Prepare for templated functions.
2019-05-23 12:17:59 +02:00
Max Kellermann
585a745484 Log: use GetFullMessage() to print exceptions
Print all nested exceptions on a single line to avoid confusion.
2019-05-22 18:24:45 +02:00
Max Kellermann
43fe513de8 input/buffering: add API documentation 2019-05-22 12:09:20 +02:00
Max Kellermann
c1b853ca7c input/InputStream: define UNKNOWN_SIZE without undefined behavior 2019-05-22 12:01:46 +02:00
Max Kellermann
4b78038b41 input/InputStream: update API documentation 2019-05-22 12:00:16 +02:00
Max Kellermann
d651d1abfd util/SparseBuffer: move #endif to the bottom 2019-05-22 10:43:07 +02:00
Max Kellermann
5a8b734cfd tag/Id3Load: include cleanup 2019-05-22 10:23:39 +02:00
Max Kellermann
31b59a0db6 tag/Generic: allow ScanGenericTags() to throw
Propagate the error to the caller instead of logging it.
2019-05-22 10:19:28 +02:00
Max Kellermann
92f7421715 TagFile: allow ScanFileTags*() to throw 2019-05-22 10:19:27 +02:00
Max Kellermann
6f1d5105ee TagStream: allow tag_stream_scan() to throw 2019-05-22 10:19:26 +02:00
Max Kellermann
9a78371b5c DetachedSong: allow LoadFile(), Update() to throw 2019-05-22 10:19:25 +02:00
Max Kellermann
3fc4da382e db/simple/Song: allow LoadFile(), UpdateFile() to throw
Preparing to move logger calls out of lower-level libaries, and
propagating error details to the caller instead.
2019-05-22 10:19:24 +02:00
Max Kellermann
6ee7d88af0 db/update/Archive: fix inverted nullptr check
Regression by commit bbdf2dcf1e
2019-05-22 10:18:18 +02:00
Max Kellermann
bbdf2dcf1e db/simple/Song: wrap in std::unique_ptr<> 2019-05-21 22:46:34 +02:00
Max Kellermann
02bb47dd08 db/simple/Song: move struct Disposer to separate header
Allow forward-declaring it.
2019-05-21 22:42:32 +02:00
Max Kellermann
0c48b8d084 db/simple/Song: add noexcept 2019-05-21 22:41:21 +02:00
Max Kellermann
8462559b2f db/simple/Song: include cleanup 2019-05-21 22:40:08 +02:00
Max Kellermann
319c9699fb tag/Type: add TAG_GROUPING
Map ID3 "TIT1" to this new core tag type.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/563
2019-05-21 22:23:06 +02:00
Max Kellermann
06a0a4a838 time/Convert: include sys/time.h for struct timeval
Closes https://github.com/MusicPlayerDaemon/MPD/issues/562
2019-05-21 10:13:16 +02:00
Max Kellermann
8942be858b release v0.21.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlziw4IQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEqrmD/4ipjXE5PkGD7unTIvnmv0X1FRnaOO1rwyY
 SkqWl2D8DsgFh1d0IkNxzofNQ5mv3YpZY2ycD4kHbM+RWkV+fVuGnhePSCSd0w2s
 Lj5r8yYq43UfIwn4fVwFeqjsEhtT47gHLATJ4/Zc4q+VfzVhPqp1esxrf+vHX6nH
 SCMp9WP5L8FBcf28IqW3hBc/cOTtp36FsuzRkyFMrM/tq6a6VF8mqBKO9Qpnz6OU
 egq3d+tqpg1Qq90QXZx7LfXArK0v89Wezv3M/EhzamBc2DClFQnaL3BTOD0hawdt
 WRfm8WzdXS73QrmJvcOFtcath6jdrKIvBwMKIdmDikp2ofF0m1COh9UcHReA0MK9
 UbRZWmeTzeu+UKNugD//Ma+oNwntv5W/xSSvEsgvLTiyd8XcdlKXcsrwbYVD7o3L
 uTKq8V2h5iDC5cure5FvWnpaugaI38fJ+DDGArSe/BhScQhioXAPFa3hSGLux3e8
 gaKWu6/6biCi8yMra8z4dL2zyUNLEw4J2e9RPweLeQL/gi0A1alSLtcQ6VWGGFFW
 5GtQALTuISH5/9TWnr1LGiI6cgNHCQ2JOeL99pChu+PdoSiuA+KwQojZ4UEUVAGL
 GTbupl3yUFJ9jv/rLZOjOIycJ9cYifM+Th98iTfK4aMQujzAkJj132Qqzci+rUXp
 6R9hfalT2A==
 =aixT
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.9'

release v0.21.9
2019-05-20 17:23:01 +02:00
Max Kellermann
923e66738c player/Thread: fix "single" mode race condition
If the decoder finishes decoding the current song between the two
IsIdle() checks, MPD stops playback instead of starting the decoder
for the next song.

This is usually not visible problem, because the main thread restarts
it via playlist::ResumePlayback(), but that way it, ignores "single"
mode.

As a workaround, this commit adds another "queued" check which
re-enters the player loop and checks again whether to start the
decoder.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/556
2019-05-20 16:22:01 +02:00
Max Kellermann
ff3e2c0514 player/Thread: remove unnecessary "pipe" check
The "queued" flag can only possibly be set if the decoder is still
decoding the current song or if the decoder is stopped.  This is also
what the following assert() checks.  This check was not necessary.
2019-05-20 16:20:59 +02:00
Max Kellermann
6922a2f55e input/buffered: check error in IsAvailable() 2019-05-17 12:43:45 +02:00
Max Kellermann
219546cb81 input/buffering: check error in IsAvailable() 2019-05-17 12:43:06 +02:00
Max Kellermann
555a4d738c input/buffering: pass offset to Read() and eliminate Seek()
Another step towards supporting multiple readers.
2019-05-17 12:02:55 +02:00
Max Kellermann
813567bf5c input/buffering: use notify_one() to wake up thread
There is just one thread.
2019-05-17 11:57:23 +02:00
Max Kellermann
16a07bc201 input/buffering: remove obsolete thread wakeup
The thread will always attempt to read more data since commit
2cf6b77627, so we don't need to tell it
to continue.
2019-05-17 11:56:30 +02:00
Max Kellermann
1153715608 input/buffering: rename "read_error" to "error"
The "seek_error" attribute will be eliminated soon.
2019-05-17 11:29:19 +02:00
Max Kellermann
b5c7c16fb4 input/buffering: merge multiple exception handlers into RunThread() 2019-05-17 11:23:54 +02:00
Max Kellermann
302c0515b7 input/buffering: move code to RunThreadLocked() 2019-05-17 11:21:56 +02:00
Max Kellermann
19e4672a54 input/buffering: use notify_all() instead of notify_one()
More preparations to support multiple readers.
2019-05-17 11:17:16 +02:00
Max Kellermann
c2dd6808e1 input/buffering: make read errors fatal, no recovery
If a read error occurs, it is very unlikely that the InputStream will
ever recover.  Removing the code removes some code complexity which
just isn't worth it.  And it allows supporting multiple readers for
one buffer.
2019-05-17 10:55:58 +02:00
Max Kellermann
2cf6b77627 input/buffering: eliminate "idle" flag, automatically seek to next hole 2019-05-16 22:42:29 +02:00
Max Kellermann
a5c09f4ddb input/buffering: destruct our input while mutex is unlocked 2019-05-16 22:38:37 +02:00
Max Kellermann
1acb9bcedb input/buffering: close input if buffered completely 2019-05-16 22:34:11 +02:00
Max Kellermann
0626e3d21e input/buffering: at end of input, seek to first hole 2019-05-16 22:29:10 +02:00
Max Kellermann
869d215058 input/buffering: merge "read_error" and "idle" checks in thread 2019-05-16 22:25:21 +02:00
Max Kellermann
0cf922b2da input/buffering: clear read_error after successful seek
After seeking, a new read should be done.
2019-05-16 22:24:57 +02:00
Max Kellermann
5e266cd8e4 Merge branch 'v0.21.x' 2019-05-16 22:12:48 +02:00
Max Kellermann
ca5a400dbe input/buffered: rethrow read_error in Check() 2019-05-16 22:08:33 +02:00
Max Kellermann
63fe4d1d17 input/buffered: wake up client thread on seek error 2019-05-16 22:05:25 +02:00
Max Kellermann
a199f58db5 input/buffering: update thread name 2019-05-16 22:02:51 +02:00
Max Kellermann
5277297336 input/buffered: move basic buffering code to class BufferingInputStream
Prepare to reuse it in another class.
2019-05-16 21:41:28 +02:00
Max Kellermann
604d08b2c6 Merge branch 'v0.21.x' 2019-05-16 21:26:45 +02:00
Max Kellermann
ca06d9d3bf input/buffered: fix deadlock bug 2019-05-16 21:11:03 +02:00
Max Kellermann
a48604d2e3 util/SparseBuffer: remove bogus noexcept from constructor
The HugeArray constructor can throw std::bad_alloc, and so can
SparseBuffer's constructor.
2019-05-08 22:34:33 +02:00
Max Kellermann
98e6a861ca util/HugeAllocator: import std::swap() 2019-05-08 22:33:41 +02:00
Max Kellermann
2c6dd04d19 util/HugeAllocator: add noexcept 2019-05-08 22:32:50 +02:00
Max Kellermann
82ca3aa281 time/ISO8601: forward-declare StringBuffer 2019-05-08 16:24:31 +02:00
Max Kellermann
b45f5c7bf6 time/Convert: update copyright 2019-05-08 16:23:58 +02:00
Max Kellermann
f54877d128 time/Convert: mention exceptions 2019-05-08 16:14:12 +02:00
Max Kellermann
af3ea97a42 zeroconf/AvahiPoll: move TimevalToChrono() to time/Convert.cxx 2019-05-08 16:11:14 +02:00
Max Kellermann
8beac03dc4 time/Convert: add noexcept 2019-05-08 16:09:27 +02:00
Max Kellermann
4a49a5587d time/Convert: add pure attributes 2019-05-08 16:08:54 +02:00
Max Kellermann
d0cfa44c8f time/FileTime: use ToUint64() in DeltaFileTimeS() 2019-05-08 16:06:19 +02:00
Max Kellermann
5bae6946c6 time/FileTime: add ToUint64(FILETIME) 2019-05-08 16:05:37 +02:00
Max Kellermann
a8fc805594 time/FileTime: drop static 2019-05-08 16:05:21 +02:00
Max Kellermann
a265738528 time/FileTime: add noexcept 2019-05-08 16:04:07 +02:00
Max Kellermann
5641c4baa6 system/Clock, fs/FileInfo: move FILETIME specific code to time/FileTime.hxx 2019-05-08 16:02:13 +02:00
Max Kellermann
96f889276f system/Clock: GetProcessUptimeS() returns std::chrono::duration 2019-05-08 15:58:01 +02:00
Max Kellermann
214ddee2f5 util/Time*: move to time/ 2019-05-08 15:47:58 +02:00
Max Kellermann
973c87b351 event/Call, ...: use wait() with predicate 2019-05-07 20:01:45 +02:00
Max Kellermann
72fc117393 thread/WindowsCond: add wait() overload with predicate 2019-05-07 19:59:32 +02:00
Max Kellermann
230ca2e968 thread/{Mutex,Cond}: use std::mutex and std::condition_variable
On Windows, we keep using our own implementations, because GCC
implements std::mutex and std::condition_variable with pthread
emulation, which is not a good choice.
2019-05-07 19:57:53 +02:00
Max Kellermann
9095167039 thread/*Cond: add wait_for() overload with predicate 2019-05-07 19:54:54 +02:00
Max Kellermann
ad4ca0c449 thread/*Cond: remove wait() overloads without std::unique_lock<> 2019-05-07 19:31:00 +02:00
Max Kellermann
0a0cc66e8f thread/Mutex: use using instead of making it a derived class
Prepare the transition to std::mutex.
2019-05-07 19:23:01 +02:00
Max Kellermann
1b5c1f75a4 input/InputStreams: pass std::unique_lock<> to various methods 2019-05-07 19:09:39 +02:00
Max Kellermann
040573c636 command/fingerprint: fix mutex locking bug
GetChromaprintCommand::DecodeStream() is called without holding the mutex.
2019-05-07 19:09:13 +02:00
Max Kellermann
dedc4b4b10 player/Control: pass std::unique_lock<> to Cond::wait() 2019-04-26 18:47:22 +02:00
Max Kellermann
cf348f9fae decoder/Control: pass std::unique_lock<> to Cond::wait() 2019-04-26 18:34:16 +02:00
Max Kellermann
23d56cb6a1 output/Control: pass std::unique_lock<> to Cond::wait() 2019-04-26 18:28:44 +02:00
Max Kellermann
4473816384 output/Control: add LockEnableDisableAsync() 2019-04-26 18:28:09 +02:00
Max Kellermann
2c8d004f78 output/Control: add LockWaitForCommand() 2019-04-26 18:25:36 +02:00
Max Kellermann
684bd9153e output/MultipleOutputs: simplify locking in CheckPipe()
Instead of keeping all open outputs locked, let ClearTailChunk() stall
playback until MultipleOutputs::CheckPipe() has updated the MusicPipe.
2019-04-26 18:13:14 +02:00
Max Kellermann
ec456fc57c output/MultipleOutputs: make variable more local 2019-04-26 18:13:02 +02:00
Max Kellermann
7c92eb4360 output/Control: add noexcept 2019-04-26 17:53:27 +02:00
Max Kellermann
2c6ebe28e9 playlist/EmbeddedCue:: wrap CueParser in std::unique_ptr<> 2019-04-26 14:58:09 +02:00
Max Kellermann
401f06f367 playlist/EmbeddedCue: add noexcept 2019-04-26 14:57:03 +02:00
Max Kellermann
2b4e9cc635 db/update/Service: wrap UpdateWalk in std::unique_ptr<> 2019-04-26 14:55:00 +02:00
Max Kellermann
afdaaba045 fs/io/BufferedOutputStream: add noexcept 2019-04-26 14:55:00 +02:00
Max Kellermann
1cfc0cb874 fs/io/AutoGunzipReader: use std::unique_ptr<> 2019-04-26 14:55:00 +02:00
Max Kellermann
3882c97545 fs/io/AutoGunzipReader: add noexcept 2019-04-26 14:55:00 +02:00
Max Kellermann
bf9f690c70 fs/io/GunzipReader: add noexcept 2019-04-26 14:55:00 +02:00
Max Kellermann
392b783c9e fs/io/TextFile: add noexcept 2019-04-26 14:44:27 +02:00
Max Kellermann
6d86902a02 fs/io/TextFile: use std::unique_ptr<> 2019-04-26 14:42:54 +02:00
Max Kellermann
376f4a2b16 output/MultipleOutputs: wrap AudioOutputControl in std::unique_ptr<> 2019-04-26 14:28:59 +02:00
Max Kellermann
b42f19f514 output/Control: implicitly call BeginDestroy() in destructor 2019-04-26 14:28:30 +02:00
Max Kellermann
92022658f9 thread/Cond: add wait() overload which takes a unique_lock<>
Just like std::condition_variable, which however has no way to specify
the std::mutex directly.
2019-04-26 11:51:45 +02:00
Max Kellermann
b51bae5500 thread/*Cond: rename methods to match std::condition_variable 2019-04-25 19:46:43 +02:00
Max Kellermann
5bc8cd0ecb event/Call: use std::lock_guard 2019-04-25 19:45:52 +02:00
Max Kellermann
d38a079ba1 neighbor/smbclient: use std::lock_guard 2019-04-25 19:44:59 +02:00
Max Kellermann
c75a0f7c75 neighbor/smbclient: call Run() with locked mutex 2019-04-25 19:43:45 +02:00
Max Kellermann
e740f8d969 decoder/Control: remove unused methods Lock(), Unlock() 2019-04-25 19:34:26 +02:00
Max Kellermann
9da7509944 input/curl: use class ScopeUnlock 2019-04-25 19:33:50 +02:00
Max Kellermann
36aa204575 input/smbclient: use std::lock_guard 2019-04-25 19:33:50 +02:00
Max Kellermann
2c0a968735 storage/smbclient: use std::lock_guard 2019-04-25 19:23:37 +02:00
Max Kellermann
84c406d5f5 storage/nfs: use class ScopeUnlock 2019-04-25 19:22:57 +02:00
Max Kellermann
0e48747607 event/Call: use std::lock_guard 2019-04-25 18:57:58 +02:00
Max Kellermann
f764925edc Instance: use std::unique_ptr<> to manage the NeighborGlue pointer 2019-04-25 13:09:31 +02:00
Max Kellermann
692c8025a2 Main: use AtScopeExit() to call NeighborGlue::Close() 2019-04-25 13:03:51 +02:00
Max Kellermann
a6dc1ab0a9 lib/sqlite/Database: wrapper for sqlite3* 2019-04-25 12:10:12 +02:00
Max Kellermann
77c9081f78 sticker/Database: wrap in class StickerDatabase 2019-04-25 12:05:18 +02:00
Max Kellermann
c88d5616f7 sticker/Database: move sticker_prepare() to lib/sqlite/Util.hxx 2019-04-25 11:57:29 +02:00
Max Kellermann
34d483a34a lib/sqlite/Util: move into namespace 2019-04-25 11:56:52 +02:00
Max Kellermann
5a3828ed4a sticker/*: rename source files, drop "Sticker" prefix 2019-04-24 15:15:19 +02:00
Max Kellermann
3fe7f27345 sticker/Database: eliminate sticker_foreach() 2019-04-24 15:12:58 +02:00
Max Kellermann
0dccadff89 sticker/Database: remove unused function sticker_get_value() 2019-04-24 15:09:47 +02:00
Max Kellermann
5a915eb0e6 sticker/Database: return Sticker by value 2019-04-24 15:05:05 +02:00
Max Kellermann
7b48ae4f85 sticker/Database: move struct Sticker to Sticker.hxx 2019-04-24 15:03:52 +02:00
Max Kellermann
92dc4a0ca7 sticker/Database: add noexcept 2019-04-24 15:00:24 +02:00
Max Kellermann
c7c303eec3 db/DatabaseListener: add noexcept 2019-04-24 14:57:30 +02:00
Max Kellermann
1b62adc894 Instance: add noexcept 2019-04-24 14:56:08 +02:00
Max Kellermann
0641ce79fe StateFile: add noexcept 2019-04-24 14:54:17 +02:00
Max Kellermann
b985835d8b android/Environment: add noexcept 2019-04-24 14:50:02 +02:00
Max Kellermann
e413dcf8c6 android/LogListener: add noexcept 2019-04-24 14:49:42 +02:00
Max Kellermann
ea61e6dde1 android/Context: add noexcept 2019-04-24 14:49:42 +02:00
Max Kellermann
f7f858cb07 android/Context: use DiscardException() 2019-04-24 14:44:06 +02:00
Max Kellermann
4d1546cb38 java/File: use DiscardException() 2019-04-24 14:43:09 +02:00
Max Kellermann
a4bc972aad java/File: use String::ToString() in ToAbsolutePath() 2019-04-24 14:40:31 +02:00
Max Kellermann
1415bac1d6 fs/AllocatedPath: add Android-only FromUTF8(std::string&&) overload 2019-04-24 14:39:47 +02:00
Max Kellermann
7a98a784b2 fs/Features: add macro FS_CHARSET_ALWAYS_UTF8 2019-04-24 14:28:55 +02:00
Max Kellermann
162845cc6d fs/Charset: move HAVE_FS_CHARSET to Features.hxx 2019-04-24 14:24:54 +02:00
Max Kellermann
a8ee7269bc fs/Config: add noexcept 2019-04-24 14:24:21 +02:00
Max Kellermann
7c1843ee2e fs/AllocatedPath: add noexcept 2019-04-24 14:18:24 +02:00
Max Kellermann
bc8bb41aef fs/Path: add noexcept 2019-04-24 14:17:37 +02:00
Max Kellermann
a8b94a4507 fs/Traits: add noexcept 2019-04-24 14:16:45 +02:00
Max Kellermann
f1b6deb768 java/Exception: add RethrowException() 2019-04-24 14:09:45 +02:00
Max Kellermann
72ebd5ebdd java/Object: add Object.toString() wrapper 2019-04-24 14:08:51 +02:00
Max Kellermann
61b2ae0f7c java/String: add method ToString() 2019-04-24 14:07:52 +02:00
Max Kellermann
0d2ec5ead2 java/Object: rename class Object to GlobalObject 2019-04-24 14:07:52 +02:00
Max Kellermann
5b74ed6b3b release v0.21.8
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAly/BoIQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnxpEACRVQulwjs3jo/+rxJYXTjDBmPuvNGywaAf
 aAtEWTLWHYHSBRAGO2IVjtUOYJOrl2G1teA1rkSc2TqAMc12RYJPWm4q3Kamj7Tg
 2COKt81v1XcaR1uR0LI1D6V2SqguhSTrEc21VyMPhfFQDjcdlPTITzyOw1n/EP7j
 XwXyw6hDr2w+Ox4Ja6J7Cp61yWJAIYNtlRrDy7VRYtTvHtFJWdQu1955UTmn07LJ
 y0Ba4azE5FveEsbq+mrKzPKAJ6pYqdbeAqUEl+FMTJEb4jXVwmuAU9HI7i9ZP4mM
 k42hG1cco+2r5t7KsuakcgbdAyZflfdQBUcAywcyd5SdzUdFRbBt/c+/xKKLBms9
 7u8dAug8eSl9/QWHDQzQPPxxkX37R6p/P+Xg1CsTBksTHDK5jwMWrDicGzZYEBFC
 rA6eURfrjc4FN+qi0YWnLdXwJfUlVyINzz+fLgmzuN5L35qL/0WsyR/ztizPcoul
 przhUZ1nhmeFiItfS/5VkLXaECAWmhOYw/IpaCmOtK/ieIo6FXxk11GBP/RQ/SyT
 noPbqcnI2Nwgc2zTtCp2sLu1O3S2CeW7Ce4wKgiZOS4jJmKHDVRSli39t8eL146C
 dHxw0RMBPeZsn4Qh9yrfuMfsCySX1lr5uaokJ68LuQVToryIuT1mNUQdmWAdkceu
 eliH8Tfjeg==
 =BjVR
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.8'

release v0.21.8
2019-04-23 14:41:08 +02:00
Max Kellermann
3a0d6d96c1 input/smbclient: wrap in MaybeBufferedInputStream
This enables the input buffer for remote files and caches file
contents in MPD.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/376
2019-04-23 14:08:27 +02:00
Max Kellermann
ccc58f2a32 Merge branch 'v0.21.x' 2019-04-18 11:49:05 +02:00
Max Kellermann
ead3dc6a92 LocateUri: pass URI plugin kind, optionally disables plugin verify
Commit b3a458338a added a LocateUri()
call to several playlist commands, which applied InputPlugin URI
scheme verification to playlist URIs.  This broke the SoundCloud
playlist plugin which uses "soundcloud://" URIs for which no input
plugin exists.

This commit allows the caller to specify the kind of plugin which
shall be used to verify the URI.  Right now, only "input" is
implemented; "storage" uses the "input" verification for now; and
"playlist" has no verification at all (for now).

Closes https://github.com/MusicPlayerDaemon/MPD/issues/528
2019-04-18 10:03:15 +02:00
Max Kellermann
7d814cc899 neighbor/smbclient: fix double smbc_closedir() call
There is already one call in ReadServers(), which is the correct place
to do it.
2019-04-18 09:40:56 +02:00
Max Kellermann
d6dbf64efb CommandLine: fix another build failure with -Ddatabase=false
Split several printf() calls to make it easier to deal with all those
#ifdefs.
2019-04-18 09:20:12 +02:00
Eugene Gorodinsky
8d18b4c24b Fix meson.build to work properly with '-Ddatabase=false' 2019-04-18 08:55:13 +02:00
Max Kellermann
d28307e082 neighbor/smbclient: fix double smbc_closedir() call
There is already one call in ReadServers(), which is the correct place
to do it.
2019-04-16 20:07:48 +02:00
Max Kellermann
aa5c5bf14f neighbor/smbclient: add noexcept 2019-04-16 20:05:14 +02:00
Max Kellermann
2e80477218 neighbor/smbclient: make Server attributes "const" 2019-04-16 20:05:11 +02:00
Max Kellermann
8b9df85daa neighbor/smbclient: remove unused attribute "alive" 2019-04-16 20:04:53 +02:00
Max Kellermann
edafe4cad6 tag/Id3Unique: add noexcept 2019-04-16 10:38:57 +02:00
Max Kellermann
3cbadf42a5 java/Ref: add move constructor 2019-04-11 11:34:52 +02:00
Max Kellermann
1d49f1108f java/Ref: allow LocalRef to be nullable
Makes using the Java glue classes simpler to use, at the cost of very
little overhead.
2019-04-11 11:32:07 +02:00
Max Kellermann
8e5e97bfed command: add command "getfingerprint"
A first use case for our libchromaprint integration added by commit
30e22b753b
2019-04-05 14:23:35 +02:00
Max Kellermann
17dd334b82 client/ThreadBackgroundCommand: fix inverted check 2019-04-05 14:23:35 +02:00
Max Kellermann
ab5eb4f9ce tag/meson.build: move libchromaprint detection to lib/chromaprint/ 2019-04-05 13:51:48 +02:00
Max Kellermann
a30af2ba42 lib/chromaprint/DecoderClient: replace method PrintResult() 2019-04-05 13:40:05 +02:00
Max Kellermann
9f1c23e217 client/BackgroundCommand: infrastructure for commands running in background 2019-04-05 11:18:15 +02:00
Max Kellermann
28fc1d555f decoder/Thread: eliminate decoder_input_stream_open() 2019-04-05 10:32:07 +02:00
Max Kellermann
ac74f284aa decoder/Bridge: check for STOP before InputStream::IsReady()
If the DecoderThread gets woken up by a STOP command, this should be
detected as early as possible.
2019-04-05 10:32:06 +02:00
Max Kellermann
77af999b46 decoder/Thread: use DecoderBridge::OpenUri(), eliminate duplicate code 2019-04-05 10:29:24 +02:00
Max Kellermann
4926763f00 decoder/Bridge: call InputStream::Check() before returning 2019-04-05 10:29:20 +02:00
Max Kellermann
a19eee78c6 decoder/Bridge: make many attributes private 2019-04-05 09:26:03 +02:00
Max Kellermann
6be3c99876 decoder/Bridge: add noexcept 2019-04-05 09:04:08 +02:00
Max Kellermann
8006911a1f decoder/Client: add noexcept 2019-04-05 09:03:42 +02:00
Max Kellermann
61e5828790 input/InputStream: add noexcept to ReadTag() 2019-04-05 08:57:42 +02:00
Max Kellermann
6addc9d6e0 pcm/PcmConvert: remove unused attribute "dest_format" 2019-04-04 21:06:28 +02:00
Max Kellermann
e78d825059 pcm/PcmConvert: eliminate Open() and Close()
Let the constructor and destructor do this.  This means that all users
have to be converted to allocate PcmConvert dynamically.
2019-04-04 21:01:08 +02:00
Max Kellermann
00b04468dc filter/Convert: make in_audio_format const 2019-04-04 21:00:23 +02:00
Max Kellermann
8a07724b23 test/RunChromaprint: move class ChromaprintDecoderClient to lib/chromaprint/ 2019-04-04 20:29:27 +02:00
Max Kellermann
5256929b17 tag/Chromaprint: move to lib/chromaprint/Context.hxx 2019-04-04 20:21:10 +02:00
Max Kellermann
093bf5d859 event/*, ...: make GetEventLoop() const 2019-04-04 20:07:57 +02:00
Max Kellermann
4f6144dc71 lib/curl/Init: add const overloads 2019-04-04 20:06:43 +02:00
Max Kellermann
2d1493ed7a lib/curl/Init: add noexcept 2019-04-04 20:06:20 +02:00
Max Kellermann
43677d5740 event/MaskMonitor: add noexcept 2019-04-04 19:54:17 +02:00
Max Kellermann
693815bb32 input/AsyncInputStream: add noexcept 2019-04-04 19:54:17 +02:00
Max Kellermann
58d7804d66 Client: eliminate SetExpired(), call Close() directly 2019-04-04 10:37:38 +02:00
Max Kellermann
ea5e6d8f33 Merge branch 'v0.21.x' 2019-04-04 10:29:58 +02:00
Max Kellermann
f6941f9a44 event/SocketMonitor: don't cancel if OnSocketReady() returns false
Expect OnSocketReady() to cancel events.  If it returns false, the
SocketMonitor may be destructed already.  This fixes a use-after-free
bug in the "httpd" output plugin.
2019-04-04 10:24:58 +02:00
Max Kellermann
d2eb4df8fc event/{Fully,}BufferedSocket: add more API documentation 2019-04-04 10:24:58 +02:00
Max Kellermann
df33a898d7 zeroconf/Bonjour: fix OnSocketReady() return value
Keep the SocketMonitor registered.  This wrong return value was added
6 years ago in commit 72cf8dd8a0, andd
apparently, nobody ever noticed.
2019-04-04 10:24:29 +02:00
Max Kellermann
325c7b8e8b output/httpd: close client connection on error
This missing piece probably never really hurt, because
HttpdClient::OnSocketClosed() would be called right after a socket
error, but it's better to be explicit about closing on error.
2019-04-04 09:39:22 +02:00
Max Kellermann
380656d8c9 output/httpd: add missing mutex lock 2019-04-03 22:53:03 +02:00
Max Kellermann
9111bc2c21 output/httpd: add more API documentation about locking 2019-04-03 22:49:25 +02:00
Max Kellermann
c1272c72b0 client/Process: reset the CommandListBuilder before processing it
Allows removing a CommandResult::CLOSE check.
2019-04-03 22:38:26 +02:00
Max Kellermann
7d1db5c19f client/Process: refactor IsExpired() checks 2019-04-03 22:31:49 +02:00