Commit Graph

3291 Commits

Author SHA1 Message Date
Max Kellermann
4b3a055ffe mikmod: use Glib instead of utils.h/log.h 2008-12-28 19:48:53 +01:00
Max Kellermann
4ca02bfcfc mikmod: convert mod_Data.audio_buffer to a static array
Don't do two allocations for the mod_Data structure.
2008-12-28 19:48:53 +01:00
Max Kellermann
7f78ed5b98 log: use GLib logging 2008-12-28 19:48:53 +01:00
Max Kellermann
59cf77bbc8 log: don't keep log file open
The log file is duped to STDOUT_FILENO and STDERR_FILENO.  No need to
keep another copy of it in out_fd all the time.  We only need it once
once in setup_log_output().
2008-12-28 19:48:53 +01:00
Max Kellermann
8fe03b8bce decoder: terminate decoder thread before MPD cleanup
When MPD exits, it should manually free all resources in use, to allow
easy memory leak debugging.  Make the decoder thread terminate during
that.
2008-12-28 19:48:53 +01:00
Max Kellermann
c01aa53e6a log: support syslog()
Allow logging to syslog if log_file is configured to "syslog".
2008-12-28 19:48:53 +01:00
Max Kellermann
c6cb611065 log: moved code to log_init_file()
Added log_init_file() and log_init_stdout(), preparing for other
logging targets.
2008-12-28 19:48:53 +01:00
Max Kellermann
d70c2e2285 log: merged initLog() and open_log_files().
The logging library currently has 3 constructor functions: initLog(),
open_log_files(), setup_log_output(), called in this order.  Merged
the first two.
2008-12-28 19:48:53 +01:00
Max Kellermann
caf47f7893 log: moved code to parse_log_level() 2008-12-28 19:48:53 +01:00
Max Kellermann
5d2c59e3f1 log: use the GLogLevelFlags type
Declare log_threshold as GLogLevelFlags.
2008-12-28 19:48:53 +01:00
Max Kellermann
2c5885e9c7 log: don't manipulate the umask
If the user wants the log files with a specific mode, he has to start
MPD with the correct umask.  Don't hard-code that.

This fixes a bug: when log cycling failed, MPD would not restore the
old umask.
2008-12-28 19:48:52 +01:00
Max Kellermann
8e9def1b5a log: moved code to open_log_file()
Merged code from open_log_files() and cycle_log_files().
2008-12-28 19:48:52 +01:00
Max Kellermann
8dc92ad284 log: deprecated "error_file" option
Removed the "error_file" option.  There is only one log file now.  If
a user wants to see only the errors, he should configure a log_level.
2008-12-28 19:48:52 +01:00
Viliam Mateicka
d838a1ad24 decoder: new plugin using modplug library 2008-12-28 17:11:18 +01:00
Avuton Olrich
4654bb4628 Update news with RVA2 and Audio archive support. 2008-12-28 13:02:41 +01:00
Pauli Virtanen
65b18644e1 Add RVA2 tag support to MPD
This patch adds RVA2 (relative volume adjustment) tag
support to mpd, as a fallback if no replaygain tags are
found. The code is almost directly from madplay (GPL).

RVA2 tags are generated for example by the "normalize" utility.

Updated by: Avuton Olrich <avuton@gmail.com>
2008-12-28 13:02:34 +01:00
Max Kellermann
ed9668f638 notify: use GLib locking
Use GLib locking (GMutex, GCond) instead of pthread because GLib is
more portable, e.g. on mingw32.
2008-12-27 20:56:06 +01:00
Max Kellermann
e8c44782d0 output_control: no static "notify" initialization
Don't use NOTIFY_INITIALIZER to initialize audio_output_client_notify.
2008-12-27 20:53:52 +01:00
Viliam Mateicka
b2fc0ee274 cmdline: fixed option_no_createdb usage 2008-12-27 20:16:32 +01:00
Viliam Mateicka
166d326950 configure.ac: fixed description to bzip2 compile option 2008-12-27 20:16:00 +01:00
Max Kellermann
83fc948008 cmdline: use g_build_filename() for ~/.mpdconf
Build the path with g_build_filename().  Also use g_get_home_dir() and
g_file_test().
2008-12-27 19:46:43 +01:00
Max Kellermann
f5ff00bba4 cmdline: use GLib's option parser
Eliminate duplicated code.  The GLib code is much more mature than
MPD's custom parser.
2008-12-27 19:36:03 +01:00
Max Kellermann
357712c8f3 cmdline: use gboolean instead of int
Prepare for the migration to the GLib option parser, which uses
gboolean for flags.
2008-12-27 19:35:30 +01:00
Max Kellermann
786bb8cc33 moved command line parser to cmdline.c 2008-12-27 19:03:33 +01:00
Avuton Olrich
e18ded8ded Add an "Archive support" section to the configure results screen. 2008-12-27 09:54:00 -08:00
Avuton Olrich
9ca7be9e82 Change configure time option to be bzip2 rather than bz2. 2008-12-27 09:50:37 -08:00
Avuton Olrich
dc0f779287 Fix text string to show bz2 rather than rar. 2008-12-27 09:49:27 -08:00
Max Kellermann
cc3b6c2f5b audiofile: don't close onput stream in libaudiofile destroy()
The input_stream object should only be closed by the MPD core
(i.e. decoder_thread.c / decoder_run()).  A decoder plugin which
attempts to close it will result in a segmentation fault.
2008-12-27 14:34:51 +01:00
Max Kellermann
0fe0425dee disable archive API without plugins
When there are no archive plugins, we do not need the archive API at
all.  Drop all its overhead.
2008-12-27 14:33:41 +01:00
Max Kellermann
4c13a276c4 configure.ac: moved archive library checks to options
Don't split configure options and their implementation.  Check for the
backend library before the AM_CONDITIONAL, otherwise Makefile.am will
compile the plugin although the library may not be available.
2008-12-27 13:45:17 +01:00
Max Kellermann
9220e0edff Merge branch 'experimental' of git://git.musicpd.org/metyl/mpd
Conflicts:

	configure.ac
	src/ls.h
	src/output/shout_plugin.c
2008-12-27 13:34:51 +01:00
Qball Cow
0e7c67067b Check for pkg-config before using it 2008-12-27 10:07:46 +01:00
Avuton Olrich
571b789dd0 Modify version string to post-release version 0.15~git 2008-12-25 13:18:46 -08:00
Avuton Olrich
8b7d7f8abd MPD version 0.14 2008-12-25 13:18:46 -08:00
Avuton Olrich
fbc573d03a Fix a few problems with the huge mpdconf update. There's alot of shift here, mostly due to word wraps. This, also, improves on uniformity and clarity of the document. 2008-12-24 15:02:01 -08:00
Max Kellermann
1b5dd452d1 doc: fix "playlistdelete" documentation
"playlistdelete" takes a song position, not a song id.  There are
no song ids in stored playlists.
2008-12-24 23:54:09 +01:00
Max Kellermann
1bd3cde062 playlist: fix stored playlist modifications with absolute paths
When save_absolute_paths_in_playlists was enabled in mpd.conf, MPD
broke all playlists when manipulated using the "playlistdelete"
command.  The reason was that map_directory_child_fs() was used, which
doesn't accept slashes in the file name.  Use the new map_uri_fs()
function instead.
2008-12-24 22:04:24 +01:00
Max Kellermann
a94e59ca21 stored_playlist: fix integer overflow in length estimation
With a large maximum playlist length, the integer multiplication
"playlist_max_length * MPD_PATH_MAX" may overflow.  Change that to a
division.  This was not a dangerous bug, since it was only used for
a quick estimate.
2008-12-24 17:40:41 +01:00
Max Kellermann
7f98ba24c7 ffmpeg: case AV_NOPTS_VALUE to int64_t
The old code casted it to a 32 bit integer, which cut off bits.
AVFormatContext.duration is a int64_t, so use this type.
2008-12-24 11:56:53 +01:00
Max Kellermann
82ef85a309 ffmpeg: don't assign "0" to pointer
Use NULL instead.  Found by sparse.
2008-12-24 11:49:37 +01:00
Max Kellermann
fefd3d6fb7 Makefile.am: fix sparse invocation
Added missing includes.
2008-12-24 11:49:09 +01:00
Max Kellermann
d05c7f898f added build test script "test.sh" 2008-12-24 11:35:57 +01:00
Max Kellermann
fc723803a4 mp3: "tag" argument is unused when libid3tag is disabled
Add G_GNUC_UNUSED attributes.
2008-12-24 11:07:58 +01:00
Max Kellermann
4716ef1014 listen: "port" argument is unused when TCP support is disabled
Add a G_GNUC_UNUSED attribute.
2008-12-24 11:07:58 +01:00
Max Kellermann
d66dddb47e Makefile.am: distribute only real scripts
Don't distribute the whole scripts/ directory, because this may
include editor backup files and other temporary files.
2008-12-24 11:01:14 +01:00
Max Kellermann
51fd7cdfb7 Makefile.am: removed m4/* from EXTRA_DIST
The m4 files are automatically included in the distribution.
2008-12-24 10:56:53 +01:00
Max Kellermann
6260e0c8a0 Makefile.am: don't add directory into EXTRA_DIST
Add separate files.  This fixes "make distcheck".
2008-12-24 10:50:23 +01:00
Max Kellermann
136670832c configure.ac: renamed shout options
configure options should use the dash instead of the underscore.
2008-12-24 03:40:00 +01:00
Max Kellermann
2888ff9bfa configure.ac: fix --enable-un documentation
Unix domain socket support is enabled by default.
2008-12-24 03:32:11 +01:00
Max Kellermann
7950a6d612 configure.ac: disable the mikmod plugin by default
libmikmod seems to be unmaintained, and has several critical bugs
which make MPD crash.

 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461519
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476339

Disable the plugin by default to minimize harm.  Users should
explicitly enable the mikmod decoder (--enable-mod) if they wish to
have it anyway.
2008-12-24 03:24:23 +01:00