aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/FileInputPlugin.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-10-23input_stream: rename struct to InputStreamMax Kellermann1-6/+6
2013-10-23InputInternal: remove obsolete libraryMax Kellermann1-1/+0
2013-10-17fs/Path: move definitions to struct PathTraitsMax Kellermann1-2/+2
2013-10-17InputStream: use int64_t instead of goffsetMax Kellermann1-2/+3
Decouple some more from GLib.
2013-10-17input_plugin: rename struct to "InputPlugin"Max Kellermann1-1/+1
2013-10-14fs/Path: add method IsAbsolute()Max Kellermann1-1/+2
2013-10-02Log: new logging library APIMax Kellermann1-3/+0
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04util/Error: new error passing libraryMax Kellermann1-16/+13
Replaces GLib's GError.
2013-08-07Makefile.am: move sources to libsystem.aMax Kellermann1-1/+1
2013-01-28InputStream: add constructor/destructorMax Kellermann1-5/+2
Eliminate input_stream_init() and input_stream_deinit().
2013-01-27DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCondMax Kellermann1-2/+2
2013-01-26input_stream: forward-declare the structMax Kellermann1-0/+1
Hide the definition from C code, to prepare the transition to C++.
2013-01-25input_{internal,plugin}: convert to C++Max Kellermann1-2/+2
2013-01-21input/file,mms: convert to C++Max Kellermann1-30/+41
2012-10-04input/file: use errno_quark()Max Kellermann1-11/+6
2011-09-16input_stream: non-blocking I/OMax Kellermann1-2/+5
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.
2011-09-15input/file: return NULL instead of "false"Max Kellermann1-4/+4
2011-09-14input_stream: move input_stream_init(), _deinit() to _internal.cMax Kellermann1-0/+1
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-05-20input/file, output/{fifo,recorder}: add O_BINARY to open() flagsMax Kellermann1-2/+2
Windows compatibility.
2010-01-18input_stream: added attribute "uri"Max Kellermann1-1/+1
2010-01-18input_stream: added function input_stream_deinit()Max Kellermann1-0/+1
All close() implementations must call this method.
2010-01-01input_stream: return allocated input_stream objectsMax Kellermann1-18/+26
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 Olrich1-1/+1
2009-12-15input_stream: return errors with GErrorMax Kellermann1-13/+25
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-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-11input_stream: use "goffset" instead of "off_t"Max Kellermann1-2/+3
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-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-03-13all: Update copyright header.Avuton Olrich1-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.
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-02input: pass config_param to input_plugin.init()Max Kellermann1-0/+1
Allow input plugins to configure with an "input" block in mpd.conf. Also allow the user to disable a plugin completely.
2009-03-02input: moved plugins to ./src/input/Max Kellermann1-1/+1
Create a sub directory for input plugins.
2009-03-02input_stream: moved struct input_plugin to input_plugin.hMax Kellermann1-0/+1
Start to separate private from public input_stream API.
2009-02-17input_file, input_curl, icy_metadata: added GLib log domainsMax Kellermann1-0/+3
Define G_LOG_DOMAIN.
2009-01-30input_stream: make seek(), buffer() optionalMax Kellermann1-7/+0
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).
2009-01-30input_stream: let the implementation assign is->pluginMax Kellermann1-0/+1
This way, plugins can manipulate the plugin pointer during open().
2008-11-24input_file.c: replaced mpd_unused by G_GNUC_UNUSEDThomas Jansen1-2/+1
2008-10-29input_file: refuse to open non-regular filesMax Kellermann1-0/+7
Don't allow users to open a file which is non-regular (e.g. pipes, devices).
2008-10-29input_file: check fstat() failureMax Kellermann1-0/+6
2008-10-29input_file: use GLib for loggingMax Kellermann1-3/+3
2008-10-28input_file: don't use buffered I/OMax Kellermann1-28/+31
Yet another superfluous buffering layer. input_file was using FILE*, but we're better off with unbuffered I/O using open(), read(), ...
2008-10-28input_stream: convert offset and size to the off_t data typeMax Kellermann1-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.
2008-10-27input_file, input_curl: check URL type before attempting to openMax Kellermann1-0/+3
Don't attempt to open a HTTP URL as a local file, and don't send a local path to libcurl.
2008-10-26input_stream: use "bool" instead of "int"Max Kellermann1-6/+6
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
2008-10-26input_stream: input_stream_close() returns voidMax Kellermann1-7/+2
close() shouldn't fail with read-only streams.
2008-10-26input_stream: added struct input_pluginMax Kellermann1-25/+13
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".