Commit Graph

3869 Commits

Author SHA1 Message Date
Max Kellermann e065c4db33 jack: initialize local variable "space"
Fix a gcc warning, initialize the "space" variable at the beginning of
mpd_jack_play().
2009-02-24 19:06:34 +01:00
Max Kellermann 1630fe00a2 listen: fix unused parameter warnings when TCP is disabled
Work around gcc warnings by casting the parameters to void.
2009-02-24 19:06:31 +01:00
Max Kellermann d0a17ffb9d listen: removed is_ipv6_enabled()
Don't explicitly check is_ipv6_enabled(), just try calling
listen_add_port_ipv6(), but check its error code.
2009-02-24 18:55:12 +01:00
Max Kellermann adf044eb09 listen: splitted listen_add_port() into IPv4 and IPv6
Some more code simplification.
2009-02-24 18:49:09 +01:00
Max Kellermann d40c439424 listen: don't call listen_add_config_param(NULL)
For default bind_to_address settings, don't call
listen_add_config_param(NULL), use listen_add_port() directly.
2009-02-24 18:36:31 +01:00
Max Kellermann 739c23cca5 listen: moved code to listen_add_host()
Split code from the rather large function listen_add_config_param(),
part 3.
2009-02-24 18:29:53 +01:00
Max Kellermann 33749e7ea9 listen: moved code to listen_add_path()
Split code from the rather large function listen_add_config_param(),
part 2.
2009-02-24 17:51:39 +01:00
Max Kellermann 36b1a860d3 listen: moved code to listen_add_port()
Split code from the rather large function listen_add_config_param().
2009-02-24 17:51:32 +01:00
Max Kellermann dbb067c016 listen: listen_add_address() returns bool/GError
Don't return -1 on failure, and abort on fatal error - do proper error
reporting with GError, and return false on failure.
2009-02-24 17:43:10 +01:00
Max Kellermann 7de4e7228f listen: removed unused macro "MAXHOSTNAME" 2009-02-24 17:42:37 +01:00
Max Kellermann 9bb3f2d060 listen: no CamelCase
Renamed functions.
2009-02-24 17:42:36 +01:00
Max Kellermann d89ba3bcce configure.ac: fix comma errors
Removed superfluous commas.
2009-02-24 10:00:21 +01:00
Avuton Olrich 39a33344f2 ffmpeg: add all known ffmpeg extensions and mime-types.
After much research[1][2][3] this should be the majority of currently
supported file extensions and mime-types for the currently supported
ffmpeg formats. This list maybe incomplete, but it's more complete
than anything else out there that I've been able to find. This list
needs to be updated every now and again as the ffmpeg sources support
more formats.

 1. Sources
 2. wiki.multimedia.cx
 3. filext.com
2009-02-23 10:48:43 -08:00
Max Kellermann 3b1a9aeca0 Makefile.am: no recursive makefiles
Recursive Makefiles are inefficient and error prone (no proper way to
declare dependencies).  Since there's no disadvantage in having one
single Makefile, let's do it.
2009-02-23 10:04:51 +01:00
Max Kellermann a4dfab2aee output: pass the music chunk pointer as void*, not char*
The meaning of the chunk depends on the audio format; don't suggest a
specific format by declaring the pointer as "char*", pass "void*"
instead.
2009-02-23 09:34:26 +01:00
Max Kellermann 5a898c15e7 output_api: play() returns a length
The old API required an output plugin to not return until all data
passed to the play() method is consumed.  Some output plugins have to
loop to fulfill that requirement, and may block during that.  Simplify
these, by letting them consume only part of the buffer: make play()
return the length of the consumed data.
2009-02-23 09:29:56 +01:00
Max Kellermann d50a3d513e shout: removed shout_plugin.h
There are no plugins left which require shout_plugin.h.  Moved the
struct declaration to shout_plugin.c.
2009-02-22 17:52:37 +01:00
Max Kellermann 1c56edd1c8 shout: removed shout_encoder_plugins
This array is empty, and is not used anymore.
2009-02-22 17:51:12 +01:00
Max Kellermann f6e5c00726 shout: use the new encoder API
Removed shout's encoder plugin API in favor of the new generic encoder
plugin API.
2009-02-22 17:18:28 +01:00
Max Kellermann f7c685f1ab encoder: added lame mp3 encoder
This new LAME encoder plugin is based on the existing shout_mp3.c
plugin.
2009-02-22 17:18:03 +01:00
Max Kellermann 3a6619d62c encoder: added vorbis encoder
This new vorbis encoder plugin is based on the existing shout_ogg.c
plugin.
2009-02-22 17:17:26 +01:00
Max Kellermann a9dde676be added the encoder API
The new generic encoder API will replace shout's custom encoder API.
2009-02-22 17:11:14 +01:00
Max Kellermann e79a82ba3a shout: merged open_shout_conn() into my_shout_open_device()
The method implementation my_shout_open_device() consists of only one
line, the call to open_shout_conn().  Merge both functions into one.
2009-02-22 15:24:41 +01:00
Max Kellermann cece6c00f4 shout: bool return values instead of int
Return true/false instead of 0/-1.
2009-02-22 15:18:58 +01:00
Max Kellermann f0554d9a75 pcm: added API documentation 2009-02-21 18:14:20 +01:00
Max Kellermann cae7c160a3 crossfade: added API documentation 2009-02-20 14:57:32 +01:00
Max Kellermann 91ebf46853 path: don't export path_set_fs_charset()
The function path_set_fs_charset() is only used in path.c.
2009-02-20 14:49:57 +01:00
Max Kellermann 09ecfb6567 path: validate configured character set 2009-02-20 12:31:00 +01:00
Max Kellermann adea76a6ed decoder_api: fixed shadow warning, rename "wait"
The parameter name "wait" overlaps with the POSIX wait() function.
Rename it.
2009-02-19 13:33:06 +01:00
Max Kellermann e7131b5da2 utils: use g_usleep() instead of my_usleep()
Now that I've found this nice function in the GLib docs, we can
finally remove our custom sleep function.  Still all those callers of
g_usleep() have to be migrated one day to use events, instead of
regular polling.
2009-02-19 13:33:03 +01:00
Max Kellermann c228635489 faad: use faacDecFrameInfo instead of NeAACDecFrameInfo
Don't use libfaad's internal type names.
2009-02-19 13:29:15 +01:00
Max Kellermann eac2da635d added G_LOG_DOMAIN macros to several libraries
Define the GLib logging domain in the following libraries: conf,
daemon, event_pipe, log.
2009-02-19 09:24:59 +01:00
Max Kellermann 11e680d640 conf: log the effective configuration file name
For better debugging aid when something goes wrong, log the name of
the effective configuration file.
2009-02-19 08:35:22 +01:00
Max Kellermann 0a0736fc4e log: added log_early_init() for early debug messages 2009-02-19 08:35:20 +01:00
Max Kellermann 84437acffb Makefile.am: add new headers to $(mpd_headers)
I forgot to add these, and this broke "make distcheck".
2009-02-19 08:12:46 +01:00
Peter Colberg de6cc2691f mms: fix assertion in input_stream_open
Hi,

upon trying to play an MMS stream added to the play list, I got this:

    mpd: /tmp/mpd/./src/input_stream.c:85: input_stream_open: Assertion `is->plugin->open == ((void *)0) || is->plugin == plugin' failed.

With the following patch applied, it works perfectly.

Thanks for having implemented MMS support :-).

Best regards,
Peter
2009-02-19 07:34:07 +01:00
Max Kellermann 9f8740a0d6 configure.ac: check ${host_os} instead of ${host}
The configure.ac script does not care about the host architecture, it
only cares about the OS.  Use ${host_os} instead of ${host} to
simplify the matching expressions.
2009-02-18 23:07:13 +01:00
Max Kellermann f2717a7139 configure.ac: added AC_CANONICAL_HOST
Without AC_CANONICAL_HOST, ${host_os} etc. are not defined.
2009-02-18 23:01:08 +01:00
Max Kellermann 7f701744a7 pcm_volume: optimized pcm_volume_change_24() on i386
Added an inline assembly function for the 64 bit multiplication.

Benchmark results on a Pentium II 266 MHz, 512 MB of 24 bit PCM data:

 dd if=/dev/zero bs=64k count=8k |
     time ./test/software_volume 48000:24:2 >/dev/null

Before this patch 22.94s, after this patch 7.24s.
2009-02-18 22:27:58 +01:00
Max Kellermann 76dc9ac5f9 test: added command line test program for pcm_volume.c
This program is a simple utility for debugging and benchmarking the
software volume code.
2009-02-18 22:27:55 +01:00
Max Kellermann 54387d1451 configure.ac: added switch for test programs
The switch syntax is "--enable-test".  There are no test programs yet.
2009-02-18 19:27:05 +01:00
Max Kellermann fcf65de46b mp4ff: always free the mp4ff_read_sample() buffer
When mp4ff_read_sample() returns a value bigger than zero, it
guarantees that the buffer is set.  Remove the check.
2009-02-18 19:08:52 +01:00
Max Kellermann 5900ea5299 mp4ff: don't allocate seek_table when input is not seekable
Don't waste any precious memory when the seek_table cannot be used.
2009-02-18 18:40:40 +01:00
Max Kellermann 8aa3edb6af mp4ff: include cleanup
Don't include limits.h, use GLib constants instead.
2009-02-18 18:40:33 +01:00
Max Kellermann 51c59f6228 mp4ff: use faacDecInit2() to find the AAC track
Use faacDecInit2() instead of AudioSpecificConfig() to detect the AAC
track in the MP4 file.  This has a great advantage: it initializes the
libfaad decoder, which the caller would normally do anyway - but now
we can go without the AudioSpecificConfig() call.  When decoder==NULL
(called from mp4_tag_dup()), fall back to a mp4ff_get_track_type()==1
check, like other audio players do.
2009-02-18 18:39:12 +01:00
Max Kellermann 111c73e701 mp4ff: moved code to mp4_faad_new()
Moved the libfaad decoder initialization to mp4_faad_new(), and also
fill the audio_format struct there.  This eliminates a little bit of
complexity in mp4_decode().
2009-02-18 18:38:09 +01:00
Max Kellermann 2bc0fabe73 mp4ff: call decoder_initialized() after libfaad initialization
Don't wait for the first frame to be decoded.  We already have the
sample rate and the channel count from faacDecInit2().
2009-02-18 18:18:29 +01:00
Max Kellermann 47e3eab872 mp4ff: merged mp4_load_tag() into mp4_tag_dup()
The function mp4_load_tag() is used only once, and mp4_tag_dup() is a
one-liner.  Merge them.
2009-02-18 18:18:25 +01:00
Max Kellermann 9d2f16d827 player_thread: don't drop audio buffers when not seekable
When a file is not seekable, MPD dropped the audio buffers before even
attempting to seek.  This caused noticable sound corruption.  Fix:
first attempt to seek, and only if that succeeds, call
audio_output_all_cancel().
2009-02-17 23:57:10 +01:00
Max Kellermann 4aca1fa493 faad: variable cleanup
Make some variables more local, and eliminate superfluous ones.
2009-02-17 23:44:29 +01:00