Commit Graph

14225 Commits

Author SHA1 Message Date
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
66a8fac25e release v0.21.9 2019-05-20 17:10:58 +02:00
Max Kellermann
1b902e00b4 doc/protocol.rst: several clarifications
Closes https://github.com/MusicPlayerDaemon/MPD/issues/340
2019-05-20 17:06:20 +02:00
Max Kellermann
45a091c00c .github: add issue templates 2019-05-20 16:44:02 +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