| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Windows compatibility.
|
|
|
|
All close() implementations must call this method.
|
|
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).
|
|
|
|
|
|
This code has never made any sense, and has broken some of the archive
plugin.
|
|
This code has never made any sense, and has broken some of the archive
plugin.
|
|
Add a "mode" argument to open_cloexec() instead.
|
|
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.
|
|
Try to be as portable as possible, use GLib path name functions and
macros.
|
|
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.
|
|
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)]
|
|
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.
|
|
[mk: fixed whitespace errors; use delete_song() instead of
songvec_delete()]
|
|
Allow input plugins to configure with an "input" block in mpd.conf.
Also allow the user to disable a plugin completely.
|
|
Create a sub directory for input plugins.
|
|
Start to separate private from public input_stream API.
|
|
Define G_LOG_DOMAIN.
|
|
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).
|
|
This way, plugins can manipulate the plugin pointer during open().
|
|
|
|
Don't allow users to open a file which is non-regular (e.g. pipes,
devices).
|
|
|
|
|
|
Yet another superfluous buffering layer. input_file was using FILE*,
but we're better off with unbuffered I/O using open(), read(), ...
|
|
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.
|
|
Don't attempt to open a HTTP URL as a local file, and don't send a
local path to libcurl.
|
|
For boolean values and success flags, use bool instead of integer (1/0
for true/false, 0/-1 for success/failure).
|
|
close() shouldn't fail with read-only streams.
|
|
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".
|
|
Renamed all functions and variables.
|
|
The global constructor is empty, and can be removed.
|
|
The methods are only used in inputStream_fileOpen(), and should not be
exported.
|
|
Renamed inputStream.c and inputStream_file.c.
|
|
The nmemb argument isn't actually useful, and one of nmemb and size
was always passed as 1. Remove it.
|
|
Provide a struct type which can be forward-declared. The typedef
InputStream is deprecated now.
|
|
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.
|
|
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.
|
|
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
|
|
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
bug #1428.
git-svn-id: https://svn.musicpd.org/mpd/trunk@5265 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
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
|
|
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
|
|
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
the GPL header where necessary
git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
git-svn-id: https://svn.musicpd.org/mpd/trunk@4247 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
git-svn-id: https://svn.musicpd.org/mpd/trunk@1869 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
git-svn-id: https://svn.musicpd.org/mpd/trunk@1862 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|