- 04 Nov, 2008 1 commit
-
-
Max Kellermann authored
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
-
- 03 Nov, 2008 3 commits
-
-
Max Kellermann authored
dc.error wasn't updated when the input stream failed to initialize.
-
Max Kellermann authored
Renamed variables and functions.
-
Max Kellermann authored
If an input stream provides tags (e.g. from an icecast server), send them in the decoder_data() and decoder_tag() methods. Removed the according code from the mp3 and oggvorbis plugins - decoders shouldn't have to care about stream tags. This patch also adds the missing decoder_tag() invocation to the mp3 plugin.
-
- 02 Nov, 2008 5 commits
-
-
Max Kellermann authored
The try_decode() method may have read some data from the stream, which is now lost. To make this data available to other methods, get it back by rewinding the input stream after each try_decode() invocation. The ogg and wavpack plugins did this manually and inconsistently; this code can now be removed.
-
Max Kellermann authored
-
Max Kellermann authored
Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file.
-
Max Kellermann authored
Rename all functions to the new prefix.
-
Max Kellermann authored
No CamelCase in the file name. The output_buffer struct is going to be renamed to music_pipe. There are so many buffer levels in MPD, and calling this one "output buffer" is wrong, because it's not the last buffer before the music reaches the output devices.
-
- 01 Nov, 2008 1 commit
-
-
Max Kellermann authored
The decoder_plugin structs must never change. Don't work with non-const pointers.
-
- 31 Oct, 2008 6 commits
-
-
Max Kellermann authored
Nearly all mapper functions can fail and will then return NULL. Add checks to all callers.
-
Max Kellermann authored
http://xkcd.com/292/
-
Max Kellermann authored
If nobody sent a command, the player isn't waiting for the decoder. Don't wake it up.
-
Max Kellermann authored
The player should always be woken up when the decoder quits.
-
Max Kellermann authored
Eliminate one goto in decodeStart() by moving some cleanup to decoder_task().
-
Max Kellermann authored
switch looks much nicer than if/elseif/... and gcc generates nice warnings when a new command is added to the enum.
-
- 30 Oct, 2008 1 commit
-
-
Max Kellermann authored
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
-
- 29 Oct, 2008 1 commit
-
-
Max Kellermann authored
A decoder_flush() invocation was missing in the FLAC plugin, resulting in casual assertion failures due to a wrong assumption about the last chunk's audio format. It's much easier to remove that decoder_flush() function and make the decoder thread call ob_flush().
-
- 26 Oct, 2008 2 commits
-
-
Max Kellermann authored
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
-
Max Kellermann authored
Renamed all functions and variables.
-
- 20 Oct, 2008 1 commit
-
-
Max Kellermann authored
There was only one user of pathcpy_trunc(), which can be eliminated.
-
- 17 Oct, 2008 2 commits
-
-
Max Kellermann authored
Provide a struct type which can be forward-declared. The typedef InputStream is deprecated now.
-
Max Kellermann authored
Wake up the player as soon as the decoder thread has entered its loop. This fixes a dead lock when the input is blocking.
-
- 14 Oct, 2008 1 commit
-
-
Max Kellermann authored
The mapper library maps directory and song objects to file system paths. With this central library, the code mixture in path.c should be cleaned up, and we will be able to add neat features like aliasing.
-
- 08 Oct, 2008 4 commits
-
-
Max Kellermann authored
The runtime check suggests that the author has somehow thought song_get_url(NULL) might be valid. It should not be. Replace it with an assertion.
-
Max Kellermann authored
CamelCase is ugly... rename all functions.
-
Max Kellermann authored
"bool" should be used in C99 programs for boolean values.
-
Max Kellermann authored
Again, a data type which can be forward-declared.
-
- 29 Sep, 2008 1 commit
-
-
Max Kellermann authored
Why have a "_func" prefix on all method names? Also don't typedef the methods, there is no advantage in that.
-
- 26 Sep, 2008 1 commit
-
-
Max Kellermann authored
There was a known deadlocking bug in the notify library: when the other thread set notify->pending after the according check in notify_wait(), the latter thread was deadlocked. Resolve this by synchronizing all accesses to notify->pending with the notify object's mutex. Since notify_signal_sync() was never used, we can remove it. As a consequence, we don't need notify_enter() and notify_leave() anymore; eliminate them, too.
-
- 26 Aug, 2008 10 commits
-
-
Max Kellermann authored
Give player.c a better name, meaning that the code is used to control the player thread.
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
It should be obvious in which thread or context a function is being executed at runtime. The code which was left in decode.c is for the decoder thread itself; give the file a better name.
-
Max Kellermann authored
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.
-
Max Kellermann authored
This flag is used internally; it is set by decoder_seek_where(), and indicates that the decoder plugin has begun the seek process. It is used for the case that the decoder plugin has to read data during the seek process. Before this patch, that was impossible, because decoder_read() would refuse to read data unless dc->command is NONE. This patch is kind of a dirty workaround, and needs to be redesigned later.
-
Max Kellermann authored
The flag "ready" indicates whether the input stream is ready and it has parsed all meta data. Previously, it was impossible for decodeStart() to see the content type of HTTP input streams, because at that time, the HTTP response wasn't parsed yet.
-
Max Kellermann authored
Move code which runs in the player thread to player_thread.c. Having a lot of player thread code in decode.c isn't easy to understand.
-
Max Kellermann authored
decode.c should be a lot smaller; start by moving all code which handles cross-fading to crossfade.c. Also includes camelCase conversion.
-
Max Kellermann authored
Make the code more readable by hiding big formulas in an inline function with a nice name.
-