Avuton Olrich
f35432af5a
configure: Merge lame*encoder to lame
2009-03-16 08:44:48 +01:00
Avuton Olrich
b356bcf6fa
configure: don't warn just because we don't have an optional library.
2009-03-16 08:44:46 +01:00
Avuton Olrich
e773cfa32b
configure: error out against streaming output, not encoder.
2009-03-16 08:44:44 +01:00
Avuton Olrich
f1fb4e99a6
configure: Always run pkg-config for shout, define AC_DEFINE if enabled
...
[mk: don't run pkg-config when shout is disabled]
2009-03-16 08:44:41 +01:00
Avuton Olrich
04b092bbfe
configure: add shout autoconf argument.
2009-03-15 12:37:24 -07:00
Avuton Olrich
7b5c658f7e
configure: Fail if trying to build with streaming output and no encoder
2009-03-15 12:17:11 -07:00
Avuton Olrich
f5c75d8846
configure: Move encoders to their own report section.
2009-03-15 12:02:43 -07:00
Avuton Olrich
a672cf1c63
configure: replace all instances shout*[mp3|ogg] with [lame|oggvorbis]*encoder
2009-03-15 11:46:44 -07:00
Max Kellermann
870706519a
httpd_output: check client->write_source_id in handler
...
Due to a race condition, httpd_client_out_event() could be called even
when its GLib event source was already removed. Check that case.
2009-03-15 19:06:14 +01:00
Max Kellermann
58844aabac
httpd_output: clear the client's page queue on cancel
...
When the httpd output is cancelled, it freed all pages, but didn't
remove them from the queue. Call g_queue_clear() and remove the
write source id.
2009-03-15 19:06:10 +01:00
Avuton Olrich
50c2dde5b5
configure.ac: Enable ENCODER if httpd_output, even if SHOUT is disabled.
2009-03-15 19:05:32 +01:00
Max Kellermann
ae1a7fc84a
vorbis_encoder: added support for all MPD tag types
...
Copy all tags know to MPD to the vorbis_comment.
2009-03-15 18:36:29 +01:00
Max Kellermann
4bb84c05d7
vorbis_encoder: removed vorbis_encoder.vc
...
Allocate the vorbis_comment object when it's used. It is not used
anymore in vorbis_encoder_tag().
2009-03-15 18:36:26 +01:00
Max Kellermann
3333502edb
vorbis_encoder: use vorbis_commentheader_out() in the tag() method
...
Don't reinitialize the encoder with every tag.
2009-03-15 18:36:25 +01:00
Max Kellermann
2b74311b0a
vorbis_encoder: pass vorbis_comment to tag helper functions
...
Prepare the removal of vorbis_encoder.vc.
2009-03-15 18:23:04 +01:00
Max Kellermann
a899c210b9
log: removed DEBUG() and FATAL()
...
Use GLib the logging functions g_debug(), g_error() instead.
2009-03-15 18:23:00 +01:00
Max Kellermann
9e30dfb9c1
dbUtils: removed printSavedMemoryFromFilenames()
...
The function is unused.
2009-03-15 18:21:53 +01:00
Max Kellermann
1308f5f669
sig_handlers: include signal.h instead of sys/signal.h
2009-03-15 17:32:30 +01:00
Max Kellermann
e1189712f9
Makefile.am: added documentation upload target
...
This "upload" target uploads generated documentation to
http://www.musicpd.org/doc/ , and works only for my user account.
2009-03-15 17:32:28 +01:00
Max Kellermann
e62580db0b
httpd: new output plugin to replace "shout"
...
Let's get rid of the "shout" plugin, and the awfully complicated
icecast daemon setup! MPD can do better if it's doing the HTTP server
stuff on its own. This new plugin has several advantages:
- easier to set up - only one daemon, no password settings, no mount
settings
- MPD controls the encoder and thus already knows the packet
boundaries - icecast has to parse them
- MPD doesn't bother to encode data while nobody is listening
This implementation is very experimental (no header parsing, ignores
request URI, no icy-metadata, ...). It should be able to suport
several encoders in parallel in the future (with different bit rates,
different codec, ...), to make MPD the perfect streaming server. Once
MPD gets multi-player support, we can even mount several different
radio stations on one server.
2009-03-15 03:32:34 +01:00
Max Kellermann
565afefc66
page: new library for reference counted buffers
2009-03-15 02:29:12 +01:00
Max Kellermann
eb34bd2eff
vorbis_encoder: make ogg_page a local variable
...
Converted the ogg_page attribute from the vorbis_encoder struct to a
local function of vorbis_encoder_read(). This simplifies some code,
because we don't need to check the page anymore before using it.
2009-03-15 02:26:16 +01:00
Max Kellermann
65cc280e1a
vorbis_encoder: fill the ogg_page in the read() method
...
Add the "flush" flag, and defer the ogg_stream_flush() call. Call
ogg_stream_pageout() or ogg_stream_flush() (depending on the "flush"
flag) in vorbis_encoder_read(). This prevents the ogg_page from
getting overwritten by consecutive ogg_stream_pageout() calls.
2009-03-15 02:23:36 +01:00
Max Kellermann
c8c3920500
socket_util: added socket_bind_listen()
...
Moved code from listen_add_address() (listen.c) to socket_util.c.
2009-03-14 18:29:38 +01:00
Max Kellermann
dccb973cfe
client: use the new fifo_buffer library
2009-03-14 17:46:01 +01:00
Max Kellermann
c76d35969b
fifo_buffer: added buffering library
...
It is a library which I have written years ago for other projects.
This library is licensed under BSD 2-clause, because it is very
generic.
2009-03-14 17:30:00 +01:00
Max Kellermann
24bc277b69
doc: added "audio outputs" section to the user's manual
2009-03-14 16:01:56 +01:00
Max Kellermann
e12140cfce
pcm_resample: choose the fallback resampler at runtime
...
Even if libsamplerate support is enabled, compile the fallback
resampler. When the user specifies the option
"samplerate_converter=internal", it is chosen in favor of
libsamplerate. This may help users with a weak FPU who don't want to
compile a custom MPD from source, because the fallback resampler does
not use floating point operations.
2009-03-14 15:26:36 +01:00
Max Kellermann
456201fa22
pcm_resample: renamed implementation functions
...
Added diversion functions to pcm_resample.c. These check which
resampler is enabled at compile time (libsamplerate or fallback).
This prepares the following patch.
2009-03-14 15:26:28 +01:00
Max Kellermann
f1eed721d2
output_all: added missing "unused" attribute
...
In NDEBUG, clear_tail_chunk() does not use its "chunk" parameter.
2009-03-14 15:26:27 +01:00
Max Kellermann
975ca2dae5
output_all: include chunk.h
...
The source output_all.c accesses music_chunk struct members, but did
not include chunk.h directly.
2009-03-14 15:26:27 +01:00
Max Kellermann
d56aa88660
pcm_volume: use #ifdef instead of #if __i386__
2009-03-14 14:39:48 +01:00
Max Kellermann
35a04ccf07
tag_pool: make "slots" static
...
The variable is private.
2009-03-14 14:38:48 +01:00
Max Kellermann
f711198ab3
pcm_resample: return NULL on failure
...
Changed "0" to "NULL".
2009-03-14 14:37:31 +01:00
Max Kellermann
8df0a29cbc
pcm_convert: return NULL on failure
...
Changed "0" to "NULL".
2009-03-14 14:36:44 +01:00
Max Kellermann
e5767d6da8
command: return COMMAND_RETURN_OK in handle_addid()
...
At the last line of handle_addid(), the playlist_result value has
already been evaluated. Don't return this variable, it's the wrong
type.
2009-03-14 14:36:07 +01:00
Max Kellermann
7b53504a41
command: handle the addToPlaylist() result properly
...
addToPlaylist() has a "enum playlist_result" return value. Convert
that to "enum command_return" properly.
2009-03-14 14:33:19 +01:00
Max Kellermann
0007d84d95
faad: faad_decoder_decode() returns NULL, not false
...
On failure, the function should return NULL, not a boolean.
2009-03-14 14:31:38 +01:00
Max Kellermann
bd833f64e2
Makefile.am: don't let sparse scan C++ sources
...
sparse cannot deal with C++.
2009-03-14 14:30:02 +01:00
Max Kellermann
0a1db6cbc9
Makefile.am: added limit definitions to SPARSE_CPPFLAGS
...
sparse complains that a lot of limit.h macros are missing. Define
them to keep sparse quiet.
2009-03-14 14:30:01 +01:00
Max Kellermann
d70591b652
sticker: sticker_load_value() returns NULL on error, not false
...
Turn the "return false" error handlers into "return NULL".
2009-03-14 14:29:54 +01:00
Max Kellermann
77eaab55a3
sticker: initialize hash table in sticker_new()
...
Moved the hash table initialization from sticker_list_values() to the
new function sticker_new(). This fixes a memory leak in
sticker_list_values().
2009-03-14 14:21:11 +01:00
Max Kellermann
be38ad5b93
sticker: don't export sticker_list_values()
...
sticker_list_values() is only used internally in sticker.c. Remove
sticker_song_list_values() completely, it is superseded by
sticker_song_get().
2009-03-14 14:20:08 +01:00
Max Kellermann
24da9410fa
command: use sticker_song_get() instead of sticker_song_list_values()
2009-03-14 14:20:04 +01:00
Max Kellermann
dd67992a0c
sticker: added "struct sticker"
...
The sticker struct can be used for enumerating values. This will
replace the sticker_list_values() function.
2009-03-14 14:20:01 +01:00
Max Kellermann
5b687795c4
mixer_all: removed debug message
...
Don't dump the volume of all mixers.
2009-03-14 11:54:39 +01:00
Max Kellermann
7deade8577
mixer: protect the mixer struct with a mutex
...
In some rare cases, there was a race condition between the output
thread and the main thread: when you disable/enable an output device
in the main thread, this caused a crash in the output thread. Protect
the whole mixer struct with a GMutex to prevent that.
2009-03-14 11:53:28 +01:00
Max Kellermann
82963ee023
mixer_api: moved mixer_init() to mixer_api.c
2009-03-14 11:47:54 +01:00
Max Kellermann
b488355df8
mixer_api: moved mixer_plugin imports to mixer_list.h
...
This patch allows the output plugins to import only mixer_list.h,
instead of the full mixer_api.h (which would expose internal
structures).
2009-03-14 11:36:59 +01:00
Max Kellermann
a5017a2d7c
mixer_api: moved functions to mixer_control.c
...
mixer_control.h should provide the functions needed to manipulate a
mixer, without exposing the internal mixer API (which is provided by
mixer_api.h).
2009-03-14 11:36:50 +01:00