Commit Graph

15153 Commits

Author SHA1 Message Date
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 Merge tag 'v0.21.9'
release v0.21.9
2019-05-20 17:23:01 +02:00
Max Kellermann 66a8fac25e release v0.21.9 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
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 ed2db04f43 doc/mpd.conf.5: remove ALSA specific documentation
ALSA is just one out of many output plugins, and detailed plugin
documentation should only live in the user manual, without having
duplicates in the (brief) manpage.

Also move "mixer_type" to the "optional audio output parameters"
section; it is a generic option, not specific to ALSA.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/552
2019-05-13 22:51:48 +02:00
Max Kellermann de0afa0e08 doc/mpd.conf.5: fix section indent 2019-05-13 22:51:45 +02:00
Max Kellermann f0d3227d7b doc/protocol.rst: add references to audio_output_format 2019-05-13 22:46:23 +02:00
Max Kellermann fb07a7cecc doc/user.rst: move audio format spec to section "Global Audio Format" 2019-05-13 22:39:49 +02:00
Max Kellermann c6b08a4d48 doc/user.rst: add reference to audio_output_format 2019-05-13 22:39:44 +02:00
Max Kellermann 040e87ad8d doc/user.rst: more markup 2019-05-13 22:36:19 +02:00