aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-01-23playlist: moved code to playlist_queue_song_order()Max Kellermann1-23/+20
Merged duplicate code from queueNextSongInPlaylist().
2009-01-23playlist: documented struct membersMax Kellermann1-0/+13
Added several comments.
2009-01-23queue: merged songs, songMod, positionToId into struct queue_itemMax Kellermann2-56/+52
Move everything which belongs together into one common struct. This simplifies the implementation of several queue operations.
2009-01-22playlist: moved code to queue.cMax Kellermann5-357/+777
Attempt to untie the playlist.c knot: moved the playlist storage code to queue.c, struct queue.
2009-01-22playlist: corrected shuffle underflow testMax Kellermann1-2/+2
Check for current>=0, not queued>=0.
2009-01-22playlist: fix buffer underflow when getting current songMax Kellermann1-7/+10
The function moveSongInPlaylist() attempted to read the position of the current song, even if it was -1. Check that first. The same bug was in shufflePlaylist().
2009-01-22locate: use const pointersMax Kellermann4-32/+28
Pass const pointers where no writes are performed.
2009-01-22null: added option to disable timer synchronizationMax Kellermann1-1/+11
The null plugin synchronizes the playback so it will happen in real time. This patch adds a configuration option which disables this: the playback will then be as fast as possible. This can be useful to profile MPD.
2009-01-22null: implemented finish() methodMax Kellermann1-0/+13
Free memory in the finish() method to make valgrind happy.
2009-01-22null: no CamelCaseMax Kellermann2-15/+20
Renamed functions and variables.
2009-01-21playlist: convert assertion to check in TAG event handlerMax Kellermann1-2/+3
It is possible that playlist.current is reset before the TAG event handler playlist_tag_event() is called. Convert the assertion into a run-time check.
2009-01-21player_thread: emit PLAYLIST event when new song failsMax Kellermann1-1/+1
Break from the loop instead of returning the function. This calls player_stop_decoder(), which in turn emits the PLAYLIST event. This allows the playlist to re-start the player.
2009-01-21player_thread: check for decoder failure before seekingMax Kellermann1-1/+4
The function player_seek_decoder() starts the decoder, but does not check the return value of player_wait_for_decoder().
2009-01-21player_thread: use bool instead of intMax Kellermann1-12/+13
Make player_wait_for_decoder() and play_chunk() return a bool instead of 0/-1.
2009-01-21command: don't restart player in the "status" commandMax Kellermann3-4/+3
Don't attempt to restart the player if it was stopped, but there were still songs left on the playlist. This looks like it has been a workaround for a bug which has been fixed long time ago.
2009-01-21playlist: use the "enum player_error" typeMax Kellermann1-1/+1
Don't assign the result of getPlayerError() to an integer.
2009-01-21playlist: free memory with g_free()Max Kellermann1-10/+5
Use g_free() consistently with g_malloc(). Don't clear the pointers after freeing them.
2009-01-21player_thread: request next song only if new one starts playingMax Kellermann1-11/+0
The player_thread loop requests the next song from the playlist as soon as the decoder finishes the song which is currently being played. This is superfluous, and can lead to synchronization errors and wrong results. The playlist already knows when the player starts playing the next song (player_wait_for_decoder() triggers the PLAYLIST event), and will then trigger the scheduler to provide the next song.
2009-01-21use config_get_positive() instead of manual parsingMax Kellermann3-81/+21
Simplify some code by using config_get_positive(), instead of doing manual parsing and validation each time.
2009-01-21conf: added config_get_positive()Max Kellermann2-0/+23
This convenience function parses a configuration value into a positive integer. It aborts if parsing fails.
2009-01-21archiveapi: adding seeking support in zip archivesViliam Mateicka1-2/+8
2009-01-20player_thread: eliminated duplicate PLAYLIST eventMax Kellermann1-2/+0
player_wait_for_decoder() emits the PLAYLIST event on success, remove the duplicate PLAYLIST event in its caller.
2009-01-20event_pipe: added "TAG" eventMax Kellermann4-34/+22
The "TAG" event is emitted by the player thread when the current song's tag has changed. Split this event from "PLAYLIST" and make it a separate callback, which is more efficient.
2009-01-20Add space after sticker: to make it consistent.Qball Cow1-1/+1
2009-01-19command: added "sticker" commandMax Kellermann1-0/+72
The "sticker" command allows clients to query or manipulate the sticker database. This patch implements the sub-commands "get" and "set"; more will follow soon (enumeration), as well as extended "lsinfo" / "playlistinfo" versions.
2009-01-19update: delete stickers of deleted songsMax Kellermann1-0/+9
When a song is deleted from the database, remove its sticker, too. What's still missing is some sort of garbage collector after a fresh database create (--create-db).
2009-01-19sticker: added song sticker libraryMax Kellermann3-1/+122
This is a wrapper for the backend sticker library. It provides several glue functions which take a song object instead of type/uri.
2009-01-19sticker: new library for storing dynamic information about songsMax Kellermann6-0/+466
"Stickers" are pieces of information attached to existing MPD objects (e.g. song files, directories, albums). Clients can create arbitrary name/value pairs. MPD itself does not assume any special meaning in them.
2009-01-19flac: include config.hMax Kellermann1-0/+1
The plugin queries build-time configuration variables, and should include config.h.
2009-01-18output: don't include conf.h from output_control.hMax Kellermann1-2/+1
Minimize header dependencies.
2009-01-18conf: added config_get_block_unsigned()Max Kellermann6-39/+33
Eliminate some more getBlockParam() invocations.
2009-01-18conf: added config_get_block_string()Max Kellermann11-98/+95
This replaces lots of getBlockParam() invocations.
2009-01-18jack: parse "ports" setting with g_strsplit()Max Kellermann1-20/+7
Don't modify the configured string.
2009-01-18jack: use audio_output_get_name()Max Kellermann1-11/+1
Determine the audio output name with audio_output_get_name() instead of obtaining the name from the configuration again.
2009-01-18conf: removed parseConfigFilePath()Max Kellermann3-46/+19
Use config_get_path() instead in mapper.c.
2009-01-18mixer: don't check for NULL before g_free()Max Kellermann2-16/+11
The g_free() function includes a NULL check. We don't have to do it twice.
2009-01-18daemon: removed unused variable "userpwd"Max Kellermann1-8/+4
This causes a segmentation fault...
2009-01-18daemon: pass "detach" flag to daemonize()Max Kellermann3-6/+7
This way, we don't have to pass the full "Options" object to daemonize().
2009-01-18daemon: added daemonize_init(), daemonize_finish()Max Kellermann3-45/+72
The constructor/destructor functions parse and free the configuration properly. This way, we don't have to load the pid file path more than once.
2009-01-18main: moved the save_state timer to state_file.cMax Kellermann2-20/+26
The state_file library should manage its own regular saves.
2009-01-18state_file: added state_file_init() and state_file_finish()Max Kellermann3-24/+40
The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
2009-01-18state_file: include cleanupMax Kellermann2-3/+0
2009-01-18conf: added config_get_path()Max Kellermann3-5/+32
config_get_path() is an simpler interface than parseConfigFilePath().
2009-01-18removed playerData.cMax Kellermann5-107/+55
Fetch the configuration variables buffered_chunks and buffered_before_play just when they are needed.
2009-01-18main: moved code to daemon.cMax Kellermann3-98/+119
Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
2009-01-18mapper: make the music_directory optionalMax Kellermann6-31/+90
Without a music_directory, MPD is an excellent streaming client.
2009-01-18mapper: make the playlist directory optionalMax Kellermann5-16/+52
2009-01-18database: pass database file name to db_init()Max Kellermann3-40/+45
Don't include conf.h in database.c.
2009-01-18stats: use GTimer instead of time(NULL)Max Kellermann3-3/+13
time(NULL) shows the wrong results when the machine's clock is changed.
2009-01-18stats: use one db_walk() to obtain statsMax Kellermann3-73/+44
Don't use dbUtils.h functions. This reduces 4 full database walks to just one.