aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* player_control: add GError attributeMax Kellermann2012-08-081-36/+27
| | | | | Rewrite of the pc_get_error_message() function, now using a GError object instead of the complicated "errored_song" attribute.
* player_control: rename attribute "error" to "error_type"Max Kellermann2012-08-081-4/+4
|
* player_control: rename player_error enum valuesMax Kellermann2012-08-081-6/+6
|
* player_control: remove unused enum player_error valuesMax Kellermann2012-08-081-15/+0
|
* player_control: inline trivial functionsMax Kellermann2012-08-081-30/+0
|
* Merge branch 'v0.16.x'Max Kellermann2011-10-061-3/+0
|\ | | | | | | | | | | | | | | Conflicts: configure.ac src/player_control.c src/player_thread.c src/playlist_song.c
| * player_control: auto-start playback when seeking is requestedMax Kellermann2011-10-061-3/+0
| | | | | | | | | | Now that the player thread can handle SEEK commands while not (yet) playing, we can remove the "pc.state" check from pc_seek().
* | fix common misspellingsJonathan Neuschäfer2011-03-311-1/+1
| | | | | | | | | | | | | | These fixes were mostly generated with `codespell' [0] and manually reviewed. [0] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* | copyright year 2011Max Kellermann2011-01-291-1/+1
| |
* | decoder_control: store GCond object, not a player_controlMax Kellermann2011-01-101-1/+1
| | | | | | | | | | | | Remove the decoder dependency on player_control. All player_control was needed for is to signal the player thread, and we can do that with a simple GCond as well.
* | player_control: removed the global variable "pc"Max Kellermann2011-01-101-128/+138
|/ | | | | | | Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
* player_control: hold mutex in pc_play(), pc_pause()Max Kellermann2010-06-191-9/+42
| | | | Race condition fix.
* Add support for MixRamp tagsTim Phipps2010-03-211-0/+31
| | | | | Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* player_control: hold lock while reading statusMax Kellermann2009-11-121-1/+4
|
* include config.h in all sourcesMax Kellermann2009-11-121-0/+1
| | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* player_control: moved pc.next_song assertion into lockMax Kellermann2009-11-031-1/+2
| | | | | The assertion shouldn't access player_control.next_song without locking it.
* {decoder,player}_control: removed duplicate wakeupsMax Kellermann2009-11-021-3/+2
| | | | | | Don't wake up the target thread in every iteration of the wait() loop. Waking it up once, right after the command has been set, must be enough.
* player_control: lock player before setting seek parametersMax Kellermann2009-11-021-2/+6
| | | | | | These parameters must be protected with a mutex, too. Wrap everything inside player_lock()/player_unlock(), and use player_command_locked() instead of player_command().
* decoder_control: removed the global variable "dc"Max Kellermann2009-10-311-2/+2
| | | | | Allocate a decoder_control object where needed, and pass it around. This will allow more than one decoder thread one day.
* player_control: protect command, state, error with a mutexMax Kellermann2009-10-311-7/+35
| | | | | | Use GMutex/GCond instead of the notify library. Manually lock the player_control object before accessing the protected attributes. Use the GCond object to notify the player thread and the main thread.
* output_plugin: added methods enable() and disable()Max Kellermann2009-10-231-0/+6
| | | | | | | With these methods, an output plugin can allocate some global resources only if it is actually enabled. The method enable() is called after daemonization, which allows for more sophisticated resource allocation during that method.
* player_thread: get "elapsed" from audio outputsMax Kellermann2009-10-081-0/+2
| | | | | | | | | | | | | | | Tracking the "elapsed" time from the chunks which we have sent to the output pipe is very imprecise: since we have implemented the music pipe, we're sending large number of chunks at once, giving the "elapsed" time stamp a resolution of usually more than a second. This patch changes the source of this information to the outputs. If a chunk has been played by all outputs, the "elapsed" time stamp is updated. The new command PLAYER_COMMAND_REFRESH makes the player thread update its status information: it tells the outputs to update the chunk time stamp. After that, player_control.elapsed_time is current.
* player_control: eliminate PLAYER_COMMAND_PLAYMax Kellermann2009-10-081-2/+1
| | | | | Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the same. PLAYER_COMMAND_PLAY is redundant.
* player_control: added several assertions on pc.next_song==NULLMax Kellermann2009-10-081-0/+6
| | | | | After some of the commands, the player thread must have reset the pc.next_song attribute.
* player_control: no CamelCaseMax Kellermann2009-10-081-18/+30
|
* player_control: clear errored_song in clearPlayerError()Max Kellermann2009-10-081-1/+2
| | | | | Without the player error code, it errored_song variable is not used, and should be cleared, to avoid invalid access in pc_song_deleted().
* player_control: bundle "get" functions in pc_get_status()Max Kellermann2009-10-081-11/+9
| | | | | | The new player_status struct replaces a bunch of playerGetX() functions. When we add proper locking to the player_control struct, we will only need to lock once for the "status" command.
* player_control: allocate getPlayerErrorStr() resultMax Kellermann2009-10-081-19/+13
| | | | This lets us eliminate the static fixed-size buffer.
* output: use the software mixer pluginMax Kellermann2009-07-061-11/+0
| | | | | | | | | | Do all the software volume stuff inside each output thread, not in the player thread. This allows one software mixer per output device, and also allows the user to configure the mixer type (hardware or software) for each audio output. This moves the global "mixer_type" setting into the "audio_output" section, deprecating the "mixer_enabled" flag.
* player_control: assert that pc.next_song is NULL after seekingMax Kellermann2009-05-061-0/+2
| | | | | The player thread must reset pc.next_song after seeking, even if that operation has failed. This patch adds an assertion.
* player_control: removed pc.error check from pc_seek()Max Kellermann2009-05-061-6/+3
| | | | | | 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.
* player_control: renamed playerSeek(), return boolMax Kellermann2009-05-061-4/+4
| | | | | Renamed playerSeek() to pc_seek() to get rid of CamelCase. Convert the return value to bool.
* player_control: remove unused function playerCurrentDecodeSong().Avuton Olrich2009-03-301-7/+0
|
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | 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.
* pipe: added music_buffer, rewrite music_pipeMax Kellermann2009-03-061-1/+2
| | | | | | | | 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.
* player: added some more assertionsMax Kellermann2009-02-101-0/+2
| | | | Assertions on pc.command and pc.next_song.
* player_control: reset pc.error if pc.errored_song is clearedMax Kellermann2009-01-291-1/+3
| | | | | | 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.
* player_control: added player_control.threadMax Kellermann2009-01-251-0/+4
| | | | | player_control.thread contains the handle of the player thread, or NULL if the player thread isn't running.
* pcm_utils: moved code to pcm_volume.cMax Kellermann2009-01-071-1/+1
| | | | Moved the software volume code to a separate library.
* song: allocate the result of song_get_url()Max Kellermann2009-01-041-13/+19
|
* event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann2009-01-021-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.
* event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann2009-01-011-1/+1
| | | | Continuing the previous patch.
* main_notify: renamed source to event_pipe.cMax Kellermann2009-01-011-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.
* removed os_compat.hMax Kellermann2008-12-291-1/+3
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* player_control: check if errored_song is setMax Kellermann2008-12-171-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.
* playlist: clear pc.errored_song on deleteMax Kellermann2008-12-171-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.
* pcm_volume: added constant PCM_VOLUME_1Max Kellermann2008-11-111-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.
* player: converted PLAYER_ERROR_* to enumMax Kellermann2008-11-031-1/+4
|
* player: no CamelCaseMax Kellermann2008-11-031-10/+10
| | | | | Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.