aboutsummaryrefslogtreecommitdiffstats
path: root/src/input (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-07-20input/curl: remove assertion after curl_multi_fdset()Max Kellermann1-2/+0
Some users reported that MPD crashes when using a new CURL version with the threaded DNS resolver enabled. It seems that curl_multi_fdset() returns no file descriptor when the DNS resolver runs in another thread, so MPD does not have any event to wait for. On the CURL mailing list, somebody suggested to sleep for a fixed amount of time. This is not an elegant solution, because daemons should never have to sleep without waiting for an event. I hope the CURL developers will review the API and remove the threaded DNS resolver. Meanwhile, I'm removing the assertion in question, to allow those unfortunate users running the latest CURL version to continue using MPD.
2010-07-20input/curl: query timeout from CURLMax Kellermann1-1/+18
Use curl_multi_timeout() to determine the select() timeout, instead of hard-coding one second.
2010-05-20input/file, output/{fifo,recorder}: add O_BINARY to open() flagsMax Kellermann1-2/+2
Windows compatibility.
2010-05-18input/ffmpeg: new input plugin using libavformat's "avio" libraryMax Kellermann2-0/+196
2010-05-18input/mms: removed empty method buffer()Max Kellermann1-8/+0
input_stream_buffer() has a check for "buffer==NULL", so we don't need an explicit empty implementation.
2010-05-18input/mms: initialize the "eof" attributeMax Kellermann1-0/+2
2010-05-18input/mms: fix memory leak in error handlerMax Kellermann1-0/+1
2010-01-18input_stream: added attribute "uri"Max Kellermann4-4/+4
2010-01-18input_stream: added function input_stream_deinit()Max Kellermann4-0/+4
All close() implementations must call this method.
2010-01-04input/rewind: enable the "rewind" wrapper for all non-seekable streamsMax Kellermann2-15/+2
Don't limit the "rewind" input plugin to CURL streams.
2010-01-01input_stream: return allocated input_stream objectsMax Kellermann6-134/+136
Major API redesign: don't let the caller allocate the input_stream object. Let each input plugin allocate its own (derived/extended) input_stream pointer. The "data" attribute can now be removed, and all input plugins simply cast the input_stream pointer to their own structure (with an "struct input_stream base" as the first attribute).
2009-12-31Update copyright notices.Avuton Olrich10-10/+10
2009-12-31archive: use reference counting for archive+inputMax Kellermann1-4/+1
Make the input_stream implementation hold a reference on the archive_file object. Allow the caller to "close" the archive_file object immediately, no matter if the open_stream() method has succeeded or not.
2009-12-31input/archive: don't initialize input_stream.readyMax Kellermann1-2/+0
The archive plugin should decide this.
2009-12-30input/curl: removed the built-in rewinding codeMax Kellermann1-181/+10
This has been reimplemented in the "rewind" input plugin.
2009-12-29input/rewind: new input_stream wrapper to allow stream rewindingMax Kellermann4-0/+309
This replaces the rewinding buffer code from the CURL input plugin. It is more generic, and allows rewinding even when the server sends Icy-Metadata (which would have been too difficult to implement within the CURL plugin). This is a rather complex patch for the stable branch (v0.15.x), but it fixes a serious problem: the "vorbis" decoder plugin was unable to play streams with Icy-Metadata, because it couldn't rewind the stream after detecting the codec (Vorbis vs. FLAC).
2009-12-16archive_plugin: use GError in the open() methodMax Kellermann1-1/+1
2009-12-16input/archive: check for archive_file_open() errorsMax Kellermann1-0/+2
This fixes a NULL pointer dereference in case of archive plugin failure.
2009-12-16archive_plugin: wrap method callsMax Kellermann1-3/+3
Make archive_file a "real" struct, extended by all plugins. Add the plugin pointer to it. Wrap all method calls in functions.
2009-12-15input_stream: return errors with GErrorMax Kellermann4-60/+108
2009-12-15input/archive: use g_path_is_absolute()Max Kellermann1-1/+1
.. instead of manually checking pathname[0]=='/'. g_path_is_absolute() is portable.
2009-12-15input/archive: close the archive file on errorMax Kellermann1-0/+1
Fixed memory leak in error handler.
2009-12-15input/file: don't fall back to parent directoryMax Kellermann1-18/+3
This code has never made any sense, and has broken some of the archive plugin.
2009-12-15input/file: don't fall back to parent directoryMax Kellermann1-18/+3
This code has never made any sense, and has broken some of the archive plugin.
2009-12-14input_plugin: method init() returns errors with GErrorMax Kellermann1-1/+2
Not used by any plugin currently, but this eliminates the g_error() call in input_plugin_config(), so it's worth it.
2009-11-12include config.h in all sourcesMax Kellermann3-1/+3
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-10configure.ac: require GLib 2.12Max Kellermann1-0/+1
Drop the required GLib version from 2.16 to 2.12, because many current systems still don't have GLib 2.16. This requires several new compatibility functions in glib_compat.h.
2009-11-10input/lastfm: fixed variable name in GLib<2.16 code pathMax Kellermann1-1/+1
Should be "lastfm_user", not "lastfm_username".
2009-11-10fd_util: removed creat_cloexec()Max Kellermann1-1/+1
Add a "mode" argument to open_cloexec() instead.
2009-11-07set the close-on-exec flag on all file descriptorsMax Kellermann1-1/+2
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-10-20mapper, update, ...: use g_build_filename(), G_DIR_SEPARATOR, ...Max Kellermann1-1/+1
Try to be as portable as possible, use GLib path name functions and macros.
2009-10-13input/lastfm: removed obsolete last.fm input pluginMax Kellermann2-494/+0
This has been replaced by the last.fm playlist plugin. The input plugin has never worked well, and was just a playground to experiment with the last.fm radio protocol.
2009-10-13input/curl: fixed endless loop during bufferingMax Kellermann1-1/+1
When the connection is lost while buffering, the CURL input plugin may enter an endless loop, because it does not check the EOF condition. This patch makes fill_buffer() return success only if there's at least one buffer, which is enough of a check.x
2009-10-13tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann2-6/+6
2009-10-13configure.ac: require GLib 2.16Max Kellermann2-18/+0
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-11input_stream: use "goffset" instead of "off_t"Max Kellermann4-12/+13
The "off_t" type may change when you enable or disable large file support on 32 bit platforms. This caused severe ABI problems within MPD when we enabled LFS for the first time: two sources included config.h and sys/types.h in different order, and had different off_t sizes - leading to memory corruption because of ABI incompatibility. This patch attempts to get rid of all public "off_t" uses: it removes "off_t" from the input_stream ABI/API, and switches to GLib's 64 bit "goffset" type. This may hurt 32 bit embedded platforms a tiny bit, but that's not even measurable.
2009-10-11input/curl: don't abort if a packet has only metadataMax Kellermann1-20/+22
When a received chunk of data has only icy-metadata, there was no usable data left for input_curl_read() to return, and thus it returned 0 bytes. "0" however is a special value for "end of file" or "error". This patch makes input_curl_read() read more data from the socket, until the read request can be fulfilled (or until there's really EOF).
2009-10-11input/curl: moved code to fill_buffer()Max Kellermann1-27/+40
2009-09-20input/mms: fix G_LOG_DOMAIN valueSerge Ziryukin1-1/+1
2009-07-28input/lastfm: Ensure multiple identical xml entities are decoded.Courtney Cavin1-6/+5
Previously, if two identical entities appeared in one string, only the first would get decoded. This fixes that bug.
2009-07-28input/lastfm: use metadataCourtney Cavin1-43/+297
Added a patch to flush out the last.fm input plugin slightly. It basically turns it into a wrapper for the appropriate plugin. Most notably metadata is now extracted.
2009-05-28input/file: log message on errorMathieu Rochette1-0/+2
If a file is removed the library, next time mpd will try to play it it will result in an error 'ERROR: problems decoding some/file.ogg'. Nothing is written in log files (verbose mode or not) [mk: append strerror(errno)]
2009-04-28input_curl: use g_ascii_strcasecmp() instead of strcasecmp()Max Kellermann1-7/+7
strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
2009-04-25curl: moved proxy settings to "input" blockMax Kellermann1-24/+26
The old global settings "http_proxy_host", "http_proxy_port", "http_proxy_user" and "http_proxy_password" continue to work.
2009-03-27Add winsock2 headers for curl's use of select() on socketsSean McNamara1-1/+7
2009-03-13all: Update copyright header.Avuton Olrich10-51/+61
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-09decoder_plugin: added method container_scan()Jochen Keil1-2/+17
[mk: fixed whitespace errors; use delete_song() instead of songvec_delete()]
2009-03-06curl: reverse GLIB_CHECK_VERSION()Max Kellermann1-1/+1
The GLIB_CHECK_VERSION() macro was used improperly, which broke build on GLib < 2.14. Add a "!" for negation.
2009-03-02input_lastfm: new input plugin for last.fm radioMax Kellermann2-0/+252
The lastfm input plugin enables MPD to play lastfm:// URLs. This plugin is not complete yet: it plays only the first song in the last.fm playlist, and the playlist parser isn't even implemented properly.
2009-03-02input: pass config_param to input_plugin.init()Max Kellermann4-1/+5
Allow input plugins to configure with an "input" block in mpd.conf. Also allow the user to disable a plugin completely.