aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* daemon: added "group" configuration optionMichal Nazarewicz2009-07-191-0/+1
| | | | | | | | | | | | | The "group" configuration option is similar to "user" as it sets user set what group MPD shall run as. With "user" option, MPD changed GID to the GID of the user, however, more control could be desired. Moreover, the patch changes the way of checking whether no setuid(2)/setgid(2) is required -- previously user names were compered, now UID and GIDs are compered (ie. the one we already have (getuid(2)/getgid(2)) with the one we want to change to).
* mapper: pass music and playlist directory to mapper_init()Max Kellermann2009-07-151-1/+17
| | | | Added another glue function in main().
* main: moved complex initialization code to glue functionsMax Kellermann2009-07-151-17/+36
| | | | | | The glue_*() functions act as a glue between MPD's main() function and its libraries. They handle disabled features, and pass validated configuration options.
* main: renamed openDB() to glue_db_init_and_load()Max Kellermann2009-07-151-2/+2
| | | | No CamelCase.
* cmdline: no CamelCaseMax Kellermann2009-07-151-7/+7
| | | | Renamed type, variables and functions.
* playlist: no CamelCaseMax Kellermann2009-07-141-2/+2
|
* main: fix "unused local variable" warningMax Kellermann2009-07-061-0/+2
| | | | | The variables "success" and "error" are only used if SQLite support is enabled.
* sticker: use GError for error handlingMax Kellermann2009-07-051-1/+6
|
* conf: log unused/unknown block parametersMax Kellermann2009-06-251-0/+2
|
* Winsock2 is needed on MinGW (or other pure Win32 toolchains) forSean McNamara2009-03-271-0/+36
| | | | networking, select(), ntohl(), etc.
* log: removed DEBUG() and FATAL()Max Kellermann2009-03-151-3/+3
| | | | Use GLib the logging functions g_debug(), g_error() instead.
* 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-4/+1
| | | | | | | | 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.
* music_pipe: moved struct music_chunk to chunk.hMax Kellermann2009-03-031-0/+1
|
* database: db_load() returns GErrorMax Kellermann2009-03-021-1/+5
| | | | Do error reporting with GLib's GError library.
* listen: no CamelCaseMax Kellermann2009-02-241-2/+2
| | | | Renamed functions.
* output_all: no CamelCaseMax Kellermann2009-02-101-2/+2
| | | | Renamed functions and variables.
* audio: moved code to output_all.cMax Kellermann2009-02-101-0/+1
| | | | | Moved code which deals with all audio outputs at once into a separate library.
* playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann2009-02-041-1/+0
| | | | | | | Export the "g_playlist" variable, and pass it to all playlist functions. This way, we can split playlist.c easier into separate parts. The code which initializes the singleton variable is moved to playlist_global.c.
* main: don't pass argv[0] to openDB()Max Kellermann2009-02-021-6/+4
| | | | Don't mention the program name in the error message.
* main: create database after daemonizationMax Kellermann2009-02-021-8/+29
| | | | | | | When the update thread is started before MPD has forked (for daemonization), it is killed, because threads do not survive a fork(). This induces an inconsistent state where MPD won't start any update thread at all, because it thinks the thread is already running.
* mixer: configure legacy mixer before the audio outputsMax Kellermann2009-01-251-1/+1
| | | | | | | | | Reimplemented the legacy mixer configuration: copy the deprecated configuration values into the audio_output section. Don't configure the mixers twice (once for the audio_output, and a second time for the legacy values). This requires volume_init() to be called before initAudioDriver().
* conf: const pointers in block get functionsMax Kellermann2009-01-251-1/+1
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* stored_playlist: moved configuration variables from playlist.cMax Kellermann2009-01-251-0/+2
| | | | | Don't declare and export variables specific to stored playlists in playlist.c/playlist.h.
* player_thread: start decoder thread in player threadMax Kellermann2009-01-251-2/+0
| | | | | Start the decoder thread when the player thread starts. The decoder thread is already stopped by the player thread.
* sticker: new library for storing dynamic information about songsMax Kellermann2009-01-191-0/+12
| | | | | | | "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.
* daemon: pass "detach" flag to daemonize()Max Kellermann2009-01-181-1/+1
| | | | | This way, we don't have to pass the full "Options" object to daemonize().
* daemon: added daemonize_init(), daemonize_finish()Max Kellermann2009-01-181-1/+4
| | | | | | 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-181-18/+0
| | | | The state_file library should manage its own regular saves.
* state_file: added state_file_init() and state_file_finish()Max Kellermann2009-01-181-2/+3
| | | | | The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
* conf: added config_get_path()Max Kellermann2009-01-181-5/+6
| | | | config_get_path() is an simpler interface than parseConfigFilePath().
* removed playerData.cMax Kellermann2009-01-181-5/+55
| | | | | Fetch the configuration variables buffered_chunks and buffered_before_play just when they are needed.
* main: moved code to daemon.cMax Kellermann2009-01-181-98/+3
| | | | | Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
* mapper: make the music_directory optionalMax Kellermann2009-01-181-1/+10
| | | | Without a music_directory, MPD is an excellent streaming client.
* database: pass database file name to db_init()Max Kellermann2009-01-181-1/+4
| | | | Don't include conf.h in database.c.
* stats: use GTimer instead of time(NULL)Max Kellermann2009-01-181-0/+1
| | | | | time(NULL) shows the wrong results when the machine's clock is changed.
* stats: no CamelCaseMax Kellermann2009-01-181-1/+1
| | | | Renamed functions and types.
* conf: no CamelCase, part IMax Kellermann2009-01-171-5/+7
| | | | Renamed functions, types, variables.
* main: remove "save_state" timer event on exitMax Kellermann2009-01-101-1/+4
|
* main: deinitialize main_notify on exitMax Kellermann2009-01-101-0/+1
|
* added missing explicit config.h includesMax Kellermann2009-01-081-1/+1
|
* configure.ac: use AC_CHECK_HEADERS to check for locale.hMax Kellermann2009-01-051-2/+2
| | | | | AC_CHECK_HEADERS defines HAVE_LOCALE_H, so we don't have to manually define HAVE_LOCALE.
* database: use stdboolMax Kellermann2009-01-041-2/+3
| | | | Make db_load(), db_save() and db_check() return bool instead of int.
* database: db_init() initializes library, does not updateMax Kellermann2009-01-041-1/+10
| | | | | For updating the database, directory_update_init() should be called explicitly.
* don't exit after --create-dbMax Kellermann2009-01-041-6/+1
| | | | | Start the daemon after --create-db. This makes --create-db a flag which discards the old database and starts with a fresh one.
* event_pipe: moved variable "main_task" to main.cMax Kellermann2009-01-031-0/+2
|
* main: include main.h, fix dependenciesMax Kellermann2009-01-021-0/+1
|
* event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann2009-01-021-0/+3
| | | | | | 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: added pipe_event enum and callbacksMax Kellermann2009-01-011-10/+10
| | | | | | | | | Make the event_pipe (formerly main_notify) send/receive a set of events, with a callback for each one. The default event PIPE_EVENT_SIGNAL does not have a callback. It is still there for waking up the main thread, when it is waiting for the player thread.
* event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann2009-01-011-2/+2
| | | | Continuing the previous patch.