aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-01-07pcm_utils: moved code to pcm_volume.cMax Kellermann1-1/+1
Moved the software volume code to a separate library.
2009-01-04song: allocate the result of song_get_url()Max Kellermann1-13/+19
2009-01-02event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann1-2/+2
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 Kellermann1-1/+1
Continuing the previous patch.
2009-01-01main_notify: renamed source to event_pipe.cMax Kellermann1-1/+1
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 Kellermann1-1/+3
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 Kellermann1-4/+14
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 Kellermann1-0/+7
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 Kellermann1-2/+7
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 Kellermann1-1/+4
2008-11-03player: no CamelCaseMax Kellermann1-10/+10
Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.
2008-10-14command: added command "idle"Max Kellermann1-1/+14
"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 Kellermann1-39/+7
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 Kellermann1-13/+5
set_current_song() is an internal function and consists of only one assignment. Eliminate it.
2008-10-11player: removed player_control.fileTimeMax Kellermann1-1/+0
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 Kellermann1-15/+0
player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
2008-10-10player: added player_control.audio_formatMax Kellermann1-5/+5
This replaces the attributes bits, channels, sampleRate.
2008-10-08song: removed CamelCaseMax Kellermann1-3/+3
CamelCase is ugly... rename all functions.
2008-10-08song: converted typedef Song to struct songMax Kellermann1-5/+11
Again, a data type which can be forward-declared.
2008-09-24notify: added notify_deinit()Max Kellermann1-0/+5
Destroy the mutex when it is not used anymore.
2008-09-06include cleanupMax Kellermann1-1/+1
As usual, include only headers which are really needed.
2008-08-26moved player_command_finished() to player_thread.cMax Kellermann1-8/+0
2008-08-26moved code to pc_init(), dc_init()Max Kellermann1-0/+13
2008-08-26renamed player.c to player_control.cMax Kellermann1-1/+241
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 Kellermann1-5/+2
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.
2008-08-26moved code to player_thread.cMax Kellermann1-10/+3
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.
2008-08-26renamed InputPlugin to struct decoder_pluginMax Kellermann1-1/+1
"decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
2008-08-26moved convState to struct decoderMax Kellermann1-0/+3
Since we moved all PCM conversions to decoder_data(), the attribute convState isn't being used anymore by the OutputBuffer code. Move it to struct decoder.
2008-08-26added struct decoderMax Kellermann1-5/+7
The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions.
2008-04-12clean up CPP includesMax Kellermann1-2/+0
Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-02-05fix -Wconst warningsMax Kellermann1-2/+2
[ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-12-28Merge branches/ew r7104Eric Wong1-1/+1
thread-safety work in preparation for rewrite to use pthreads Expect no regressions against trunk (r7078), possibly minor performance improvements in update (due to fewer heap allocations), but increased stack usage. Applied the following patches: * maxpath_str for reentrancy (temporary fix, reverted) * path: start working on thread-safe variants of these methods * Re-entrancy work on path/character-set conversions * directory.c: exploreDirectory() use reentrant functions here * directory/update: more use of reentrant functions + cleanups * string_toupper: a strdup-less version of strDupToUpper * get_song_url: a static-variable-free version of getSongUrl() * Use reentrant/thread-safe get_song_url everywhere * replace rmp2amp with the reentrant version, rmp2amp_r * Get rid of the non-reentrant/non-thread-safe rpp2app, too. * buffer2array: assert strdup() returns a usable value in unit tests * replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants * fix storing playlists w/o absolute paths * parent_path(), a reentrant version of parentPath() * parentPath => parent_path for reentrancy and thread-safety * allow "make test" to automatically run embedded unit tests * remove convStrDup() and maxpath_str() * use MPD_PATH_MAX everywhere instead of MAXPATHLEN * path: get rid of appendSlash, pfx_path and just use pfx_dir * get_song_url: fix the ability to play songs in the top-level music_directory git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-18Reverting all of my localization changes. It was a horribleJ. Alexander Treuman1-2/+0
implementation, and fixing it is a big enough job that I don't know when I'll get around to it. Probably best just starting from scratch anyhow. git-svn-id: https://svn.musicpd.org/mpd/trunk@5373 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-08Moving pathConvCharset to charConv.c so it can be reused for localization.J. Alexander Treuman1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@5226 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-2/+2
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14[CLEANUP] Remove closeCharSetConversion from theAvuton Olrich1-2/+0
header, there's no need to export it. Static it. git-svn-id: https://svn.musicpd.org/mpd/trunk@4330 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-03remove vim &*(@Warren Dukes1-1/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@2500 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-17actually, scratch the last changeWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1524 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-17check in configure script if iconv() needs CONSTWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1523 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-18bunch of autotool cleanupsWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f