| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Don't free the string right after calling log_init_file(). Add a new
function log_deinit() that frees the string on shutdown.
This fixes cycling the log file after SIGHUP (Mantis ticket 0003524).
|
|\|
| |
| |
| |
| | |
Conflicts:
src/mapper.h
|
| |
| |
| |
| | |
MPD requires GLib 2.16.
|
| |
| |
| |
| | |
Eliminates explicit global initialisation.
|
| |
| |
| |
| |
| | |
The new block overrides the "db_file" setting, and allows configuring
any database plugin.
|
| |
| |
| |
| | |
Let the caller take care for legacy conversion.
|
| |
| |
| |
| | |
Useless call.
|
|/ |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
size_t is unsigned most of the time, so we can't really use it to
check for negative values. Also handle strtol overflow.
|
| |
|
| |
|
|
|
|
|
| |
Load the samplerate_converter on MPD startup. Fail if the converter
name is invalid.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Try to eliminate the remaining blocking I/O.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Limits the depth of the watched directories. This is useful to keep
resource usage down and speed up MPD startup.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Not used by any plugin currently, but this eliminates the g_error()
call in input_plugin_config(), so it's worth it.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Allocate a decoder_control object where needed, and pass it around.
This will allow more than one decoder thread one day.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
There's no point in clearing the audio format before exiting.
|
|
|
|
|
| |
This way, the function call in the main() function does not need
another pair of #ifdef/#endif.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
"rescan" is the same as "update", but it discards existing songs in
the database.
|
|
|
|
| |
Don't call g_error(), which will abort the process and dump core.
|
|
|
|
| |
Don't call g_error(), which will abort the process and dump core.
|
| |
|
|
|
|
|
| |
Both options are deprecated, and should not be used anymore. Many
users get confused by their presence.
|
|
|
|
|
|
|
| |
On FreeBSD, "stderr" is a macro, and using this name for a struct
member breaks the build.
[mk: renamed _stderr to log_stderr]
|