aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerThread.cxx (follow)
Commit message (Collapse)AuthorAgeFilesLines
* PlayerThread: log the last song that was playedMax Kellermann2013-12-241-1/+4
|
* PlayerThread: fix stuck MPD after song change (0.18.2 regression)Max Kellermann2013-11-081-4/+8
| | | | | | | | | | | | | Commit 77c63511 caused MPD to become stuck right after a song change. The problem was that at some point, the MusicBuffer became full, and the DecoderThread working on the next song waits for the PlayerThread. However, the PlayerThread was stuck in a loop of g_usleep() calls, and never bothered to tell the DecoderThread that the MusicBuffer is not full anymore. This bug is very old, but its chance to occur went from nearly 0% to nearly 100%. The fix is to wake up the DecoderThread before waiting for it. As a side effect, I replaced the g_usleep() call with a Cond::Wait() call.
* PlayerThread: reduce the number of DecoderThread wakeupsMax Kellermann2013-11-061-2/+14
| | | | | | | After the number of decoded chunks has fallen below the threshold, the PlayerThread woke up the DecoderThread over and over. This commit adds a boolean flag that avoids these duplicate wakeups, and thus reduces the number of system calls.
* PlayerThread: enable buffering when starting playbackMax Kellermann2013-11-061-1/+1
| | | | | | For some reason, this got lost in commit 975deca8. Re-enabling this fixes stuttering at the beginning of radio streams.
* Log: add level "DEFAULT"Max Kellermann2013-11-041-1/+1
| | | | | | Map LogLevel::INFO to G_LOG_LEVEL_INFO, and LogLevel::DEFAULT to G_LOG_LEVEL_MESSAGE. Now client connect/disconnect message are only logged on log_level "secure".
* PcmMix: use negative value instead of NaN for additionMax Kellermann2013-10-301-3/+1
| | | | Avoid NaN to allow -ffast-math.
* CrossFade: use negative value for invalid mixramp_delayMax Kellermann2013-10-301-1/+1
| | | | Avoid NaN to allow -ffast-math.
* PlayerControl: move attributes to struct CrossFadeSettingsMax Kellermann2013-10-291-12/+10
|
* DecoderControl: convert mutex and client_cond to a referenceMax Kellermann2013-10-281-19/+12
| | | | | | | | Share the Mutex between the DecoderThread and the PlayerThread. This simplifies synchronization between the two threads and fixes a freeze problem: while the PlayerThread waits for the DeocderThread, it cannot answer requests from the main thread, and the main thread will block until the DecoderThread finishes.
* player_control: rename to PlayerControlMax Kellermann2013-10-281-9/+9
|
* decoder_control: rename to DecoderControlMax Kellermann2013-10-281-4/+4
|
* DecoderControl: add MixRamp gettersMax Kellermann2013-10-261-2/+2
|
* Playlist: copy stream tags from the PlayerThreadMax Kellermann2013-10-221-2/+8
| | | | | | Finally restores an important feature that has been broken for several months when the PlayerThread started working with Song copies instead of pointers to the Queue's Song instances (commit e96779d).
* Song: pass reference to song_equals()Max Kellermann2013-10-211-1/+1
|
* *: use references instead of pointersMax Kellermann2013-10-191-3/+3
|
* PlayerThread: Only drop 0 length packets without tagsBen Boeckel2013-10-191-1/+1
| | | | | | | | | | Fixes a regression from 752dfb3d95482c562e5d24c6ea839c4815de9a6d which caused the current chunk to be flushed as soon as new replaygain information was found. If this occurs on a tag chunk, it has no data (length 0) and is then skipped before pushing it to all of the outputs. This change allows 0-length chunks through if they contain a tag and they are now appearing in mplayer and mpv properly.
* Thread/Thread: replacement library for GThreadMax Kellermann2013-10-171-13/+8
|
* Song: GetURI() returns std::stringMax Kellermann2013-10-171-7/+6
|
* Log: new logging library APIMax Kellermann2013-10-021-9/+11
| | | | | Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
* PlayerThread: convert struct player to a classMax Kellermann2013-09-271-14/+17
|
* PlayerThread: use strictly typed enumMax Kellermann2013-09-271-14/+14
|
* PlayerControl: use strictly typed enumsMax Kellermann2013-09-271-44/+44
|
* PlayerThread: move code to player_control::CommandFinished()Max Kellermann2013-09-271-21/+12
|
* PlayerThread: use nullptr instead of NULLMax Kellermann2013-09-271-37/+37
|
* PlayerThread: unlock/lock in player_task()Max Kellermann2013-09-261-8/+3
|
* PlayerThread: move code into the player classMax Kellermann2013-09-261-269/+277
|
* PlayerThread: use player referencesMax Kellermann2013-09-261-116/+115
|
* PlayerThread: use {decoder,player}_control referencesMax Kellermann2013-09-261-214/+214
|
* PlayerThread: allocate decoder_control on the stackMax Kellermann2013-09-261-5/+5
|
* PlayerThread: move global MusicBuffer variable into the player objectMax Kellermann2013-09-261-24/+27
|
* PlayerThread: simplify "buffer empty" assertionMax Kellermann2013-09-261-7/+1
|
* MusicBuffer: expose the C++ APIMax Kellermann2013-09-261-19/+18
|
* MusicPipe: expose the C++ APIMax Kellermann2013-09-261-25/+24
|
* Tag, ...: move to libtag.aMax Kellermann2013-09-051-1/+1
|
* util/Error: new error passing libraryMax Kellermann2013-09-041-21/+19
| | | | Replaces GLib's GError.
* Makefile.am: move sources to libsystem.aMax Kellermann2013-08-071-1/+1
|
* FatalError: new library to replace mpd_error.hMax Kellermann2013-08-071-2/+2
|
* *: use gcc.h macros instead of GLibMax Kellermann2013-08-041-1/+1
|
* audio_format: convert to C++Max Kellermann2013-08-031-14/+13
|
* tag: convert to C++Max Kellermann2013-07-301-12/+12
|
* song: convert header to C++Max Kellermann2013-07-281-21/+21
|
* use g_thread_new() if GLib is recent enoughMax Kellermann2013-04-171-0/+4
| | | | Fixes deprecation warnings.
* Merge tag 'release-0.17.4'Max Kellermann2013-04-081-0/+4
|
* Merge branch 'v0.17.x'Max Kellermann2013-02-191-1/+9
|
* PlayerControl: add second Cond objectMax Kellermann2013-01-251-1/+1
| | | | | | | | | | | | | This fixes a deadlock bug introduced by 18076ac9. After all, the second Cond was necessary. The problem: two threads can wait for a signal at the same time. The player thread waits for the output thread to finish playback. The main thread waits for the player thread to complete a command. The output thread finishes playback, and sends a signal, which unfortunately does not wake up the player thread, but the main thread. The main thread sees that the command is still not finished, and waits again. The signal is lost forever, and MPD is deadlocked.
* DecoderControl: move functions into the classMax Kellermann2013-01-211-31/+31
|
* PlayerControl: move functions into the classMax Kellermann2013-01-201-61/+61
|
* PlayerControl: switch to the Mutex/Cond classesMax Kellermann2013-01-101-1/+1
|
* PlayerThread: use pc.cond instead of main_condMax Kellermann2013-01-101-1/+1
| | | | | The main_cond variable was completely unnecessary. The pc.cond object can be used for both main->pc and pc->main.
* DecoderControl: take ownership of client_condMax Kellermann2013-01-101-1/+1
| | | | | Don't let the "client" pass its own GCond. This was not used consistently.