aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* playlist: use the "enum player_error" typeMax Kellermann2009-01-211-1/+1
| | | | Don't assign the result of getPlayerError() to an integer.
* playlist: free memory with g_free()Max Kellermann2009-01-211-10/+5
| | | | | Use g_free() consistently with g_malloc(). Don't clear the pointers after freeing them.
* player_thread: request next song only if new one starts playingMax Kellermann2009-01-211-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.
* use config_get_positive() instead of manual parsingMax Kellermann2009-01-213-81/+21
| | | | | Simplify some code by using config_get_positive(), instead of doing manual parsing and validation each time.
* conf: added config_get_positive()Max Kellermann2009-01-212-0/+23
| | | | | This convenience function parses a configuration value into a positive integer. It aborts if parsing fails.
* archiveapi: adding seeking support in zip archivesViliam Mateicka2009-01-211-2/+8
|
* player_thread: eliminated duplicate PLAYLIST eventMax Kellermann2009-01-201-2/+0
| | | | | player_wait_for_decoder() emits the PLAYLIST event on success, remove the duplicate PLAYLIST event in its caller.
* event_pipe: added "TAG" eventMax Kellermann2009-01-204-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.
* Add space after sticker: to make it consistent.Qball Cow2009-01-201-1/+1
|
* command: added "sticker" commandMax Kellermann2009-01-191-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.
* update: delete stickers of deleted songsMax Kellermann2009-01-191-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).
* sticker: added song sticker libraryMax Kellermann2009-01-193-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.
* sticker: new library for storing dynamic information about songsMax Kellermann2009-01-196-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.
* flac: include config.hMax Kellermann2009-01-191-0/+1
| | | | | The plugin queries build-time configuration variables, and should include config.h.
* output: don't include conf.h from output_control.hMax Kellermann2009-01-181-2/+1
| | | | Minimize header dependencies.
* conf: added config_get_block_unsigned()Max Kellermann2009-01-186-39/+33
| | | | Eliminate some more getBlockParam() invocations.
* conf: added config_get_block_string()Max Kellermann2009-01-1811-98/+95
| | | | This replaces lots of getBlockParam() invocations.
* jack: parse "ports" setting with g_strsplit()Max Kellermann2009-01-181-20/+7
| | | | Don't modify the configured string.
* jack: use audio_output_get_name()Max Kellermann2009-01-181-11/+1
| | | | | Determine the audio output name with audio_output_get_name() instead of obtaining the name from the configuration again.
* conf: removed parseConfigFilePath()Max Kellermann2009-01-183-46/+19
| | | | Use config_get_path() instead in mapper.c.
* mixer: don't check for NULL before g_free()Max Kellermann2009-01-182-16/+11
| | | | | The g_free() function includes a NULL check. We don't have to do it twice.
* daemon: removed unused variable "userpwd"Max Kellermann2009-01-181-8/+4
| | | | This causes a segmentation fault...
* daemon: pass "detach" flag to daemonize()Max Kellermann2009-01-183-6/+7
| | | | | This way, we don't have to pass the full "Options" object to daemonize().
* daemon: added daemonize_init(), daemonize_finish()Max Kellermann2009-01-183-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.
* main: moved the save_state timer to state_file.cMax Kellermann2009-01-182-20/+26
| | | | The state_file library should manage its own regular saves.
* state_file: added state_file_init() and state_file_finish()Max Kellermann2009-01-183-24/+40
| | | | | The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
* state_file: include cleanupMax Kellermann2009-01-182-3/+0
|
* conf: added config_get_path()Max Kellermann2009-01-183-5/+32
| | | | config_get_path() is an simpler interface than parseConfigFilePath().
* removed playerData.cMax Kellermann2009-01-185-107/+55
| | | | | Fetch the configuration variables buffered_chunks and buffered_before_play just when they are needed.
* main: moved code to daemon.cMax Kellermann2009-01-183-98/+119
| | | | | Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
* mapper: make the music_directory optionalMax Kellermann2009-01-186-31/+90
| | | | Without a music_directory, MPD is an excellent streaming client.
* mapper: make the playlist directory optionalMax Kellermann2009-01-185-16/+52
|
* database: pass database file name to db_init()Max Kellermann2009-01-183-40/+45
| | | | Don't include conf.h in database.c.
* stats: use GTimer instead of time(NULL)Max Kellermann2009-01-183-3/+13
| | | | | time(NULL) shows the wrong results when the machine's clock is changed.
* stats: use one db_walk() to obtain statsMax Kellermann2009-01-183-73/+44
| | | | | Don't use dbUtils.h functions. This reduces 4 full database walks to just one.
* stats: added num_artists, num_albumsMax Kellermann2009-01-182-8/+16
| | | | | Don't recalculate the number of artists and albums each time a client requests statistics. Calculate that once in stats_update().
* stats: no CamelCaseMax Kellermann2009-01-184-23/+26
| | | | Renamed functions and types.
* conf: replaced getConfigParamValue() with config_get_string()Max Kellermann2009-01-175-9/+12
| | | | Don't return a writable pointer.
* conf: replaced getBoolBlockParam() with config_get_block_bool()Max Kellermann2009-01-174-21/+23
| | | | No "force" parameter, pass a default value instead.
* conf: use config_get_bool() instead of getBoolConfigParam()Max Kellermann2009-01-176-33/+16
|
* conf: no CamelCase, part IMax Kellermann2009-01-1740-170/+204
| | | | Renamed functions, types, variables.
* song: skip archive check for non-musicdir filesMax Kellermann2009-01-171-1/+1
| | | | | | If a song is not within the music directory ("file:///..."), it has no "parent directory". The archive code nonetheless dereferences the parent pointer, causing a segmentation fault. Check parent!=NULL.
* decoder_api: always notify_wait() for free chunksMax Kellermann2009-01-171-2/+1
| | | | | | | One of the previous patches made MPD consume 100% CPU in a busy wait: when the music_pipe was full, it did not wait (with notify_wait()) for free chunks, because a variable has a different meaning now. Always pass "true" as the "wait" parameter.
* moved fallback APE/ID3 tag loader to song.cMax Kellermann2009-01-177-58/+55
| | | | | | Some plugins used the APE or ID3 tag loader as a fallback when their own methods of loading tags did not work. Move this code out of all decoder plugins, into song_file_update().
* decoder_api: pass const pointer to decoder_data()Max Kellermann2009-01-172-2/+3
|
* pcm_convert: return PCM buffer from pcm_convert()Max Kellermann2009-01-177-86/+43
| | | | | | Removed yet another superfluous buffer layer: return the PCM buffer from pcm_convert() instead of copying PCM data into the caller-supplied buffer.
* music_pipe: removed music_pipe_append()Max Kellermann2009-01-172-39/+0
| | | | | The function is unused, since decoder_api() uses music_pipe_write() / music_pipe_expand() now.
* decoder_api: use music_pipe_write() instead of music_pipe_append()Max Kellermann2009-01-171-14/+33
| | | | | Copy PCM data to the music_pipe_write() buffer, and apply replay gain / normalization to it, instead of manipulating the source buffer.
* music_pipe: added functions music_pipe_write() and music_pipe_expand()Max Kellermann2009-01-172-32/+64
| | | | | | | This new API gives the caller a writable buffer to the music pipe chunk. This may allow the caller to eliminate several buffer copies, because it may manipulate the returned buffer, until it calls music_pipe_expand().
* oggvorbis: disable seeking on remote songsMax Kellermann2009-01-171-5/+27
| | | | | | | | | | | | When libvorbis knows that a song is seekable, it seeks around like crazy in the file before starting to decode it. This is very expensive on remote HTTP resources, and delays MPD for 10 or 20 seconds. This patch disables seeking on remote songs, because the advantages of quickly playing a song seem to weigh more than the theoretical ability of seeking for most MPD users. If users feel this feature is needed, we will make a configuration option for that.