aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* player_control: removed the global variable "pc"Max Kellermann2011-01-101-39/+40
| | | | | | | 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.
* Add support for MixRamp tagsTim Phipps2010-03-211-0/+14
| | | | | 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: removed the "volatile" attributeMax Kellermann2009-11-091-2/+2
| | | | | Our use of the "volatile" keyword was wrong from the start, and now that we have proper locking, we can safely remove all of them.
* decoder_control: make the song objects constMax Kellermann2009-11-031-1/+1
| | | | They are just informational.
* decoder_control: removed the global variable "dc"Max Kellermann2009-10-311-1/+3
| | | | | 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-4/+74
| | | | | | 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/+9
| | | | | | | 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/+6
| | | | | | | | | | | | | | | 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-1/+0
| | | | | Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the same. PLAYER_COMMAND_PLAY is redundant.
* player_control: no CamelCaseMax Kellermann2009-10-081-15/+24
|
* player_control: bundle "get" functions in pc_get_status()Max Kellermann2009-10-081-11/+10
| | | | | | 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-0/+5
| | | | This lets us eliminate the static fixed-size buffer.
* output: use the software mixer pluginMax Kellermann2009-07-061-3/+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: renamed playerSeek(), return boolMax Kellermann2009-05-061-2/+8
| | | | | 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-3/+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/+3
| | | | | | | | 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_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.
* player_control: fix shadow warning with older gccMax Kellermann2009-01-161-1/+1
| | | | Older gcc versions complained about shadowed parameters in prototypes.
* playlist: clear pc.errored_song on deleteMax Kellermann2008-12-171-0/+8
| | | | | When a (remote) song is deleted from the playlist, there may still be a reference to it in pc.errored_song. Clear this reference.
* player: converted PLAYER_ERROR_* to enumMax Kellermann2008-11-031-8/+10
|
* player: removed "volatile" attributesMax Kellermann2008-11-031-6/+6
| | | | | Removed the "volatile" attributes from several variables which are not important for synchronization.
* player: no CamelCaseMax Kellermann2008-11-031-7/+7
| | | | | Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.
* added prefix to header macrosMax Kellermann2008-10-311-2/+2
| | | | | | | "LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
* player: added commands QUEUE and CANCELMax Kellermann2008-10-121-42/+15
| | | | | | 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.
* player: removed player_control.fileTimeMax Kellermann2008-10-111-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.
* player: added player_get_audio_format()Max Kellermann2008-10-101-5/+5
| | | | | player_get_audio_format() replaces getPlayerSampleRate(), getPlayerBits(), getPlayerChannels().
* player: added player_control.audio_formatMax Kellermann2008-10-101-5/+4
| | | | This replaces the attributes bits, channels, sampleRate.
* don't include os_compat.hMax Kellermann2008-10-081-1/+2
| | | | | When there are standardized headers, use these instead of the bloated os_compat.h.
* notify: removed the "Notify" typedefMax Kellermann2008-10-081-1/+1
| | | | Typedefs shouldn't be used, use the bare struct names instead.
* song: converted typedef Song to struct songMax Kellermann2008-10-081-7/+10
| | | | Again, a data type which can be forward-declared.
* assume stdint.h and stddef.h are availableMax Kellermann2008-09-291-1/+0
| | | | | | Since we use a C99 compiler now, we can assert that the C99 standard headers are available, no need for complicated compile time checks. Kill mpd_types.h.
* switch to C99 types, part IIMax Kellermann2008-09-291-7/+7
| | | | | Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
* notify: added notify_deinit()Max Kellermann2008-09-241-0/+2
| | | | Destroy the mutex when it is not used anymore.
* moved player_command_finished() to player_thread.cMax Kellermann2008-08-261-2/+0
|
* moved code to pc_init(), dc_init()Max Kellermann2008-08-261-0/+4
|
* renamed player.c to player_control.cMax Kellermann2008-08-261-0/+162
Give player.c a better name, meaning that the code is used to control the player thread.