aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-12-27disable archive API without pluginsMax Kellermann5-5/+33
When there are no archive plugins, we do not need the archive API at all. Drop all its overhead.
2008-12-24playlist: fix stored playlist modifications with absolute pathsMax Kellermann3-2/+20
When save_absolute_paths_in_playlists was enabled in mpd.conf, MPD broke all playlists when manipulated using the "playlistdelete" command. The reason was that map_directory_child_fs() was used, which doesn't accept slashes in the file name. Use the new map_uri_fs() function instead.
2008-12-24stored_playlist: fix integer overflow in length estimationMax Kellermann1-1/+1
With a large maximum playlist length, the integer multiplication "playlist_max_length * MPD_PATH_MAX" may overflow. Change that to a division. This was not a dangerous bug, since it was only used for a quick estimate.
2008-12-24ffmpeg: case AV_NOPTS_VALUE to int64_tMax Kellermann1-2/+2
The old code casted it to a 32 bit integer, which cut off bits. AVFormatContext.duration is a int64_t, so use this type.
2008-12-24ffmpeg: don't assign "0" to pointerMax Kellermann1-1/+1
Use NULL instead. Found by sparse.
2008-12-24Makefile.am: fix sparse invocationMax Kellermann1-1/+4
Added missing includes.
2008-12-24mp3: "tag" argument is unused when libid3tag is disabledMax Kellermann1-2/+2
Add G_GNUC_UNUSED attributes.
2008-12-24listen: "port" argument is unused when TCP support is disabledMax Kellermann1-1/+2
Add a G_GNUC_UNUSED attribute.
2008-12-24pcm_utils: check pcm_convert()==0Max Kellermann3-5/+16
It is illegal to pass an empty audio buffer around. pcm_resample() sometimes seems to result in 0 samples, maybe related to libsamplerate. To work around that problem, add special checks after both pcm_convert() invocations. Removed the pcm_resample()==0 checks from pcm_convert().
2008-12-24client: always attempt to flush deferred buffersMax Kellermann1-2/+11
When a response is very long (e.g. a large playlist > 100k songs), most of it will end up in the deferred buffers. Filling the deferred queue is very expensive currently, because a new buffer is allocated for every client_write() operation. This may lead to long delays, and the client might give up and disconnect meanwhile. This patch makes MPD attempt to flush the deferred queue as often as possible, to work around this problem. Due to the MPD 0.14 code freeze, we should not optimize the buffering code now.
2008-12-23shout: fixed bad error message printoutViliam Mateicka1-2/+2
2008-12-23shout: fixed bad error message printoutViliam Mateicka1-3/+3
2008-12-20Remove obsolete http_buffer* stuff that went away with the new curl backend.Avuton Olrich2-4/+0
2008-12-20log: map log level "SECURE" to GLib's "INFO"Max Kellermann1-3/+3
Make "secure" a log level different from "default". "secure" should be right between "default" and "verbose". Map "default" to Glib's "MESSAGE" log level.
2008-12-17Remove useless statement.Emanuele Giaquinta1-1/+0
2008-12-17player_control: check if errored_song is setMax Kellermann1-4/+14
getPlayerErrorStr() assumes that pc.errored_song is set when an error occured. Since the song may have been deleted meanwhile, add a NULL check.
2008-12-17playlist: clear pc.errored_song on deleteMax Kellermann3-2/+23
When a (remote) song is deleted from the playlist, there may still be a reference to it in pc.errored_song. Clear this reference.
2008-12-17Remove useless computation. After the pthread_cond_wait loop there are at ↵Emanuele Giaquinta1-2/+0
least MIN(od->bufferSize, size) free bytes in the buffer. Thus MIN(od->bufferSize - od->len, size) is always equal to MIN(od->bufferSize, size).
2008-12-17Remove useless statement, curpos is initialized at the beginning of the loop.Emanuele Giaquinta1-1/+0
2008-12-17Factor computation.Emanuele Giaquinta1-4/+6
2008-12-17Use MIN.Emanuele Giaquinta1-2/+2
2008-12-17Call CloseComponent after AudioUnitUninitialize.Emanuele Giaquinta1-1/+1
2008-12-16archiveapi: archive plugin for ISO filesViliam Mateicka3-0/+266
2008-12-16archiveapi: archive plugin for ZIP filesViliam Mateicka3-0/+203
2008-12-16archiveapi: archive plugin for BZ2 filesViliam Mateicka3-0/+317
2008-12-16update: adding archive updating related codeViliam Mateicka1-1/+64
2008-12-16song: adding support for songs in archivesViliam Mateicka3-1/+39
2008-12-16ls: adding get_archive_by_suffix() functionViliam Mateicka2-0/+19
2008-12-16new archive api, input_archive streamViliam Mateicka11-2/+578
2008-12-16command: reject unsupported URI schemesMax Kellermann1-1/+11
When a client-specified URI has a scheme which is not supported, do not try to open it as a local file, but provide a meaningful error message.
2008-12-16ls: added uri_has_scheme()Max Kellermann2-0/+10
uri_has_scheme() checks if an URI contains the sub string "://", which makes MPD assume that it is a remote URI.
2008-12-16ls: don't return suffix from parent directory nameMax Kellermann1-1/+1
When a file had no file name extension, getSuffix() could return the extension of the parent directory (if it had one).
2008-12-16ls: reimplement getSuffix() with strrchr()Max Kellermann1-8/+2
The old getSuffix() code was quite wasteful, and can be replaced completely with strrchr().
2008-12-16ls: use boolMax Kellermann2-6/+7
Use the C99 "bool" data type instead of "int".
2008-12-16ls: make printRemoteUrlHandlers() return voidMax Kellermann3-5/+4
printRemoteUrlHandlers() cannot fail, and does not need a return value.
2008-12-16ls: removed isValidRemoteUtf8Url()Max Kellermann5-46/+4
The function didn't do anything useful, it was just several lines obfuscating that it was only forwarding isRemoteUrl()'s return value.
2008-12-16ls: don't include time.hMax Kellermann1-2/+0
ls.h does not need time.h, do not include it.
2008-12-15ffmpeg: fixing ffmpeg_send_packet to allow multipacketsViliam Mateicka1-16/+32
2008-12-15ffmpeg: adding APE supportViliam Mateicka1-2/+3
2008-12-13locate: ignore case when searching in song pathsMax Kellermann1-1/+1
The function strstrSearchTag() used g_utf8_casefold() to generate the (pseudo-)lowercase version of the song's URL, but it never used the variable.
2008-12-09utils: moving stringFoundInStringArray() from decoder into utilsViliam Mateicka3-11/+14
2008-12-09ao: use 16 bit sample formatMax Kellermann1-0/+6
There have been bug reports on MPD regarding 24 bit output via libao/esd. The "ao" plugin does not attempt fall back to 16 bit currently, and thus fails to play 24 bit audio (i.e. all mp3 files). Make it always use 16 bit samples for now, until more bits are well-tested.
2008-12-08osx: use 16 bit sample formatMax Kellermann1-0/+3
The OS X output does not seem to support 24 bit audio in the way MPD implements it currently. Fall back to 16 bit for now, and schedule 24 bit support on OS X for MPD 0.15.
2008-12-08osx: use GLib instead of utils.h/log.hMax Kellermann1-9/+13
One my_usleep() invocation remains, until we find out if we can delete it.
2008-12-08osx: don't use void pointer in arithmeticMax Kellermann1-2/+2
Cast AudioBuffer.mData to a "unsigned char*" before adding "curpos". This fixes a gcc warning.
2008-12-08mp3: declare variables as "enum mp3_action"Max Kellermann1-2/+2
Variables which hold one of the DECODE_* values should be declared as "enum mp3_action" instead of "int".
2008-12-08update: default to follow all symlinksAvuton Olrich1-1/+1
MPD 0.13 and older followed all symbolic links. Although this can be a security problem (as it has always been), 0.14 should offer the same default behaviour as 0.13.
2008-12-08pcm_utils: always round up resampling buffer sizeMax Kellermann1-1/+1
libsamplerate produces cracks in the sound output when the destination buffer is too small. This is the case when pcm_convert_size() rounds down. Use ceil(x) instead of floor(0.5+x) there to prevent a buffer overrun.
2008-12-04stored_playlist: include time.h for the time_t typeMax Kellermann1-0/+1
On some systems, the time_t data type was not present, because stored_playlist.h didn't include the time.h header directly.
2008-12-03decoder: audiofile plugin using input stream instead of fileViliam Mateicka1-15/+74