aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-03-06pipe: added music_buffer, rewrite music_pipeMax Kellermann1-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.
2009-03-03music_pipe: moved struct music_chunk to chunk.hMax Kellermann1-0/+1
2009-03-02database: db_load() returns GErrorMax Kellermann1-1/+5
Do error reporting with GLib's GError library.
2009-02-24listen: no CamelCaseMax Kellermann1-2/+2
Renamed functions.
2009-02-10output_all: no CamelCaseMax Kellermann1-2/+2
Renamed functions and variables.
2009-02-10audio: moved code to output_all.cMax Kellermann1-0/+1
Moved code which deals with all audio outputs at once into a separate library.
2009-02-04playlist: renamed global "playlist" variable to "g_playlist"Max Kellermann1-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.
2009-02-02main: don't pass argv[0] to openDB()Max Kellermann1-6/+4
Don't mention the program name in the error message.
2009-02-02main: create database after daemonizationMax Kellermann1-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.
2009-01-25mixer: configure legacy mixer before the audio outputsMax Kellermann1-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().
2009-01-25conf: const pointers in block get functionsMax Kellermann1-1/+1
All config_get_block_*() functions should accept constant config_param pointers.
2009-01-25stored_playlist: moved configuration variables from playlist.cMax Kellermann1-0/+2
Don't declare and export variables specific to stored playlists in playlist.c/playlist.h.
2009-01-25player_thread: start decoder thread in player threadMax Kellermann1-2/+0
Start the decoder thread when the player thread starts. The decoder thread is already stopped by the player thread.
2009-01-19sticker: new library for storing dynamic information about songsMax Kellermann1-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.
2009-01-18daemon: pass "detach" flag to daemonize()Max Kellermann1-1/+1
This way, we don't have to pass the full "Options" object to daemonize().
2009-01-18daemon: added daemonize_init(), daemonize_finish()Max Kellermann1-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.
2009-01-18main: moved the save_state timer to state_file.cMax Kellermann1-18/+0
The state_file library should manage its own regular saves.
2009-01-18state_file: added state_file_init() and state_file_finish()Max Kellermann1-2/+3
The constructor/destructor interface should hide the functions read_state_file() and write_state_file().
2009-01-18conf: added config_get_path()Max Kellermann1-5/+6
config_get_path() is an simpler interface than parseConfigFilePath().
2009-01-18removed playerData.cMax Kellermann1-5/+55
Fetch the configuration variables buffered_chunks and buffered_before_play just when they are needed.
2009-01-18main: moved code to daemon.cMax Kellermann1-98/+3
Moved changeToUser(), cleanUpPidFile(), killFromPidFile() to daemon.c. These are daemonization functions.
2009-01-18mapper: make the music_directory optionalMax Kellermann1-1/+10
Without a music_directory, MPD is an excellent streaming client.
2009-01-18database: pass database file name to db_init()Max Kellermann1-1/+4
Don't include conf.h in database.c.
2009-01-18stats: use GTimer instead of time(NULL)Max Kellermann1-0/+1
time(NULL) shows the wrong results when the machine's clock is changed.
2009-01-18stats: no CamelCaseMax Kellermann1-1/+1
Renamed functions and types.
2009-01-17conf: no CamelCase, part IMax Kellermann1-5/+7
Renamed functions, types, variables.
2009-01-10main: remove "save_state" timer event on exitMax Kellermann1-1/+4
2009-01-10main: deinitialize main_notify on exitMax Kellermann1-0/+1
2009-01-08added missing explicit config.h includesMax Kellermann1-1/+1
2009-01-05configure.ac: use AC_CHECK_HEADERS to check for locale.hMax Kellermann1-2/+2
AC_CHECK_HEADERS defines HAVE_LOCALE_H, so we don't have to manually define HAVE_LOCALE.
2009-01-04database: use stdboolMax Kellermann1-2/+3
Make db_load(), db_save() and db_check() return bool instead of int.
2009-01-04database: db_init() initializes library, does not updateMax Kellermann1-1/+10
For updating the database, directory_update_init() should be called explicitly.
2009-01-04don't exit after --create-dbMax Kellermann1-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.
2009-01-03event_pipe: moved variable "main_task" to main.cMax Kellermann1-0/+2
2009-01-02main: include main.h, fix dependenciesMax Kellermann1-0/+1
2009-01-02event_pipe: replaced PIPE_EVENT_SIGNAL with main_notifyMax Kellermann1-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.
2009-01-01event_pipe: added pipe_event enum and callbacksMax Kellermann1-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.
2009-01-01event_pipe: renamed functions from main_notify_* to event_pipe_*Max Kellermann1-2/+2
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-31Moving mixers to audio outputsViliam Mateicka1-3/+2
2008-12-31client: run client_manager_expire() in an idle eventMax Kellermann1-1/+0
With the GLib main loop, the client manager can install its own event in case a client is expired. No need for main.c to call client_manager_expire() manually.
2008-12-30main: export the main_loop variableMax Kellermann1-1/+2
Other libraries may need to access the main_loop reference, to add or remove events, or to call g_main_loop_quit().
2008-12-30main: use the GLib main loopMax Kellermann1-17/+33
This is a rather huge patch, which unfortunately cannot be splitted. Instead of using our custom ioops.h library, convert everything to use the GLib main loop.
2008-12-30listen: moved redirect_stdin() to daemon.cMax Kellermann1-0/+2
redirect_stdin() is a daemonization function, and disconnecting from the standard input is always a good idea for MPD.
2008-12-30main: moved daemonize() to daemon.cMax Kellermann1-59/+1
2008-12-29main: disable non-portable code on WIN32Max Kellermann1-0/+14
Disable changeToUser(), daemonize(), killFromPidFile().
2008-12-29main: use g_setenv() instead of setenv()Max Kellermann1-42/+1
Removed the fallback setenv() implementation for solaris.
2008-12-29main: use GLib loggingMax Kellermann1-33/+34
2008-12-29removed os_compat.hMax Kellermann1-1/+8
Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
2008-12-28tag & tag_pool: migrate from pthread to glib threadsThomas Jansen1-0/+3