aboutsummaryrefslogtreecommitdiffstats
path: root/src/output (follow)
Commit message (Collapse)AuthorAgeFilesLines
* output/shout: artist comes first in stream titleMax Kellermann2010-11-081-1/+1
| | | | | | After popular demand, I've switched the order of "artist" and "title" in the stream title. There is no standard, and there is no reliable way to parse those from the stream title.
* output/httpd: MIME type audio/ogg for Ogg VorbisMax Kellermann2010-10-031-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.
* output/osx: fix the OS X 10.6 buildPatrik Weiskircher2009-09-201-0/+1
| | | | Include CoreServices/CoreServices.h.
* output/shout: minimize the unpause latencyMax Kellermann2009-08-141-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.
* output/httpd: removed duplicate sys/types.h includeMax Kellermann2009-07-141-4/+0
| | | | | The first patch by Patrick didn't work, because his "#ifdef HAVE_OSX" line would have required config.h.
* output/httpd: include sys/types.hMax Kellermann2009-07-061-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.
* conf: eliminated CamelCaseMax Kellermann2009-06-031-1/+1
| | | | Renamed all remaining CamelCase functions.
* latest git, httpd_output_plugin compile fix, mac os xPatrik Weiskircher2009-05-101-0/+4
| | | | | | | | | | Hello, While compiling latest git I've received a compile error in the httpd_output_plugin. Small patch attached. Patrik
* httpd_output: save the page generated by encoder_tag()Max Kellermann2009-05-051-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).
* httpd_output: moved code to httpd_output_encoder_to_clients()Max Kellermann2009-05-051-14/+32
| | | | | | Moved some code from httpd_output_encode_and_play() into separate functions httpd_output_broadcast_page() and httpd_output_encoder_to_clients().
* httpd_output: disable Icy-Metadata when encoder supports tagsMax Kellermann2009-05-053-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.
* httpd_output: assert that tag!=NULLMax Kellermann2009-05-051-8/+7
| | | | | In the tag() method, MPD guarantees that it does not pass tag==NULL. Converted the runtime check to an assertion.
* alsa_output: don't use atexit() to clean up the ALSA libraryMax Kellermann2009-04-211-7/+3
| | | | | Call snd_config_update_free_global() manually in our finish() method, don't use atexit().
* httpd: use C99 "bool" instead of GLib's gbooleanMax Kellermann2009-04-131-7/+7
| | | | Plain "bool" consumes only one byte instead of four.
* httpd: use g_ascii_strncasecmp() to compare headersMax Kellermann2009-04-131-1/+1
| | | | In HTTP, header names are case insensitive.
* Implemented basic icy support for the httpd outputHagen Schink2009-04-134-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]
* httpd: don't pass uninitialized page to httpd_client_check_queue()Max Kellermann2009-04-011-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.
* pulse: make configuration strings constMax Kellermann2009-03-261-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.
* pulse: don't check config_param!=NULLMax Kellermann2009-03-261-4/+2
| | | | | The conf.h functions deal well with config_param==NULL and will return the specified default value then.
* output_plugin: replaced output_plugin.get_mixer() with mixer_pluginMax Kellermann2009-03-263-55/+3
| | | | | | The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
* httpd: fixed encoder plugin checkJeffrey Middleton2009-03-171-1/+1
| | | | | Check if encoder_plugin!=NULL, not encoder_plugin_get (which is a function).
* solaris: new audio output plugin for Solaris /dev/audioMax Kellermann2009-03-161-0/+175
|
* httpd_output: check client->write_source_id in handlerMax Kellermann2009-03-151-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.
* httpd_output: clear the client's page queue on cancelMax Kellermann2009-03-152-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.
* httpd: new output plugin to replace "shout"Max Kellermann2009-03-154-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.
* mixer_api: moved mixer_plugin imports to mixer_list.hMax Kellermann2009-03-143-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).
* mixer_api: moved functions to mixer_control.cMax Kellermann2009-03-143-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).
* all: Update copyright header.Avuton Olrich2009-03-1311-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.
* alsa: use snd_pcm_sframes_t instead of intMax Kellermann2009-03-101-2/+1
| | | | | snd_pcm_writei() returns the type snd_pcm_sframes_t, not int. Use the correct variable type.
* alsa: don't close PCM handle in alsa_recover()Max Kellermann2009-03-101-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.
* alsa: determine buffer_time if not already knownMax Kellermann2009-03-081-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().
* alsa: better period_time default value for high sample ratesMax Kellermann2009-03-081-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.
* pulse mixerDavid Guibert2009-03-071-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]
* alsa: log period and buffer sizeMax Kellermann2009-03-031-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
* alsa: fall back to 32 bit samples if 16 is not supportedMax Kellermann2009-03-031-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.
* alsa: fall back to 32 bit samples if 24 is not supportedMax Kellermann2009-03-021-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.
* output: removed duplicate debug messages from pluginsMax Kellermann2009-03-014-16/+0
| | | | | The MPD core logs the audio format of all audio outputs. Remove the duplicate message from the plugins.
* pipe: new audio output plugin which runs a commandMichal Nazarewicz2009-02-281-0/+110
| | | | [mk: adapted to new output plugin API]
* tag: no CamelCaseMax Kellermann2009-02-271-2/+1
| | | | Renamed numOfItems to num_items.
* mvp: fixed default device detectionMax Kellermann2009-02-261-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.
* output_plugin: report errors with GErrorMax Kellermann2009-02-2610-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.
* osx: use OSStatus and GetMacOSStatusCommentString()Max Kellermann2009-02-261-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.
* osx: start the audio device in the open() methodMax Kellermann2009-02-261-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.
* osx: removed commented codeMax Kellermann2009-02-261-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.
* osx: no CamelCaseMax Kellermann2009-02-261-89/+85
| | | | Renamed types, functions, variables.
* shout: use config_get_block_unsigned()Max Kellermann2009-02-261-6/+3
| | | | Eliminated manual integer parsing.
* pulse: removed pa_simple!=NULL checksMax Kellermann2009-02-261-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.
* oss: moved code from oss_open() to oss_setup()Max Kellermann2009-02-261-13/+26
| | | | Eliminate one label and a bunch of gotos.
* oss: convert OSS_STAT_* to an enumMax Kellermann2009-02-261-10/+15
| | | | Use C instead of CPP.
* oss: return bool instead of intMax Kellermann2009-02-261-10/+10
| | | | | Return type of oss_find_supported_param(), oss_can_convert() and oss_find_unsupported_param() should be bool instead of int.