aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/plugins/FileInputPlugin.cxx (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-01Copyright year 2015Max Kellermann1-1/+1
2014-10-02input/Open: use OpenLocalInputStream()Max Kellermann1-12/+7
Make the "open" method of plugins "file" and "archive" dummy methods that always fail. Instead, let InputStream::Open() hard-code access to these two plugins by using OpenLocalInputStream(). This allows simplifyin the algorithm for falling back to probing archive plugins.
2014-10-02input/file: export function OpenFileInputStream()Max Kellermann1-13/+26
2014-10-02input/file: generate Error when errno==ENOENTMax Kellermann1-1/+1
This special case was useless. Fixes the dreaded "Unrecognized URI" error message when a file does not exist.
2014-10-02input/file: make the "fd" attribute "const"Max Kellermann1-1/+1
2014-10-02input/file: make variables more localMax Kellermann1-6/+3
2014-10-02input/file: convert to classMax Kellermann1-1/+2
2014-08-19InputStream: make offset_type unsignedMax Kellermann1-3/+3
2014-05-22InputStream: make Seek() always absoluteMax Kellermann1-5/+3
Remove the "whence" parameter that is not actually necessary, and only complicates the InputStream implementations.
2014-05-11InputStream: remove attribute "plugin"Max Kellermann1-1/+1
2014-05-11InputStream: make various methods abstractMax Kellermann1-30/+20
Replace InputPlugin attributes.
2014-05-11InputStream: add virtual destructorMax Kellermann1-9/+0
Replaces the method Close().
2014-05-11input/plugins: make InputStream the base classMax Kellermann1-12/+8
Prepare for adding virtual methods.
2014-05-11InputStream: convert to classMax Kellermann1-2/+2
2014-01-24Input*: move to input/Max Kellermann1-2/+2
2014-01-13copyright year 2014Max Kellermann1-1/+1
2013-12-05fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8Denis Krjuchkov1-1/+1
2013-11-28include cleanup using iwyuMax Kellermann1-2/+0
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)]