Commit Graph

4574 Commits

Author SHA1 Message Date
Max Kellermann 38e9205d4e command: use the tokenizer library 2009-07-19 15:15:36 +02:00
Max Kellermann 16ff44ad30 conf: use the tokenizer library 2009-07-19 15:11:37 +02:00
Max Kellermann 1745e68795 tokenizer: new library replacing buffer2array()
The new code is more robust and more flexible.  It provides detailed
error information in GError objects.
2009-07-19 15:11:36 +02:00
Michal Nazarewicz 809c96b53f daemon: Moved empty Windows version functions to header file
On Windows only daemonize_close_stdin() function does
something.  Other functions are either empty or generate an
error.  Those have been moved to header file and declared
static inline so compiler can remove the call all together.
2009-07-19 08:18:23 +02:00
Michal Nazarewicz 03e43356ce conf: replaced gcc "const" attribute with "pure"
The functions were not "const" (they examined values pointed
by arguments passed to them, quoting gcc's doc: "Note that
a function that has pointer arguments and examines the data
pointed to must _not_ be declared 'const'.") but rather
"pure" and still not all of them.

Note also, that even some of the functions declared "pure"
are not pure, however, due to reasons stated in source code
the attribute has been kept.
2009-07-19 08:18:08 +02:00
Michal Nazarewicz d718a8b59d daemon: added "group" configuration option
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).
2009-07-19 08:17:55 +02:00
Max Kellermann a988b9b025 ape: check the tag size (fixes integer underflow)
The expression "tagLen - size > 0" may result in an integer underflow
and a buffer overflow, when "size" is larger than "tagLen".  "size" is
read from the input file, and must not be trusted.  This patch changes
the expression to "tagLen > size", which is a lot safer.
2009-07-18 22:45:56 +02:00
Max Kellermann c8c91d9aaa configure.ac: fix the --enable-alsa help string
--enable means "enable", not "disable".
2009-07-17 17:50:55 +02:00
Max Kellermann 4100035b19 Merged release 0.15.1 from branch 'v0.15.x' 2009-07-16 07:37:13 +02:00
Avuton Olrich 19f1bfdf40 Modify version string to post-release version 0.15.2~git 2009-07-15 13:36:41 -07:00
Avuton Olrich d7bad6ae02 mpd version 0.15.1 2009-07-15 13:36:41 -07:00
Max Kellermann 9bef46c0da mapper: use g_file_test() instead of stat()
The GLib functions are more portable.
2009-07-15 18:58:24 +02:00
Max Kellermann c134adbcbf mapper: pass music and playlist directory to mapper_init()
Added another glue function in main().
2009-07-15 18:58:19 +02:00
Max Kellermann 7bc8c7518b main: moved complex initialization code to glue functions
The glue_*() functions act as a glue between MPD's main() function and
its libraries.  They handle disabled features, and pass validated
configuration options.
2009-07-15 18:58:12 +02:00
Max Kellermann 739984f920 main: renamed openDB() to glue_db_init_and_load()
No CamelCase.
2009-07-15 18:58:10 +02:00
Max Kellermann 7261739526 cmdline: renamed option "--stdout" to "--stderr"
Since version 0.14, MPD has been logging to standard error instead of
standard output.  The option name should reflect that.  The old option
continues to work, we will remove it in a future MPD release.
2009-07-15 18:27:32 +02:00
Max Kellermann 62f9df98b4 cmdline: no CamelCase
Renamed type, variables and functions.
2009-07-15 18:22:49 +02:00
Max Kellermann c76f71e8d6 conf: added the gcc "const" attribute to some functions
Add the "const" attribute to functions when their return value only
depends on parameters.  This allows gcc to eliminate some function
calls.
2009-07-15 17:12:48 +02:00
Max Kellermann f0157f6fa1 Makefile.am: disable test/run_encoder without plugins
If the encoder plugin API is disabled at compile time, don't compile
test/run_encoder.c.
2009-07-15 16:59:06 +02:00
Max Kellermann f7cc5b2efd state_file: don't rewind the stream while reading the state file
Parse the state file line by line, let each subsystem probe a line.
Only the playlist_state code gets the FILE pointer to read the
following lines.
2009-07-15 16:57:37 +02:00
Max Kellermann df7d7732c6 state_file: simplified state_file_finish()
Return early from the destructor function when there is no configured
state file.  Don't check the timer, don't call g_free(NULL).
2009-07-15 14:32:29 +02:00
Max Kellermann 889b1c1eae state_file: fixed debug messages
Print "Loading" instead of "Saving" in state_file_read().  Added debug
message to state_file_write().
2009-07-15 14:29:30 +02:00
Serge Ziryukin 297d749fc8 modplug: get track length 2009-07-15 11:22:45 +02:00
Max Kellermann 6233de0546 encoder/twolame: new encoder plugin based on libtwolame
This encoder plugin is a replacement for the LAME encoder plugin for
those who prefer a "free" (non-patent encumbered) encoder library.
Most of the plugin source code is copied from the LAME encoder plugin,
since the LAME and TwoLAME APIs are nearly the same.
2009-07-14 23:07:41 +02:00
Max Kellermann b1afa40fc1 configure.ac: use more MPD_AUTO_PKG()
Fail when a feature is enabled, but the library is not found.
2009-07-14 21:38:49 +02:00
Max Kellermann a620e936cc Makefile.am: use WAVPACK_CFLAGS and WAVPACK_LIBS
Don't append these to MPD_CFLAGS and MPD_LIBS.
2009-07-14 21:29:01 +02:00
Max Kellermann d897170455 playlist: no CamelCase 2009-07-14 21:28:36 +02:00
Max Kellermann 5a886da93b playlist: removed {save,read}PlaylistState()
Those were only wrappers for playlist_state_{save,restore}().  Since
sf_callbacks has been removed, we can call the latter functions
directly.
2009-07-14 21:28:26 +02:00
Max Kellermann 9206f54979 state_file: eliminated the sf_callbacks array
There are very few callbacks, and they are not meant to be pluggable.
Let's eliminate the array and call the load/save functions manually.
2009-07-14 21:15:12 +02:00
Max Kellermann 966a886ef5 NEWS: fixed typo 2009-07-14 14:24:02 +02:00
Max Kellermann 0c1c753e23 configure.ac: fail when ffmpeg is enabled, but not found 2009-07-14 14:23:49 +02:00
Max Kellermann 58dd6eee5d output/httpd: removed duplicate sys/types.h include
The first patch by Patrick didn't work, because his "#ifdef HAVE_OSX"
line would have required config.h.
2009-07-14 14:23:44 +02:00
Serge Ziryukin 75c0a33ec5 flac: load external cue sheet when no internal one
External cue sheet file for "file.flac" should be named as "file.flac.cue".
2009-07-09 19:01:24 +02:00
Bart Nagel 8ae9b45da0 Implement ArtistSort tag 2009-07-09 19:00:41 +02:00
Max Kellermann 1eebbc746f decoder/sndfile: new decoder plugin based on libsndfile 2009-07-07 08:58:51 +02:00
Max Kellermann adb2f66ced tag_id3: revised "performer" tag support
According to the ID3 2.4 documentation, "TOPE" is "Original
artist/performer", not "performer".  Removed "TOPE" support.  Instead,
map TPE3 ("Conductor/performer refinement") and TPE4 ("Interpreted,
remixed, or otherwise modified by") to "performer".
2009-07-07 08:00:21 +02:00
Max Kellermann 7246d67263 tag: added tag "AlbumArtistSort"
The tag_id3.c library supports both the documented "TSO2" tag, and the
inofficial TXXX/ALBUMARTISTSORT.

The Vorbis/FLAC decoder automatically supports the new tag, without
further change.
2009-07-07 07:36:25 +02:00
Max Kellermann 971fbe5d8e Makefile.am: disable test/run_encoder without plugins
If the encoder plugin API is disabled at compile time, don't compile
test/run_encoder.c.
2009-07-06 22:50:07 +02:00
Max Kellermann 45df3e5e54 main: fix "unused local variable" warning
The variables "success" and "error" are only used if SQLite support is
enabled.
2009-07-06 22:48:34 +02:00
Sébastien Houzé 468b7d3aea player_thread: log played song in "default" log mode
Very few lines to log a song URI when it has been entirely played.
Then mpd logs can be parsed to do statistics.
2009-07-06 22:29:58 +02:00
Max Kellermann ce517ad5d8 doc: documented the "shout" output plugin settings 2009-07-06 22:25:28 +02:00
Max Kellermann 0e383fbec2 doc: documented the "pulse" output plugin settings 2009-07-06 22:17:27 +02:00
Max Kellermann 47cf647ef6 doc: documented the "command" setting of the "pipe" output plugin 2009-07-06 22:15:36 +02:00
Max Kellermann c0c5119788 decoder/flac: fix assertion failure in tag_free() call
Initialize flac_data.tag right after flac_data_init().  This way, the
"goto fail" won't jump to the point where tag_free(NULL) can be
called.
2009-07-06 22:09:30 +02:00
Max Kellermann 0275690b5c output: use the software mixer plugin
Do all the software volume stuff inside each output thread, not in the
player thread.  This allows one software mixer per output device, and
also allows the user to configure the mixer type (hardware or
software) for each audio output.

This moves the global "mixer_type" setting into the "audio_output"
section, deprecating the "mixer_enabled" flag.
2009-07-06 22:00:50 +02:00
Max Kellermann da8095db54 mixer_all: added mixer_all_set_software_volume()
The special-purpose function is used for saving/restore the software
volume control to the state file.
2009-07-06 21:52:29 +02:00
Max Kellermann 5d74b1efef mixer/software: new mixer which controls filter/volume
This mixer plugin may be used instead of the traditional global
software mixer.  It integrates with the "volume" filter plugin, and
can control the software volume of an audio output which has no
hardware mixer.
2009-07-06 21:52:15 +02:00
Max Kellermann d3b5574d7a volume: moved range check to handle_setvol()
Converted the range checks in volume_level_change() to assertions.
Changed all volume types to "unsigned", expect for those which must be
able to indicate error (-1).
2009-07-06 21:52:10 +02:00
Max Kellermann 90472526e0 volume, mixer: removed the "relative" parameter
Since the "volume" command has been removed, nobody uses relative
volumes anymore.
2009-07-06 21:51:24 +02:00
Max Kellermann 206392ad1a command: removed the "volume" command
This command has been deprecated more than 5 years ago (0.10.0).  Its
implementation is a kludge, let's remove it now.
2009-07-06 21:51:00 +02:00