Commit Graph

49 Commits

Author SHA1 Message Date
Max Kellermann 20cba9e89f Song: pass reference to song_equals() 2013-10-21 23:19:15 +02:00
Max Kellermann ff626ac763 *: use references instead of pointers 2013-10-19 18:48:38 +02:00
Ben Boeckel fc9014f7ec PlayerThread: Only drop 0 length packets without tags
Fixes a regression from 752dfb3d95 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.
2013-10-19 15:45:11 +02:00
Max Kellermann 8e676db633 Thread/Thread: replacement library for GThread 2013-10-17 19:29:47 +02:00
Max Kellermann be8ceae6e6 Song: GetURI() returns std::string 2013-10-17 01:01:15 +02:00
Max Kellermann 060814daa8 Log: new logging library API
Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
2013-10-02 08:57:55 +02:00
Max Kellermann d0896ea7c4 PlayerThread: convert struct player to a class 2013-09-27 22:22:11 +02:00
Max Kellermann a73d1e4b1c PlayerThread: use strictly typed enum 2013-09-27 22:19:26 +02:00
Max Kellermann d05bb2a0af PlayerControl: use strictly typed enums 2013-09-27 22:07:20 +02:00
Max Kellermann ada67a6a4f PlayerThread: move code to player_control::CommandFinished() 2013-09-27 07:58:48 +02:00
Max Kellermann b6a5d1ad5a PlayerThread: use nullptr instead of NULL 2013-09-27 00:03:22 +02:00
Max Kellermann d8c5a63bc2 PlayerThread: unlock/lock in player_task() 2013-09-26 23:58:41 +02:00
Max Kellermann bcb2db62c9 PlayerThread: move code into the player class 2013-09-26 23:57:31 +02:00
Max Kellermann 079ef93121 PlayerThread: use player references 2013-09-26 23:27:47 +02:00
Max Kellermann b2789c598e PlayerThread: use {decoder,player}_control references 2013-09-26 22:53:40 +02:00
Max Kellermann 92a93c1217 PlayerThread: allocate decoder_control on the stack 2013-09-26 22:48:55 +02:00
Max Kellermann 96b70835f9 PlayerThread: move global MusicBuffer variable into the player object 2013-09-26 22:45:49 +02:00
Max Kellermann 7fa3b7a267 PlayerThread: simplify "buffer empty" assertion 2013-09-26 22:41:07 +02:00
Max Kellermann 3216f4b257 MusicBuffer: expose the C++ API 2013-09-26 22:21:56 +02:00
Max Kellermann ce1d897575 MusicPipe: expose the C++ API 2013-09-26 21:51:45 +02:00
Max Kellermann 3f267b1795 Tag, ...: move to libtag.a 2013-09-05 18:26:56 +02:00
Max Kellermann 29030b54c9 util/Error: new error passing library
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann b70d38dc10 Makefile.am: move sources to libsystem.a 2013-08-07 10:31:31 +02:00
Max Kellermann a27d105dcd FatalError: new library to replace mpd_error.h 2013-08-07 10:08:36 +02:00
Max Kellermann 85b77b81ca *: use gcc.h macros instead of GLib 2013-08-04 23:48:01 +02:00
Max Kellermann d1e7b4e381 audio_format: convert to C++ 2013-08-03 21:37:56 +02:00
Max Kellermann 06f898cc12 tag: convert to C++ 2013-07-30 20:19:53 +02:00
Max Kellermann ba161ec572 song: convert header to C++ 2013-07-28 13:25:12 +02:00
Max Kellermann a4a13a3825 use g_thread_new() if GLib is recent enough
Fixes deprecation warnings.
2013-04-17 01:49:43 +02:00
Max Kellermann 2c4b998170 Merge tag 'release-0.17.4' 2013-04-08 22:11:42 +02:00
Max Kellermann 214a526945 Merge branch 'v0.17.x' 2013-02-19 09:24:11 +01:00
Max Kellermann a9b62a2ece PlayerControl: add second Cond object
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.
2013-01-25 23:53:43 +01:00
Max Kellermann 32799fef5c DecoderControl: move functions into the class 2013-01-21 10:13:29 +01:00
Max Kellermann e1b03b4a71 PlayerControl: move functions into the class 2013-01-20 17:48:23 +01:00
Max Kellermann 06e0741a52 PlayerControl: switch to the Mutex/Cond classes 2013-01-10 10:12:54 +01:00
Max Kellermann 18076ac9b7 PlayerThread: use pc.cond instead of main_cond
The main_cond variable was completely unnecessary.  The pc.cond object
can be used for both main->pc and pc->main.
2013-01-10 10:01:24 +01:00
Max Kellermann ad15ca7104 DecoderControl: take ownership of client_cond
Don't let the "client" pass its own GCond.  This was not used
consistently.
2013-01-10 10:01:18 +01:00
Max Kellermann 26ebfc04b0 EventPipe: rename to GlobalEvents 2013-01-09 23:31:43 +01:00
Max Kellermann 5faf443038 event_pipe.h: convert to C++ 2013-01-09 22:37:47 +01:00
Max Kellermann e86e77ad67 idle: convert to C++ 2013-01-09 13:01:38 +01:00
Max Kellermann 333a08ebf9 replay_gain_info, ...: use cmath instead of math.h in C++ mode
Fixes build problems with mingw32.
2013-01-07 10:19:02 +01:00
Max Kellermann 975370c084 decoder_api.h, ...: add "extern C" 2013-01-07 10:07:40 +01:00
Max Kellermann c3c776bc6a mixer_all: convert to C++ 2013-01-07 09:05:06 +01:00
Max Kellermann 81f3d893d9 player_control.h: convert header to C++ 2013-01-04 22:31:53 +01:00
Max Kellermann e9b71a0d28 MusicChunk: move functions to methods 2013-01-04 21:38:46 +01:00
Max Kellermann 9a71845700 crossfade: convert to C++ 2013-01-04 10:31:59 +01:00
Max Kellermann 22f0a1547c buffer, pipe: convert to C++ 2013-01-04 10:16:16 +01:00
Max Kellermann e12cc01aa4 decoder_*: convert to C++ 2013-01-04 09:41:45 +01:00
Max Kellermann 975deca85b {decoder,player}_thread: convert to C++ 2013-01-02 20:36:28 +01:00