summaryrefslogtreecommitdiff
path: root/src/player_control.c
AgeCommit message (Collapse)Author
2009-05-06player_control: assert that pc.next_song is NULL after seekingMax Kellermann
The player thread must reset pc.next_song after seeking, even if that operation has failed. This patch adds an assertion.
2009-05-06player_control: removed pc.error check from pc_seek()Max Kellermann
The only pc_seek() caller clears the error, rendering the check useless. Even if the previous PLAY command resulted in a player error, this check is not very useful.
2009-05-06player_control: renamed playerSeek(), return boolMax Kellermann
Renamed playerSeek() to pc_seek() to get rid of CamelCase. Convert the return value to bool.
2009-03-30player_control: remove unused function playerCurrentDecodeSong().Avuton Olrich
2009-03-13all: Update copyright header.Avuton Olrich
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-03-06pipe: added music_buffer, rewrite music_pipeMax Kellermann
Turn the music_pipe into a simple music_chunk queue. The music_chunk allocation code is moved to music_buffer, and is now managed with a linked list instead of a ring buffer. Two separate music_pipe objects are used by the decoder for the "current" and the "next" song, which greatly simplifies the cross-fading code.
2009-02-10player: added some more assertionsMax Kellermann
Assertions on pc.command and pc.next_song.
2009-01-29player_control: reset pc.error if pc.errored_song is clearedMax Kellermann
When the playlist is cleared, pc.errored_song is also cleared. This causes pc_errored_song_uri() to crash, because it assumes that pc.errored_song is set. Reset pc.error to fix that assumption.
2009-01-25player_control: added player_control.threadMax Kellermann
player_control.thread contains the handle of the player thread, or NULL if the player thread isn't running.
2009-01-07pcm_utils: moved code to pcm_volume.cMax Kellermann
Moved the software volume code to a separate library.
2009-01-04song: allocate the result of song_get_url()Max Kellermann
2009-01-02event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann
There is only one location using PIPE_EVENT_SIGNAL: to synchronize player_command() with player_command_finished(). Use the "notify" library instead of the event_pipe here.
2009-01-01event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann
Continuing the previous patch.
2009-01-01main_notify: renamed source to event_pipe.cMax Kellermann
We are going to migrate away from the concept of notifying the main thread. There should be events sent to it instead. This patch starts a series to implement that.
2008-12-29removed os_compat.hMax Kellermann
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-12-17player_control: check if errored_song is setMax Kellermann
getPlayerErrorStr() assumes that pc.errored_song is set when an error occured. Since the song may have been deleted meanwhile, add a NULL check.
2008-12-17playlist: clear pc.errored_song on deleteMax Kellermann
When a (remote) song is deleted from the playlist, there may still be a reference to it in pc.errored_song. Clear this reference.
2008-11-11pcm_volume: added constant PCM_VOLUME_1Max Kellermann
It may be desirable to change the range of integer volume levels (e.g. to 1024, which may utilize shifts instead of expensive integer divisions). Introduce the constant PCM_VOLUME_1 which describes the integer value for "100% volume". This is currently 1000.
2008-11-03player: converted PLAYER_ERROR_* to enumMax Kellermann
2008-11-03player: no CamelCaseMax Kellermann
Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.
2008-10-14command: added command "idle"Max Kellermann
"idle" waits until something noteworthy happens on the server, e.g. song change, playlist modified, database updated. This allows clients to keep up to date without polling.
2008-10-12player: added commands QUEUE and CANCELMax Kellermann
QUEUE adds a new song to the player's queue. CANCEL clears the queue. These two commands replace the old and complex queueState and queueLockState code.
2008-10-11player: removed set_current_song()Max Kellermann
set_current_song() is an internal function and consists of only one assignment. Eliminate it.
2008-10-11player: removed player_control.fileTimeMax Kellermann
This variable is superfluous, it is only used to copy its value to player_control.totalTime. Since the original source of this value (song->tag->time) will still be available at this point, we can safely remove fileTime.
2008-10-10player: added player_get_audio_format()Max Kellermann
player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
2008-10-10player: added player_control.audio_formatMax Kellermann
This replaces the attributes bits, channels, sampleRate.
2008-10-08song: removed CamelCaseMax Kellermann
CamelCase is ugly... rename all functions.
2008-10-08song: converted typedef Song to struct songMax Kellermann
Again, a data type which can be forward-declared.
2008-09-24notify: added notify_deinit()Max Kellermann
Destroy the mutex when it is not used anymore.
2008-09-06include cleanupMax Kellermann
As usual, include only headers which are really needed.
2008-08-26moved player_command_finished() to player_thread.cMax Kellermann
2008-08-26moved code to pc_init(), dc_init()Max Kellermann
2008-08-26renamed player.c to player_control.cMax Kellermann
Give player.c a better name, meaning that the code is used to control the player thread.
2008-08-26moved global variable "pc" to player.hMax Kellermann
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.