aboutsummaryrefslogtreecommitdiffstats
path: root/src/output (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-10-03output/httpd: MIME type audio/ogg for Ogg VorbisMax Kellermann1-1/+1
RFC 5334 10.3 defines the MIME type "audio/ogg". We could use "application/ogg" as well, but we know for sure that we only emit audio data.
2009-09-20output/osx: fix the OS X 10.6 buildPatrik Weiskircher1-0/+1
Include CoreServices/CoreServices.h.
2009-08-14output/shout: minimize the unpause latencyMax Kellermann1-0/+7
During the pause loop, manually sleep for 500ms if shout_delay() returns a value greater than that. Don't exhaust libshout's buffer.
2009-07-14output/httpd: removed duplicate sys/types.h includeMax Kellermann1-4/+0
The first patch by Patrick didn't work, because his "#ifdef HAVE_OSX" line would have required config.h.
2009-07-06output/httpd: include sys/types.hMax Kellermann1-0/+1
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-06-03conf: eliminated CamelCaseMax Kellermann1-1/+1
Renamed all remaining CamelCase functions.
2009-05-10latest git, httpd_output_plugin compile fix, mac os xPatrik Weiskircher1-0/+4
Hello, While compiling latest git I've received a compile error in the httpd_output_plugin. Small patch attached. Patrik
2009-05-05httpd_output: save the page generated by encoder_tag()Max Kellermann1-0/+21
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-05httpd_output: moved code to httpd_output_encoder_to_clients()Max Kellermann1-14/+32
Moved some code from httpd_output_encode_and_play() into separate functions httpd_output_broadcast_page() and httpd_output_encoder_to_clients().
2009-05-05httpd_output: disable Icy-Metadata when encoder supports tagsMax Kellermann3-18/+35
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-05httpd_output: assert that tag!=NULLMax Kellermann1-8/+7
In the tag() method, MPD guarantees that it does not pass tag==NULL. Converted the runtime check to an assertion.
2009-04-21alsa_output: don't use atexit() to clean up the ALSA libraryMax Kellermann1-7/+3
Call snd_config_update_free_global() manually in our finish() method, don't use atexit().
2009-04-13httpd: use C99 "bool" instead of GLib's gbooleanMax Kellermann1-7/+7
Plain "bool" consumes only one byte instead of four.
2009-04-13httpd: use g_ascii_strncasecmp() to compare headersMax Kellermann1-1/+1
In HTTP, header names are case insensitive.
2009-04-13Implemented basic icy support for the httpd outputHagen Schink4-12/+223
[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-01httpd: don't pass uninitialized page to httpd_client_check_queue()Max Kellermann1-1/+1
The httpd_client_check_queue() callback function does not use its "user_data" argument. Don't pass any, and fix the gcc warning.
2009-03-26pulse: make configuration strings constMax Kellermann1-6/+4
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-26pulse: don't check config_param!=NULLMax Kellermann1-4/+2
The conf.h functions deal well with config_param==NULL and will return the specified default value then.
2009-03-26output_plugin: replaced output_plugin.get_mixer() with mixer_pluginMax Kellermann3-55/+3
The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
2009-03-17httpd: fixed encoder plugin checkJeffrey Middleton1-1/+1
Check if encoder_plugin!=NULL, not encoder_plugin_get (which is a function).
2009-03-16solaris: new audio output plugin for Solaris /dev/audioMax Kellermann1-0/+175
2009-03-15httpd_output: check client->write_source_id in handlerMax Kellermann1-0/+7
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-15httpd_output: clear the client's page queue on cancelMax Kellermann2-2/+13
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-15httpd: new output plugin to replace "shout"Max Kellermann4-0/+1093
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-14mixer_api: moved mixer_plugin imports to mixer_list.hMax Kellermann3-3/+3
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-14mixer_api: moved functions to mixer_control.cMax Kellermann3-0/+3
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-13all: Update copyright header.Avuton Olrich11-68/+79
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
2009-03-10alsa: use snd_pcm_sframes_t instead of intMax Kellermann1-2/+1
snd_pcm_writei() returns the type snd_pcm_sframes_t, not int. Use the correct variable type.
2009-03-10alsa: don't close PCM handle in alsa_recover()Max Kellermann1-13/+3
If the PCM handle gets disconnected, don't close and clear it in alsa_recover(). The MPD core will call alsa_close() anyway. This way, we can always assume that alsa_data.pcm is always valid.
2009-03-08alsa: determine buffer_time if not already knownMax Kellermann1-0/+5
This patch fixes a theoretical (but practically impossible) flaw: the variable "buffer_time" may be uninitialized when it is used. Initialize the variable with snd_pcm_hw_params_get_buffer_time().
2009-03-08alsa: better period_time default value for high sample ratesMax Kellermann1-3/+8
The default values for buffer_time and period_time were both capped by the hardware limits on practically all chips. The result was a period_time which was half as big as the buffer_time. On some chips, this led to lots of underruns when using a high sample rate (192 kHz), because MPD had very little time to send new samples to ALSA. A period time which is one fourth of the buffer time turned out to be much better. If no period_time is configured, see how much buffer_time the hardware accepts, and try to configure one fourth of it as period_time, instead of hard-coding the default period_time value. This is yet another attempt to provide a solution which is valid for all sound chips. Using the SND_PCM_NONBLOCK flag also seemed to solve the underruns, but put a lot more CPU load to MPD.
2009-03-07pulse mixerDavid Guibert1-0/+16
This patch introduces the mixer for the pulse output. Technically speaking, the pulse index is needed to get or set the volume. You must define callback fonctions to get this index since the pulse output in mpd is done using the simpe api. The pulse simple api does not provide the index of the newly defined output. So callback fonctions are associated to the pulse context. The list of all the sink input is then retreived. Then we select the name of the mpd pulse output and control its volume by its associated index number. Signed-off-by: Patrice Linel <patnathanael@gmail.com> Signed-off-by: David Guibert <david.guibert@gmail.com> [mk: fixed whitespace errors and broke long lines; removed daemonization changes from main.c]
2009-03-03alsa: log period and buffer sizeMax Kellermann1-0/+3
Log the real period and buffer size. This might be useful when debugging xruns. Note that the same information is available in /proc/asound/card*/pcm*p/sub*/hw_params
2009-03-03alsa: fall back to 32 bit samples if 16 is not supportedMax Kellermann1-1/+2
There are a few high-end devices (e.g. ICE1724) which cannot even play 16 bit audio. Try the 32 bit fallback, which we already implemented for 24 bit.
2009-03-02alsa: fall back to 32 bit samples if 24 is not supportedMax Kellermann1-0/+8
Some sound chips/drivers (e.g. Intel HDA) don't support 24 bit samples, they want to get 32 bit instead. Now that MPD's PCM library supports 32 bit, add a 32 bit fallback when 24 bit is not supported.
2009-03-01output: removed duplicate debug messages from pluginsMax Kellermann4-16/+0
The MPD core logs the audio format of all audio outputs. Remove the duplicate message from the plugins.
2009-02-28pipe: new audio output plugin which runs a commandMichal Nazarewicz1-0/+110
[mk: adapted to new output plugin API]
2009-02-27tag: no CamelCaseMax Kellermann1-2/+1
Renamed numOfItems to num_items.
2009-02-26mvp: fixed default device detectionMax Kellermann1-1/+1
The check "open()!=0" is wrong, you have to write "open()>=0", because -1 means error, and 0 is a valid file handle.
2009-02-26output_plugin: report errors with GErrorMax Kellermann10-239/+393
Use GLib's GError library for reporting output device failures. Note that some init() methods don't clean up properly after a failure, but that's ok for now, because the MPD core will abort anyway.
2009-02-26osx: use OSStatus and GetMacOSStatusCommentString()Max Kellermann1-15/+24
The return type of most OS X functions is OSStatus, not int. We can get a nice error message from GetMacOSStatusCommentString(), log it.
2009-02-26osx: start the audio device in the open() methodMax Kellermann1-17/+8
Don't call AudioOutputUnitStart() in the play() method, do it after the device has been opened. We can eliminate the "started" property now, because the device is always started when it's open.
2009-02-26osx: removed commented codeMax Kellermann1-23/+2
We don't need to keep commented code forever. If we want that test_default_device() implementation back one day, we'll pick it from the git history.
2009-02-26osx: no CamelCaseMax Kellermann1-89/+85
Renamed types, functions, variables.
2009-02-26shout: use config_get_block_unsigned()Max Kellermann1-6/+3
Eliminated manual integer parsing.
2009-02-26pulse: removed pa_simple!=NULL checksMax Kellermann1-10/+2
The MPD core guarantees that the audio_output object is always consistent, and our pa_simple!=NULL checks are superfluous. Also don't manually close the device on error in pulse_play(), since the MPD core does this automatically when the play() method returns 0.
2009-02-26oss: moved code from oss_open() to oss_setup()Max Kellermann1-13/+26
Eliminate one label and a bunch of gotos.
2009-02-26oss: convert OSS_STAT_* to an enumMax Kellermann1-10/+15
Use C instead of CPP.
2009-02-26oss: return bool instead of intMax Kellermann1-10/+10
Return type of oss_find_supported_param(), oss_can_convert() and oss_find_unsupported_param() should be bool instead of int.
2009-02-26oss: use unsigned integersMax Kellermann1-14/+9
Convert the num_supported and num_unsupported variables from signed to unsigned.