Viliam Mateicka
bb5acc939f
httpd: add config option to limit number of clients
2009-10-29 22:38:18 +01:00
Max Kellermann
1403172ef3
output_plugin: added method "drain"
...
drain() is the opposite of cancel(): it waits until all data in the
buffer has finished playing. Instead of implicitly draining in the
close() method like the ALSA plugin has been doing it forever, let the
output thread decide whether to drain or to cancel.
2009-10-29 15:59:40 +01:00
Max Kellermann
f74ee1a352
output/alsa: don't recover on CANCEL
...
The recovery is for nothing if we get CLOSE afterwards. Let's not
recover in the cancel() method, and let the next play() call sort it
out.
2009-10-29 15:59:35 +01:00
Max Kellermann
82af161210
output/pulse: initialize pulse_output.mixer
...
This variable was uninitialized and led to crashes.
2009-10-29 15:58:18 +01:00
Alam Arias
83a9cf74fb
include pulse/version.h for PA_CHECK_VERSION
2009-10-27 07:46:53 +01:00
Max Kellermann
ac830468bf
output/jack: implement methods enable()/disable()
...
Don't connect to JACK before MPD has daemonized.
2009-10-23 10:56:25 +02:00
Max Kellermann
7547b1170b
output/pulse: implement methods enable()/disable()
...
Don't connect to PulseAudio before MPD has daemonized.
2009-10-23 10:56:16 +02:00
Max Kellermann
e53ca368a5
output_plugin: added methods enable() and disable()
...
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.
2009-10-23 10:55:52 +02:00
Max Kellermann
c426a0bc5c
output/pulse: call mixer on state changes
...
Don't let the mixer plugin "override" the libpulse callbacks.
Instead, add a "mixer" attribute to the pulse_output struct, and call
the mixer on all interesting events.
2009-10-23 10:33:26 +02:00
Max Kellermann
80ac82c8fb
output/fifo: renamed source to fifo_output_plugin.c
2009-10-22 19:23:30 +02:00
Max Kellermann
9526fdbe73
audio_format: wildcards allowed in audio_format configuration
...
An asterisk means that this attribute should not be enforced, and
stays whatever it used to be. This way, some configuration values
work like masks.
2009-10-21 23:01:04 +02:00
Max Kellermann
83844ec239
output/jack: make ringbuffer_size a size_t
2009-10-21 21:39:26 +02:00
Max Kellermann
1bfd25be35
output/jack: connect to server on MPD startup
...
.. and keep up the JACK connection while MPD runs. Allocate the ring
buffers on the first open, and free them at MPD exit.
2009-10-21 21:37:11 +02:00
Max Kellermann
cee216f2dc
output/jack: removed the empty "cancel" method
...
JACK doesn't need cancel() because it won't do much anyway. Buffers
are small.
2009-10-21 21:01:00 +02:00
Max Kellermann
27c246e8d9
output/jack: renamed parameter "error" to "error_r"
...
It's a double pointer.
2009-10-21 20:13:39 +02:00
Max Kellermann
1ff39476eb
output/jack: implement the "pause" method
...
Don't disconnect from JACK during pause.
2009-10-21 18:33:05 +02:00
Max Kellermann
acfd9a73bc
output/jack: renamed source to jack_output_plugin.c
2009-10-21 18:33:01 +02:00
Max Kellermann
b479a264b6
pulse: code rewrite using the asynchronous libpulse API
...
This is a complete rewrite of the PulseAudio output plugin. It uses
the asynchronous API, which gives us more control over everything.
Additionally, it connects to the PulseAudio server on startup, and
keeps this connection up while MPD runs. During pause, instead of
closing the stream, it enables "cork".
2009-10-21 10:30:42 +02:00
Max Kellermann
097e200a97
mixer/{oss,alsa}: renamed the mixer source files
2009-10-20 21:23:05 +02:00
Max Kellermann
bd28caed3c
output/pulse: renamed context to "Music Player Daemon"
...
This looks nicer in the PulseAudio manager than just "mpd".
2009-10-20 21:07:38 +02:00
Max Kellermann
bc4266bef8
pulse: renamed source files
2009-10-20 21:05:11 +02:00
Max Kellermann
bc629c8a3e
pulse: announce "media.role=music"
...
This allows PulseAudio to do some advanced tweaks.
2009-10-20 21:02:10 +02:00
Max Kellermann
ea616b3ed4
tag: removed the "_ITEM_" suffix from the enum names
2009-10-13 16:12:45 +02:00
Max Kellermann
4390d72b14
configure.ac: require GLib 2.16
...
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.
2009-10-13 16:12:43 +02:00
Patrik Weiskircher
32f212cb86
output/osx: fix the OS X 10.6 build
...
Include CoreServices/CoreServices.h.
2009-09-20 23:30:37 +02:00
Serge Ziryukin
761771ad24
output/openal: support OpenAL plugin on Mac OS X
2009-09-07 15:52:32 +02:00
Serge Ziryukin
eefef369ea
output/openal: fix default device name
2009-09-06 22:22:17 +02:00
Serge Ziryukin
8b6a5d19d0
openal output plugin
2009-09-06 17:34:56 +02:00
Max Kellermann
4a0d4a02a6
output/recorder: new output plugin for recording radio streams
...
The recorder plugin writes audio played by MPD to a file. This may be
useful for recording radio streams.
This implementation is incomplete, because support for tags is
missing, and MPD should be able to record each track to a different
file.
2009-08-24 18:57:06 +02:00
Max Kellermann
f401c1059c
Merged release 0.15.2 from branch 'v0.15.x'
...
Conflicts:
NEWS
configure.ac
2009-08-15 21:18:38 +02:00
Max Kellermann
f38ce5408b
output/shout: minimize the unpause latency
...
During the pause loop, manually sleep for 500ms if shout_delay()
returns a value greater than that. Don't exhaust libshout's buffer.
2009-08-14 11:52:36 +02:00
David Woodhouse
49ede85827
Support wrong-endian ALSA output
2009-07-19 17:15:35 +01: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
Max Kellermann
64ca94c910
output/httpd: include sys/types.h
...
On Mac OS X, the httpd plugin cannot be compiled, because OS X's
system headers do nto include sys/types.h, although they use
u_int32_t.
2009-07-06 14:40:06 +02:00
Max Kellermann
ddc2694419
conf: eliminated CamelCase
...
Renamed all remaining CamelCase functions.
2009-06-03 06:55:04 +02:00
Patrik Weiskircher
7e678d2ba9
latest git, httpd_output_plugin compile fix, mac os x
...
Hello,
While compiling latest git I've received a compile error in the
httpd_output_plugin.
Small patch attached.
Patrik
2009-05-10 21:15:53 +02:00
Max Kellermann
4818d38677
httpd_output: save the page generated by encoder_tag()
...
Flush the encoder before calling encoder_tag(). The first page
generated by the encoder after sending the tag will be the new
"header" page, which is sent to all HTTP clients when they connect.
This is a little bit specific to the vorbis encoder, but there are no
other encoders which support tags (yet).
2009-05-05 22:51:17 +02:00
Max Kellermann
e55e560d4e
httpd_output: moved code to httpd_output_encoder_to_clients()
...
Moved some code from httpd_output_encode_and_play() into separate
functions httpd_output_broadcast_page() and
httpd_output_encoder_to_clients().
2009-05-05 22:43:28 +02:00
Max Kellermann
9080797025
httpd_output: disable Icy-Metadata when encoder supports tags
...
There's no reason to send both encoder tags and Icy-Metadata to the
client. Let's disable Icy-Metadata when the encoder supports embedded
tags.
2009-05-05 22:41:36 +02:00
Max Kellermann
795569208a
httpd_output: assert that tag!=NULL
...
In the tag() method, MPD guarantees that it does not pass tag==NULL.
Converted the runtime check to an assertion.
2009-05-05 22:36:44 +02:00
Max Kellermann
85658965c9
alsa_output: don't use atexit() to clean up the ALSA library
...
Call snd_config_update_free_global() manually in our finish() method,
don't use atexit().
2009-04-21 22:47:12 +02:00
Max Kellermann
9919704be3
httpd: use C99 "bool" instead of GLib's gboolean
...
Plain "bool" consumes only one byte instead of four.
2009-04-13 19:39:19 +02:00
Max Kellermann
3f81f5b476
httpd: use g_ascii_strncasecmp() to compare headers
...
In HTTP, header names are case insensitive.
2009-04-13 19:39:16 +02:00
Hagen Schink
92ba754fc6
Implemented basic icy support for the httpd output
...
[mk: folded with patch "Put icy related functions in extra source
files"; moved icy_server.c from HAVE_CURL to ENABLE_HTTPD_OUTPUT;
removed an unused variable]
2009-04-13 19:35:02 +02:00
Max Kellermann
cd6182862a
httpd: don't pass uninitialized page to httpd_client_check_queue()
...
The httpd_client_check_queue() callback function does not use its
"user_data" argument. Don't pass any, and fix the gcc warning.
2009-04-01 22:45:21 +02:00
Max Kellermann
52575d1b9d
pulse: make configuration strings const
...
Nobody needs to modify these strings. We can make them const, and
convert config_dup_block_string() to config_get_block_string(). This
also fixes memory leaks in the pulse mixer.
2009-03-26 19:50:10 +01:00
Max Kellermann
cd4964cdee
pulse: don't check config_param!=NULL
...
The conf.h functions deal well with config_param==NULL and will return
the specified default value then.
2009-03-26 19:50:02 +01:00
Max Kellermann
66a2c5669e
output_plugin: replaced output_plugin.get_mixer() with mixer_plugin
...
The mixer core library is now responsible for creating and managing
the mixer object. This removes duplicated code from the output
plugins.
2009-03-26 18:23:23 +01:00
Jeffrey Middleton
91f3370913
httpd: fixed encoder plugin check
...
Check if encoder_plugin!=NULL, not encoder_plugin_get (which is a
function).
2009-03-17 06:52:23 +01:00
Max Kellermann
bba127a392
solaris: new audio output plugin for Solaris /dev/audio
2009-03-16 09:55:10 +01:00