aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* conf: add a "database" blockMax Kellermann2012-08-081-6/+18
| | | | | The new block overrides the "db_file" setting, and allows configuring any database plugin.
* DatabaseGlue: pass block to db_init()Max Kellermann2012-08-081-1/+6
| | | | Let the caller take care for legacy conversion.
* main: don't call db_init() without databaseMax Kellermann2012-08-081-1/+0
| | | | Useless call.
* dbUtils.h: move to DatabaseQueue.hxx, DatabasePlaylist.hxxMax Kellermann2012-08-071-1/+0
|
* Fix processing of sticker database pathDan McGee2012-03-261-2/+1
| | | | | | | | | After a previous refactor, the current code fails on paths that need expansion (e.g, '~/.mpd/sticker.db'), because we are not passing the correct path to the sticker database code. Pass the expanded (and previously unused) string instead of the original string. Signed-off-by: Dan McGee <dan@archlinux.org>
* main: handle negative strtol return valueJonathan Neuschäfer2012-02-151-2/+3
| | | | | size_t is unsigned most of the time, so we can't really use it to check for negative values. Also handle strtol overflow.
* db_lock: new unified lock for songvec and dirvecMax Kellermann2012-01-211-6/+0
|
* audio: rename audio.[ch] to audio_config.[ch]Max Kellermann2011-10-101-1/+1
|
* pcm_resample: one-time global initializationMax Kellermann2011-10-081-0/+8
| | | | | Load the samplerate_converter on MPD startup. Fail if the converter name is invalid.
* db_plugin: introducing a plugin API for the song databaseMax Kellermann2011-09-101-22/+9
| | | | | | | | | | | First draft, not really pluggable currently - hard-coded to use the "simple" plugin, and calls several of its internal functions. The API is very simple currently, all searches are still performed over the root "directory" object. Future changes to the API will move those search implementations into the plugin, to allow more efficient implementations, or implementations that don't have the whole tree in memory all the time.
* database: return GError on failureMax Kellermann2011-09-091-2/+3
|
* conf: turn config_get_path() into config_dup_path()Max Kellermann2011-09-091-23/+78
| | | | | | | | | config_get_path() was somewhat flawed, because it pretended to be a function, when it really had a side effect. The second flaw was that it did not return the parser error, instead it aborted the whole process, which is bad style. The new function returns a duplicated (modified) string that must be freed by the caller, and returns a GError on failure.
* log: return GError on initialization failureMax Kellermann2011-09-091-1/+6
|
* io_thread: new thread for non-blocking background I/OMax Kellermann2011-08-241-0/+9
| | | | Try to eliminate the remaining blocking I/O.
* client_idle: add header client_idle.hMax Kellermann2011-01-291-0/+1
|
* copyright year 2011Max Kellermann2011-01-291-1/+1
|
* player_control: removed the global variable "pc"Max Kellermann2011-01-101-8/+11
| | | | | | | 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.
* eliminate g_error() usageThomas Jansen2010-09-251-12/+13
| | | | | | | | | | | | | | Replaced all occurrences of g_error() with MPD_ERROR() located in a new header file 'mpd_error.h'. This macro uses g_critical() to print the error message and then exits gracefully in contrast to g_error() which would internally call abort() to produce a core dump. The macro name is distinctive and allows to find all places with dubious error handling. The long-term goal is to get rid of MPD_ERROR() altogether. To facilitate the eventual removal of this macro it was added in a new header file rather than to an existing header file. This fixes #2995 and #3007.
* main: Add Windows Service supportDenis Krjuchkov2010-09-231-1/+27
| | | | | | | | | I've added PIPE_EVENT_SHUTDOWN because calling g_main_loop_quit() do not work when called from another thread. Main thread was sleeping in g_poll() so I needed some way to wake it up. By some strange reason call close(event_pipe[0]) in event_pipe_deinit() hangs. In current implementation that code never reached so that was not a problem :-) I've added a conditional to leave event_pipe[0] open on Win32.
* inotify: added setting "auto_update_depth"Max Kellermann2010-04-131-1/+2
| | | | | Limits the depth of the watched directories. This is useful to keep resource usage down and speed up MPD startup.
* replay_gain: moved code to replay_gain_config.cMax Kellermann2010-01-041-1/+1
|
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* output_init: use the normalize filter pluginMax Kellermann2009-12-251-3/+0
| | | | | | Use the plugin instead of the glue code in normalize.c. This is used wrapped inside a "autoconv" filter, to enable normalization for all input file formats.
* input_plugin: method init() returns errors with GErrorMax Kellermann2009-12-141-1/+7
| | | | | Not used by any plugin currently, but this eliminates the g_error() call in input_plugin_config(), so it's worth it.
* input_stream: moved input_stream_global_init() to input_init.cMax Kellermann2009-12-141-1/+1
|
* include config.h in all sourcesMax Kellermann2009-11-121-1/+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.
* configure.ac: require GLib 2.12Max Kellermann2009-11-101-0/+2
| | | | | | Drop the required GLib version from 2.16 to 2.12, because many current systems still don't have GLib 2.16. This requires several new compatibility functions in glib_compat.h.
* decoder_control: removed the global variable "dc"Max Kellermann2009-10-311-3/+0
| | | | | 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-3/+3
| | | | | | 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.
* mpd.conf: new bool config value for enabling/disabling inotify updateViliam Mateicka2009-10-261-2/+6
|
* add --disable-inotify for configure to disable inotify when autodetectedViliam Mateicka2009-10-241-0/+7
|
* output_plugin: added methods enable() and disable()Max Kellermann2009-10-231-0/+4
| | | | | | | 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.
* audio: removed function finishAudioConfig()Max Kellermann2009-10-221-1/+0
| | | | There's no point in clearing the audio format before exiting.
* main: put #ifdef inside winsock_init()Max Kellermann2009-10-221-5/+2
| | | | | This way, the function call in the main() function does not need another pair of #ifdef/#endif.
* main: call g_set_application_name()Max Kellermann2009-10-201-0/+2
| | | | | | I'm not sure about the advantages of calling g_set_application_name(), because I don't use a task manager (except for ps and kill), but it sure doesn't hurt.
* main: initialize playlist pluginsMax Kellermann2009-10-131-0/+3
|
* configure.ac: require GLib 2.16Max Kellermann2009-10-131-2/+0
| | | | | | | Accidently, MPD has been using several GLib 2.16 functions for a while, and nobody noticed yet. To simplify the code base, let's bump the minimum GLib version for MPD to 2.16. That version is old enough, and it's reasonable to expect users to have it.
* player_control: no CamelCaseMax Kellermann2009-10-081-1/+1
|
* automatically update the database with Linux inotifyMax Kellermann2009-09-251-0/+6
| | | | | | This patch implements a light-weight inotify library, and watches all directories below the music directory. It updates all directories where files changed after a delay of 5 seconds.
* command: added command "rescan"Max Kellermann2009-09-241-1/+1
| | | | | "rescan" is the same as "update", but it discards existing songs in the database.
* cmdline: handle fatal errors with GErrorMax Kellermann2009-09-241-1/+6
| | | | Don't call g_error(), which will abort the process and dump core.
* listen: handle fatal errors with GErrorMax Kellermann2009-09-241-1/+8
| | | | Don't call g_error(), which will abort the process and dump core.
* update: renamed directory_update_init() to update_enqueue()Max Kellermann2009-09-241-1/+1
|
* cmdline: removed options --create-db and --no-create-dbMax Kellermann2009-09-201-12/+4
| | | | | Both options are deprecated, and should not be used anymore. Many users get confused by their presence.
* cmdline: renamed options.stderr to options.log_stderrEugeny N Dzhurinsky2009-07-221-2/+2
| | | | | | | On FreeBSD, "stderr" is a macro, and using this name for a struct member breaks the build. [mk: renamed _stderr to log_stderr]
* 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.