aboutsummaryrefslogtreecommitdiffstats
path: root/src/input_stream.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* input_stream: non-blocking I/OMax Kellermann2011-09-161-7/+117
| | | | | | | | | Add GMutex, GCond attributes which will be used by callers to conditionally wait on the stream. Remove the (now-useless) plugin method buffer(), wait on GCond instead. Lock the input_stream before each method call. Do the same with the playlist plugins.
* input_plugin: add method check()Max Kellermann2011-09-161-0/+10
| | | | | To check for errors without reading. The decoder thread wants to do that, before it passes the input stream to the plugin.
* input/file: return NULL instead of "false"Max Kellermann2011-09-151-1/+1
|
* input_plugin: add method update()Max Kellermann2011-09-141-0/+10
| | | | | Update the struct attributes, important for facades like the "rewind" plugin. To replace buffer().
* copyright year 2011Max Kellermann2011-01-291-1/+1
|
* input_stream: added function input_stream_deinit()Max Kellermann2010-01-181-2/+0
| | | | All close() implementations must call this method.
* input_stream: return allocated input_stream objectsMax Kellermann2010-01-011-14/+10
| | | | | | | | 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).
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* Merge vorbis+icy fixes from branch 'v0.15.x'Max Kellermann2009-12-301-0/+3
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile.am NEWS configure.ac src/input/curl_input_plugin.c src/input_stream.c
| * input/rewind: new input_stream wrapper to allow stream rewindingMax Kellermann2009-12-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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).
* | input_stream: return errors with GErrorMax Kellermann2009-12-151-9/+28
| |
* | input_stream: moved input_stream_global_init() to input_init.cMax Kellermann2009-12-141-51/+0
| |
* | input_stream: moved plugin list to input_registry.cMax Kellermann2009-12-141-30/+2
| |
* | input_stream: make input_plugins NULL terminatedMax Kellermann2009-12-141-7/+5
| | | | | | | | This is easier to traverse.
* | include config.h in all sourcesMax Kellermann2009-11-121-1/+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.
* | input/lastfm: removed obsolete last.fm input pluginMax Kellermann2009-10-131-5/+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.
* | input_stream: use "goffset" instead of "off_t"Max Kellermann2009-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | configure.ac: rename HAVE_CURL to ENABLE_CURLMax Kellermann2009-09-241-2/+2
|/
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | 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.
* input_lastfm: new input plugin for last.fm radioMax Kellermann2009-03-021-0/+5
| | | | | | | 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.
* input: pass config_param to input_plugin.init()Max Kellermann2009-03-021-5/+39
| | | | | Allow input plugins to configure with an "input" block in mpd.conf. Also allow the user to disable a plugin completely.
* input_plugin: added methods init(), finish()Max Kellermann2009-03-021-6/+9
| | | | | | Instead of hard-coding the plugin global initialization in input_stream_global_init(), make it walk the plugin list and initialize all plugins.
* input: moved plugins to ./src/input/Max Kellermann2009-03-021-4/+4
| | | | Create a sub directory for input plugins.
* input_stream: moved struct input_plugin to input_plugin.hMax Kellermann2009-03-021-1/+1
| | | | Start to separate private from public input_stream API.
* input_stream: make seek(), buffer() optionalMax Kellermann2009-01-301-0/+7
| | | | | | Make those two methods optional to implement, and let input_stream.c provide fallbacks. The buffer() method will be removed one day, and there is now only one implementation left (input_curl.c).
* input_stream: let the implementation assign is->pluginMax Kellermann2009-01-301-1/+7
| | | | This way, plugins can manipulate the plugin pointer during open().
* added support for the MMS protocolMax Kellermann2009-01-291-0/+7
| | | | | | | This patch implements the MMS protocol, by using libmms. It is quite experimental: it does not support seeking yet, and it is currently using synchronous I/O, which causes MPD to hang while waiting for the server.
* input_stream: added tag() methodMax Kellermann2009-01-031-4/+10
| | | | | The tag() method reads a tag from the stream. This replaces the meta_name and meta_title attributes.
* disable archive API without pluginsMax Kellermann2008-12-271-0/+5
| | | | | When there are no archive plugins, we do not need the archive API at all. Drop all its overhead.
* new archive api, input_archive streamViliam Mateicka2008-12-161-0/+2
|
* input_stream: size==-1 means unknown sizeMax Kellermann2008-11-161-1/+1
| | | | | | Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
* decoder: check length==0 in decoder_read()Max Kellermann2008-11-151-0/+4
| | | | | When the caller passes length==0, decoder_read() entered an endless loop. Check that condition before entering the "while" loop.
* input_stream: pass const url to input_stream_open()Max Kellermann2008-10-311-1/+1
|
* input_stream: convert offset and size to the off_t data typeMax Kellermann2008-10-281-1/+1
| | | | | | size_t and long aren't 64 bit safe (i.e. files larger than 2 GB on a 32 bit OS). Use off_t instead, which is a 64 bit integer if compiled with large file support.
* input_stream: use g_free() in input_stream_close()Max Kellermann2008-10-261-8/+5
| | | | g_free() allows passing the NULL pointer.
* input_stream: use "bool" instead of "int"Max Kellermann2008-10-261-7/+9
| | | | | For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
* input_stream: input_stream_close() returns voidMax Kellermann2008-10-261-2/+2
| | | | close() shouldn't fail with read-only streams.
* input_stream: added struct input_pluginMax Kellermann2008-10-261-11/+22
| | | | | | | Instead of managing a set of method pointers in each input_stream struct, move these into the new input_plugin struct. Each input_stream has only a pointer to the plugin struct. Pointers to all implementations are kept in the array "input_plugins".
* input_stream: no CamelCaseMax Kellermann2008-10-261-31/+31
| | | | Renamed all functions and variables.
* input_file: removed global constructorMax Kellermann2008-10-261-1/+0
| | | | The global constructor is empty, and can be removed.
* input_stream: renamed sources, no CamelCaseMax Kellermann2008-10-261-0/+98
Renamed inputStream.c and inputStream_file.c.