aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/httpd_output_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2011-09-20socket_util: move sockaddr_to_string() to resolver.cMax Kellermann1-1/+1
2011-09-20fd_util: add function close_socket()Max Kellermann1-2/+2
Wrap close(), use closesocket() on WIN32/WinSock.
2011-09-19output_plugin: the plugin allocates the audio_output objectMax Kellermann1-27/+41
Pass audio_output objects around instead of void pointers. This will give some more control to the plugin, and prepares for non-blocking audio outputs.
2011-09-17output: per-plugin headerMax Kellermann1-0/+1
Move the "extern" declarations from output_list.c, for more type safety.
2011-07-20encoder_plugin: add method pre_tag()Max Kellermann1-1/+1
In the "vorbis" plugin, this is a copy of the old flush() method, while flush() gets a lot of code remove, it just sets the "flush" flag and nothing else. It doesn't start a new stream now, which should fix a few problems in some players.
2011-07-20output/httpd: explicitly convert size_t to bool in pause()Max Kellermann1-1/+2
2011-07-18output/httpd: add missing g_free in error pathJonathan Neuschäfer1-0/+1
2011-03-18output/httpd: include sys/socket.h only when building with libwrapMax Kellermann1-1/+1
Fixes build failure on WIN32.
2011-03-09output/httpd: include sys/socket.h for AF_UNIXUlrich Spörlein1-0/+1
2011-02-09output/httpd: initialize unflushed_inputThomas Jansen1-0/+1
This fixes the following valgrind warning occuring on the first call of httpd_output_read_page: ==20124== Conditional jump or move depends on uninitialised value(s) ==20124== at 0x425E65: httpd_output_read_page (httpd_output_plugin.c:240) ==20124== by 0x426087: httpd_output_open (httpd_output_plugin.c:279) ==20124== by 0x41D862: ao_open (output_plugin.h:206) ==20124== by 0x41E133: audio_output_task (output_thread.c:590)
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-11-05output/httpd: implement delay()Max Kellermann1-2/+11
2010-10-05output/httpd: use the new server_socket libraryMax Kellermann1-96/+31
2010-10-05output/httpd: don't close socket in open() failureMax Kellermann1-2/+0
This cleanup call is obsolete, since we moved the binding code to enable()/disable().
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.
2010-09-25output/httpd: bind_to_address support (including IPv6)Thomas Jansen1-12/+52
Added support for a new optional configuration setting for the httpd output named "bind_to_address". Setting it to a specific IP address (v4 or v6) will cause the httpd output to bind to that address exclusively. Supporting multiple addresses in parallel is future work. This implements the feature requests #2998 and #2646.
2010-09-23output/httpd: access sockaddr_storage object directlyMax Kellermann1-3/+2
Work around aliasing warning.
2010-08-31output/httpd: implement "pause"Max Kellermann1-0/+19
Send silence to all connected clients while paused, to avoid connection interruption.
2010-08-31output/httpd: forced flush after 32 kB of input dataMax Kellermann1-0/+15
Avoid buffer underruns on the streaming client, if the encoder is "too efficient" (e.g. when encoding silence while paused).
2010-06-06output/httpd: add libwrap supportTim Phipps1-0/+28
libwrap support is in MPD but only for the control port. This patch adds support for the http port. The code is copied from src/client_new.c
2010-04-05output/httpd: added name/genre/website configurationJames Pike1-0/+6
2010-03-22Add support for building httpd_output plugin for win32Avuton Olrich1-0/+5
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-03httpd: use get_mime_type to determine encoder contentViliam Mateicka1-7/+6
2009-11-12include config.h in all sourcesMax Kellermann1-0/+1
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-11-08fd_util: added O_NONBLOCK functionsMax Kellermann1-1/+2
Changed the wrappers for pipe(), socket(), accept(). On WIN32, this does not work for pipe().
2009-11-07set the close-on-exec flag on all file descriptorsMax Kellermann1-2/+3
Added the "fd_util" library, which attempts to use the new thread-safe Linux system calls pipe2(), accept4() and the options O_CLOEXEC, SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is not thread safe. This is particularly important for the "pipe" output plugin (and others, such as JACK/PulseAudio), because we were heavily leaking file descriptors to child processes.
2009-11-07output/httpd: moved code to httpd_output_bind()Max Kellermann1-28/+48
2009-11-05output/httpd: bind port when output is enabledMax Kellermann1-13/+42
Implement the methods enable() and disable(). Bind the HTTP port in the enable() method, but reject all incoming connections until the output is opened.
2009-10-29httpd: add config option to limit number of clientsViliam Mateicka1-3/+14
2009-10-13tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann1-3/+2
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-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 Kellermann1-15/+24
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-13Implemented basic icy support for the httpd outputHagen Schink1-1/+36
[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-17httpd: fixed encoder plugin checkJeffrey Middleton1-1/+1
Check if encoder_plugin!=NULL, not encoder_plugin_get (which is a function).
2009-03-15httpd: new output plugin to replace "shout"Max Kellermann1-0/+393
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.