aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mikmod: call MikMod_Exit() only in the finish() methodMatthias Drochner2009-01-301-6/+0
| | | | | | | | | | | | | | | Hi - independently of libmikmod's other problems - there seems to be a problem in mpd's wrapper: MikMod_Exit() is called after the first file is decoded, which frees some ressources within the mikmod library. An attempt to play a second file leads to a crash. The appended patch fixes this for me. (I don't know what the "dup" entry is good for - someone who knows should review that too.) best regards Matthias [mk: removed 3 more MikMod_Exit() invocations]
* wavpack: pass NULL if the .wvc file fails to openMax Kellermann2009-01-301-1/+3
| | | | | | The wavpack library seems to use the .wvc stream even if the OPEN_WVC flag is not set. In this case, pass NULL to be sure libwavpack won't use it.
* ffmeg: added support for the tags comment, genre, yearDavid Horn2009-01-301-0/+10
| | | | | | | | | | | | ffmpeg_tag_internal() does not look for a few tags that mpd supports. Most noteably: comment -> TAG_ITEM_COMMENT -> Description genre -> TAG_ITEM_GENRE -> WM/Genre (not WM/GenreID) year -> TAG_ITEM_DATE -> WM/Year I *think* that this is the last of the tags that AVFormatContext() in ffmpeg supports that mpd also uses.
* use g_free() instead of free()Max Kellermann2009-01-252-3/+3
| | | | | | On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
* renamed the "mod" decoder plugin to "mikmod"Max Kellermann2009-01-241-2/+2
| | | | | We have two mod plugins now: modplug and mod. Rename the latter to a more useful name.
* modplug: removed EOF check from the while loopMax Kellermann2009-01-241-2/+4
| | | | | EOF is checked by input_stream_read() (decoder_read() here). Don't do it twice. The check was wrong anyway, it was reversed.
* modplug: check for input_stream errorsMax Kellermann2009-01-241-2/+8
| | | | | When input_stream_read() returns 0, and input_stream_eof() returns false, an I/O error has occured. Skip this song.
* modplug: use size_t instead of int for buffer sizesMax Kellermann2009-01-241-1/+1
|
* modplug: check size limit before appending new bufferMax Kellermann2009-01-241-4/+4
| | | | | Don't enlarge the GByteArray when the size limit may overflow in this operation; check the size limit first.
* modplug: use GByteArray.len, remove total_lenMax Kellermann2009-01-241-4/+2
| | | | | The local variable "total_len" is superfluous because GByteArray always knows its size.
* modplug: unknown size is -1; check for empty fileMax Kellermann2009-01-241-5/+12
| | | | | | The input_stream API sets size to -1 when the size of the resource is not known. The modplug decoder checked for size==0, which would be an empty file.
* modplug: header cleanupMax Kellermann2009-01-241-2/+0
| | | | Don't include utils.h and log.h, they are relics from the past.
* modplug: define G_LOG_DOMAINMax Kellermann2009-01-241-0/+3
| | | | Make sure that log messages are decorated correctly.
* modplug: declare constants as enumMax Kellermann2009-01-241-4/+6
| | | | Don't write CPP if you can write C.
* modplug: use only decoder_read(), not input_stream_read()Max Kellermann2009-01-241-5/+1
| | | | | | You are allowed to call decoder_read() with decoder==NULL. It is a convenience function provided by the decoder API. Don't manually fall back to input_stream_read().
* modplug: change settings before loading a fileAndrzej Rybczak2009-01-241-6/+8
| | | | | alternative settings must be set before the file is loaded, otherwise they won't be respected.
* flac: include config.hMax Kellermann2009-01-191-0/+1
| | | | | The plugin queries build-time configuration variables, and should include config.h.
* conf: use config_get_bool() instead of getBoolConfigParam()Max Kellermann2009-01-171-4/+2
|
* moved fallback APE/ID3 tag loader to song.cMax Kellermann2009-01-175-57/+19
| | | | | | Some plugins used the APE or ID3 tag loader as a fallback when their own methods of loading tags did not work. Move this code out of all decoder plugins, into song_file_update().
* oggvorbis: disable seeking on remote songsMax Kellermann2009-01-171-5/+27
| | | | | | | | | | | | When libvorbis knows that a song is seekable, it seeks around like crazy in the file before starting to decode it. This is very expensive on remote HTTP resources, and delays MPD for 10 or 20 seconds. This patch disables seeking on remote songs, because the advantages of quickly playing a song seem to weigh more than the theoretical ability of seeking for most MPD users. If users feel this feature is needed, we will make a configuration option for that.
* Enable wav file streaming for ffmpeg input pluginQball Cow2009-01-161-0/+1
|
* flac: map "Album Artist" to "AlbumArtist"Rasmus Steinke2009-01-151-1/+3
| | | | | This patch allows mpd to recognise the albumartist tag in the way foobar2000 and others write it to files.
* flac: splitted flac_copy_vorbis_comment()Max Kellermann2009-01-151-37/+38
| | | | | Splitted flac_copy_vorbis_comment() into flac_copy_comment() and flac_copy_comment().
* flac: moved code to flac_comment_value()Max Kellermann2009-01-151-5/+26
| | | | | Simplify flac_copy_vorbis_comment() by moving the comment identification code out.
* flac: always allocate tag objectMax Kellermann2009-01-154-31/+43
| | | | | Free the tag object when it turns out to be empty. This simplifies several functions and APIs.
* flac: use bool instead of intMax Kellermann2009-01-152-42/+37
|
* flac: removed "vorbis_comment_found" flagMax Kellermann2009-01-151-10/+4
| | | | Use tag_is_empty() instead.
* flac: no CamelCaseMax Kellermann2009-01-154-186/+204
| | | | Renamed types, functions, variables.
* oggvorbis: map "Album Artist" to "AlbumArtist"Rasmus Steinke2009-01-151-1/+3
| | | | | This patch allows mpd to recognise the albumartist tag in the way foobar2000 and others write it to files.
* oggvorbis: use g_ascii_strncasecmp() instead of strncasecmp()Max Kellermann2009-01-141-3/+3
| | | | | Don't depend on the daemon's locale settings. Comment names are ASCII.
* oggvorbis: moved tag look into vorbis_parse_comment()Max Kellermann2009-01-141-23/+13
| | | | | | vorbis_parse_comment() should be a function which converts one comment to a tag item. It should do everything required to do the conversion, including looping over all possible tag types.
* oggvorbis: moved code to vorbis_copy_comment()Max Kellermann2009-01-141-9/+21
|
* oggvorbis: use vorbis_comment_value() in vorbis_parse_comment()Max Kellermann2009-01-141-5/+4
| | | | Eliminate some duplicate code.
* oggvorbis: always allocate a tag objectMax Kellermann2009-01-141-8/+14
| | | | | | Always allocate a new tag object before parsing the vorbis comments; free it when it turns out to be empty. This simplifies the code a bit.
* oggvorbis: no CamelCaseMax Kellermann2009-01-141-59/+63
| | | | Renamed functions and variables.
* oggvorbis: use boolMax Kellermann2009-01-141-5/+5
| | | | Make ogg_parseCommentAddToTag() return bool instead of unsigned int.
* added missing explicit config.h includesMax Kellermann2009-01-086-1/+7
|
* fix G_BYTE_ORDER checkMax Kellermann2009-01-051-1/+1
| | | | "#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
* use GLib byte order macrosMax Kellermann2009-01-051-1/+1
|
* song: allocate the result of song_get_url()Max Kellermann2009-01-041-3/+4
|
* utils: removed unused functionsMax Kellermann2009-01-031-0/+2
| | | | | Removed all allocation functions, xwrite(), xread(), ARRAY_SIZE(). Those have been superseded by GLib.
* oggflac: don't use gcc.hMax Kellermann2009-01-021-9/+10
| | | | | Use G_GNUC_UNUSED instead of mpd_unused (which has already been removed).
* decoder plugins: don't include gcc.hMax Kellermann2009-01-015-12/+17
| | | | Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
* removed os_compat.hMax Kellermann2008-12-291-0/+2
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* mp4: support the writer/composer tagFrank Mulder2008-12-291-0/+2
| | | | | | | | | | I tried to search for a certain composer in my collection, but only non-mp4 files showed up. The source code reveals that this tag is not read. This can be fixed by reading the 'Writer' tag field, in mp4_plugin.c, in function mp4_load_tag. I actually tried this, and after compiling with those lines added, also mp4 (.m4a) files showed up when searching for a composer.
* mikmod: use Glib instead of utils.h/log.hMax Kellermann2008-12-281-9/+6
|
* mikmod: convert mod_Data.audio_buffer to a static arrayMax Kellermann2008-12-281-3/+1
| | | | Don't do two allocations for the mod_Data structure.
* decoder: new plugin using modplug libraryViliam Mateicka2008-12-281-0/+200
|
* Add RVA2 tag support to MPDPauli Virtanen2008-12-281-0/+94
| | | | | | | | | | This patch adds RVA2 (relative volume adjustment) tag support to mpd, as a fallback if no replaygain tags are found. The code is almost directly from madplay (GPL). RVA2 tags are generated for example by the "normalize" utility. Updated by: Avuton Olrich <avuton@gmail.com>
* audiofile: don't close onput stream in libaudiofile destroy()Max Kellermann2008-12-271-2/+3
| | | | | | The input_stream object should only be closed by the MPD core (i.e. decoder_thread.c / decoder_run()). A decoder plugin which attempts to close it will result in a segmentation fault.