aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder (follow)
Commit message (Collapse)AuthorAgeFilesLines
* faad: use faacDecFrameInfo instead of NeAACDecFrameInfoMax Kellermann2009-02-191-1/+1
| | | | Don't use libfaad's internal type names.
* mp4ff: always free the mp4ff_read_sample() bufferMax Kellermann2009-02-181-2/+2
| | | | | When mp4ff_read_sample() returns a value bigger than zero, it guarantees that the buffer is set. Remove the check.
* mp4ff: don't allocate seek_table when input is not seekableMax Kellermann2009-02-181-2/+10
| | | | Don't waste any precious memory when the seek_table cannot be used.
* mp4ff: include cleanupMax Kellermann2009-02-181-4/+4
| | | | Don't include limits.h, use GLib constants instead.
* mp4ff: use faacDecInit2() to find the AAC trackMax Kellermann2009-02-181-49/+36
| | | | | | | | | Use faacDecInit2() instead of AudioSpecificConfig() to detect the AAC track in the MP4 file. This has a great advantage: it initializes the libfaad decoder, which the caller would normally do anyway - but now we can go without the AudioSpecificConfig() call. When decoder==NULL (called from mp4_tag_dup()), fall back to a mp4ff_get_track_type()==1 check, like other audio players do.
* mp4ff: moved code to mp4_faad_new()Max Kellermann2009-02-181-53/+65
| | | | | | Moved the libfaad decoder initialization to mp4_faad_new(), and also fill the audio_format struct there. This eliminates a little bit of complexity in mp4_decode().
* mp4ff: call decoder_initialized() after libfaad initializationMax Kellermann2009-02-181-23/+32
| | | | | Don't wait for the first frame to be decoded. We already have the sample rate and the channel count from faacDecInit2().
* mp4ff: merged mp4_load_tag() into mp4_tag_dup()Max Kellermann2009-02-181-7/+1
| | | | | The function mp4_load_tag() is used only once, and mp4_tag_dup() is a one-liner. Merge them.
* faad: variable cleanupMax Kellermann2009-02-171-9/+4
| | | | Make some variables more local, and eliminate superfluous ones.
* faad: added source code commentsMax Kellermann2009-02-171-1/+36
|
* faad: faad_decoder_init() returns an audio_formatMax Kellermann2009-02-171-25/+23
| | | | | Instead of returning the sample rate and channel count as separate values, fill an audio_format struct.
* faad: call decoder_initialized() after libfaad initializationMax Kellermann2009-02-171-18/+27
| | | | | Don't wait for the first frame to be decoded. We already have the sample rate and the channel count from faacDecInit().
* faad: removed DECODE_COMMAND_SEEK checkMax Kellermann2009-02-171-2/+0
| | | | | The MPD core will never send a SEEK command to a decoder which has declared to be not seekable.
* faad: use the decoder_buffer libraryMax Kellermann2009-02-171-152/+155
| | | | | Replace this plugin's own buffer library with the new decoder_buffer library.
* faad: check the result of adts_find_frame()Max Kellermann2009-02-171-4/+2
| | | | | Instead of checking if the buffer is empty after adts_find_frame(), check adts_find_frame()'s return value. This is more robust.
* faad: added libfaad wrappersMax Kellermann2009-02-171-42/+61
| | | | | Moved libfaad API quirks to the wrapper functions faad_decoder_init() and faad_decoder_decode().
* faad: functions return duration, no float pointerMax Kellermann2009-02-171-15/+18
| | | | | Instead of writing the song duration into a float pointer, return it from the function.
* faad: removed length==NULL check in faad_song_duration()Max Kellermann2009-02-171-5/+1
| | | | There are no callers which pass NULL here.
* faad: fill buffer in adts_find_frame()Max Kellermann2009-02-171-4/+2
| | | | | | All callers of adts_find_frame() use faad_buffer_fill() before that. Move that faad_buffer_fill() call into adts_find_frame() instead. adts_find_frame() will get its own logic for on-demand filling.
* faad: converted length check to assertion in adts_check_frame()Max Kellermann2009-02-171-3/+2
| | | | | | adts_check_frame() must not be called with a buffer length smaller than 8. We can eliminate that duplicate check, and convert it into an assertion.
* faad: added length check before comparing "ADIF"Max Kellermann2009-02-171-1/+1
| | | | | It's not valid to use the buffer's data without ensuring that the buffer contains enough data.
* faad: renamed internal functionsMax Kellermann2009-02-171-12/+12
| | | | "aac" -> "faad"
* wavpack: added GLib log domainMax Kellermann2009-02-171-0/+3
|
* decoders: added and fixed GLib log domainsMax Kellermann2009-02-176-9/+22
| | | | | Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN macros in decoders which don't have one already.
* renamed decoder plugin "mpc" to "mpcdec"Max Kellermann2009-02-171-1/+1
| | | | This plugin is based on "libmpcdec".
* renamed decoder plugin "mp4" to "mp4ff"Max Kellermann2009-02-171-1/+1
| | | | This plugin is based on "libmp4ff".
* faad: no CamelCaseMax Kellermann2009-02-161-160/+159
| | | | Renamed functions and variables.
* faad: removed AacBuffer.fileOffsetMax Kellermann2009-02-161-3/+0
| | | | | The element fileOffset is only written, but never read. It can be removed safely.
* renamed decoder plugin "oggvorbis" to "vorbis"Max Kellermann2009-02-161-1/+1
| | | | This plugin uses libvorbis.
* renamed decoder plugin "aac" to "faad"Max Kellermann2009-02-161-2/+2
| | | | A decoder plugin should be named after the library which is used.
* renamed decoder plugin "mp3" to "mad"Max Kellermann2009-02-161-2/+2
| | | | A decoder plugin should be named after the library which is used.
* wildmidi: check if configurationn file existsMax Kellermann2009-02-151-0/+4
| | | | | Don't call WildMidi_Init() if the configuration file does not exist. Don't let libwildmidi clutter stderr with its warning message.
* wildmidi: obtain timidity.cfg location from mpd.confMax Kellermann2009-02-151-3/+6
|
* decoder_plugin: pass struct config_param to init() methodMax Kellermann2009-02-156-6/+9
| | | | Preparing for per-plugin configuration sections in mpd.conf.
* aac: fix stream metadataMax Kellermann2009-02-121-1/+1
| | | | | Pass the input_stream object to decoder_data(). Without it, the MPD core does not see stream tags.
* wildmidi: added seeking supportMax Kellermann2009-02-121-1/+11
| | | | Use WildMidi_SampledSeek() for seeking in a MIDI file.
* wildmidi: provide and current total song timeMax Kellermann2009-02-121-5/+34
| | | | | The _WM_Info struct provides all we need, it is obtained by WildMidi_GetInfo().
* wildmidi: new decoder plugin for MIDI filesMax Kellermann2009-02-121-0/+102
|
* fluidsynth: new decoder plugin for MIDI filesMax Kellermann2009-02-121-0/+233
| | | | | | | | | | | | | | There are a few problems left in this plugin: - fluidsynth decodes in real time, while MPD prefers to buffer as quickly as possible; as a workaround, this plugin uses a timer object to synchronize with real-time playback - I don't know yet how fluidsynth tells me when the song has ended - the "soundfont" configuration setting is not yet documented, and it will likely change soon (in favor of a per-decoder configuration block)
* sidplay: new decoder plugin for playing C64 SID filesMax Kellermann2009-02-111-0/+161
|
* ffmpeg: added TTA supportMax Kellermann2009-02-111-0/+2
| | | | | The ffmpeg library supports the "True Audio Codec". The entry in ffmpeg_suffixes was missing.
* ffmpeg: fixed seek integer overflowMax Kellermann2009-02-031-3/+4
| | | | | | | The "current" variable is used for calculating the seek destination, and was declared as "int". With very long song files, the 32 bit integer can overflow. ffmpeg expects an int64_t, which is very unlikely to overflow. Switch to int64_t.
* ffmpeg: check if the time stamp is validMax Kellermann2009-02-031-4/+5
| | | | | | When ffmpeg cannot estimate the elapsed time, it sets AVPacket.pts=AV_NOPTS_VALUE. Our ffmpeg decoder plugin did not check for that special value.
* ffmpeg: don't warn of empty packet outputMax Kellermann2009-02-031-3/+2
| | | | | | If avcodec_decode_audio2() returns no output for an AVPacket, libavcodec may buffer some data, and return a larger chunk of output later. This patch disables a lot of bogus warnings.
* ffmpeg: print codec nameMax Kellermann2009-02-031-0/+3
| | | | | | Output the name of the codec as a debug message. During my tests, ffmpeg never filled this struct member, but it may do so in the past, and this debug message might become helpful.
* 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.