aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/file_input_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
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".
2008-10-26input_stream: no CamelCaseMax Kellermann1-35/+36
Renamed all functions and variables.
2008-10-26input_file: removed global constructorMax Kellermann1-4/+0
The global constructor is empty, and can be removed.
2008-10-26input_file: don't export internal methodsMax Kellermann1-7/+25
The methods are only used in inputStream_fileOpen(), and should not be exported.
2008-10-26input_stream: renamed sources, no CamelCaseMax Kellermann1-1/+1
Renamed inputStream.c and inputStream_file.c.
2008-10-17input_stream: removed nmemb argumentMax Kellermann1-3/+2
The nmemb argument isn't actually useful, and one of nmemb and size was always passed as 1. Remove it.
2008-10-17input: declare struct input_streamMax Kellermann1-6/+8
Provide a struct type which can be forward-declared. The typedef InputStream is deprecated now.
2008-08-26added InputStream.readyMax Kellermann1-0/+2
The flag "ready" indicates whether the input stream is ready and it has parsed all meta data. Previously, it was impossible for decodeStart() to see the content type of HTTP input streams, because at that time, the HTTP response wasn't parsed yet.
2008-08-26enable -Wpointer-arith, -Wstrict-prototypesMax Kellermann1-1/+1
Also enable -Wunused-parameter - this forces us to add the gcc "unused" attribute to a lot of parameters (mostly library callback functions), but it's worth it during code refactorizations.
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-8/+1
This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-19Committing posix_fadvise(); normalperson/jat reviewed. Appears fine. Fixes ↵Avuton Olrich1-0/+6
bug #1428. git-svn-id: https://svn.musicpd.org/mpd/trunk@5265 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-38/+44
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-17sparse: ANSI-fy function declarationsEric Wong1-1/+1
These are just warnings from sparse, but it makes the output easier to read. I ran this through a quick perl script, but of course verified the output by looking at the diff and making sure the thing still compiles. here's the quick perl script I wrote to generate this patch: ----------- 8< ----------- use Tie::File; defined(my $pid = open my $fh, '-|') or die $!; if (!$pid) { open STDERR, '>&STDOUT' or die $!; exec 'sparse', @ARGV or die $!; } my $na = 'warning: non-ANSI function declaration of function'; while (<$fh>) { print STDERR $_; if (/^(.+?\.[ch]):(\d+):(\d+): $na '(\w+)'/o) { my ($f, $l, $pos, $func) = ($1, $2, $3, $4); $l--; tie my @x, 'Tie::File', $f or die "$!: $f"; print '-', $x[$l], "\n"; $x[$l] =~ s/\b($func\s*)\(\s*\)/$1(void)/; print '+', $x[$l], "\n"; untie @x; } } git-svn-id: https://svn.musicpd.org/mpd/trunk@4378 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-06-04Return -1 on error, not on success.J. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4247 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-14oops forgot a \n in a debu statementWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1869 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-13debug message for errors in reading the fileWarren Dukes1-0/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@1862 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-07-12attempt to work around for bug #274Warren Dukes1-2/+10
git-svn-id: https://svn.musicpd.org/mpd/trunk@1847 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-20fix qball's bug, crossfading playing with funny samplerateWarren Dukes1-0/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@1585 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-07icy metadata! wahooWarren Dukes1-3/+0
still lots some debug code with print out's, so don't bitch about it! git-svn-id: https://svn.musicpd.org/mpd/trunk@1364 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-31icynames are now copied to title of streamsWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-19use ftell to set offsetWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1081 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-18slight fix for IS_fileWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1069 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-18inputStream updates from httpTestWarren Dukes1-0/+5
git-svn-id: https://svn.musicpd.org/mpd/trunk@1059 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-18can parse inputStream_http can parse mime typeWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@1056 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-18oops forgot to add theseWarren Dukes1-0/+86
git-svn-id: https://svn.musicpd.org/mpd/trunk@1050 09075e82-0dd4-0310-85a5-a0d7c8717e4f