aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/faad_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-01-04renamed decoder plugin sourcesMax Kellermann1-515/+0
Make it X_decoder_plugin.c.
2010-01-04decoder_api: added function decoder_replay_gain()Max Kellermann1-1/+1
This function replaces the replay_gain_info parameter for decoder_data(). This allows the decoder to announce replay gain changes, instead of having to pass the same object over and over.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-31decoder: switch a bunch of plugins to stream_tag()Max Kellermann1-16/+9
This patch changes the following decoder plugins to implement stream_tag() instead of tag_dup(): faad, ffmpeg, mad, modplug, mp4ff, mpcdec, oggflac This simplifies their code, because they do not need to take care of opening/closing the stream.
2009-12-26decoder_api: added function decoder_timestamp()Max Kellermann1-7/+1
Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default.
2009-12-15input_stream: return errors with GErrorMax Kellermann1-2/+2
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-1/+1
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
2009-11-14decoder: use audio_format_init_checked()Max Kellermann1-19/+30
Let the audio_check library verify the audio format in all (relevant, i.e. non-hardcoded) plugins.
2009-11-12include config.h in all sourcesMax Kellermann1-2/+2
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-09-30decoder/faad: skip assertion failure on large ID3 tagsMax Kellermann1-2/+6
When the ID3 tag in an AAC file is larger than the current buffer, the function decoder_buffer_consume() aborts. By using the new function decoder_buffer_skip() instead, we can safely skip the ID3 tag.
2009-07-19Add audio_format_init() functionDavid Woodhouse1-5/+1
It makes no difference right now, but we're about to add an endianness flag and will want to make sure it's correctly initialised every time.
2009-03-14faad: faad_decoder_decode() returns NULL, not falseMax Kellermann1-1/+1
On failure, the function should return NULL, not a boolean.
2009-03-13all: Update copyright header.Avuton Olrich1-7/+8
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-02-19faad: use faacDecFrameInfo instead of NeAACDecFrameInfoMax Kellermann1-1/+1
Don't use libfaad's internal type names.
2009-02-17faad: variable cleanupMax Kellermann1-9/+4
Make some variables more local, and eliminate superfluous ones.
2009-02-17faad: added source code commentsMax Kellermann1-1/+36
2009-02-17faad: faad_decoder_init() returns an audio_formatMax Kellermann1-25/+23
Instead of returning the sample rate and channel count as separate values, fill an audio_format struct.
2009-02-17faad: call decoder_initialized() after libfaad initializationMax Kellermann1-18/+27
Don't wait for the first frame to be decoded. We already have the sample rate and the channel count from faacDecInit().
2009-02-17faad: removed DECODE_COMMAND_SEEK checkMax Kellermann1-2/+0
The MPD core will never send a SEEK command to a decoder which has declared to be not seekable.
2009-02-17faad: use the decoder_buffer libraryMax Kellermann1-152/+155
Replace this plugin's own buffer library with the new decoder_buffer library.
2009-02-17faad: check the result of adts_find_frame()Max Kellermann1-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.
2009-02-17faad: added libfaad wrappersMax Kellermann1-42/+61
Moved libfaad API quirks to the wrapper functions faad_decoder_init() and faad_decoder_decode().
2009-02-17faad: functions return duration, no float pointerMax Kellermann1-15/+18
Instead of writing the song duration into a float pointer, return it from the function.
2009-02-17faad: removed length==NULL check in faad_song_duration()Max Kellermann1-5/+1
There are no callers which pass NULL here.
2009-02-17faad: fill buffer in adts_find_frame()Max Kellermann1-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.
2009-02-17faad: converted length check to assertion in adts_check_frame()Max Kellermann1-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.
2009-02-17faad: added length check before comparing "ADIF"Max Kellermann1-1/+1
It's not valid to use the buffer's data without ensuring that the buffer contains enough data.
2009-02-17faad: renamed internal functionsMax Kellermann1-12/+12
"aac" -> "faad"
2009-02-17decoders: added and fixed GLib log domainsMax Kellermann1-2/+2
Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN macros in decoders which don't have one already.
2009-02-16faad: no CamelCaseMax Kellermann1-160/+159
Renamed functions and variables.
2009-02-16faad: removed AacBuffer.fileOffsetMax Kellermann1-3/+0
The element fileOffset is only written, but never read. It can be removed safely.
2009-02-16renamed decoder plugin "aac" to "faad"Max Kellermann1-2/+2
A decoder plugin should be named after the library which is used.
2009-02-12aac: fix stream metadataMax Kellermann1-1/+1
Pass the input_stream object to decoder_data(). Without it, the MPD core does not see stream tags.
2009-01-17moved fallback APE/ID3 tag loader to song.cMax Kellermann1-7/+6
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().
2009-01-08added missing explicit config.h includesMax Kellermann1-0/+1
2008-11-21decoder: check audio_format_valid() in all decodersMax Kellermann1-0/+5
Refuse to play audio formats which are not supported by MPD.
2008-11-21aac: use GLib instead of utils.h/log.hMax Kellermann1-10/+10
Removed the superfluous my_usleep() call.
2008-11-20aac: get rid of gcc warningsLaszlo Ashin1-2/+2
2008-11-16input_stream: size==-1 means unknown sizeMax Kellermann1-1/+1
Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
2008-11-16aac: detect whether to pass "uint32_t*" to NeAACDecInit2()Max Kellermann1-6/+22
neaacdec.h declares all arguments as "unsigned long", but internally expects uint32_t pointers. This triggers gcc warnings on 64 bit architectures. To avoid that, make configure.ac detect whether we're using Debian's corrected headers or the original libfaad headers. In any case, pass a pointer to an uint32_t, conditionally casted to "unsigned long*".
2008-11-15aac: fix compiler warnings on amd64Laszlo Ashin1-2/+2
2008-11-15aac: don't try to free static bufferLaszlo Ashin1-4/+0
In 432da18e a dynamic buffer was replaced by a static one but some frees were accidently left there which caused some segfaults.
2008-11-12aac: shift the input buffer before the full checkMax Kellermann1-4/+5
When the buffer was full, but everything was already consumed, fillAacBuffer() would not attempt to flush and refill it.
2008-11-12aac: make the input buffer staticMax Kellermann1-9/+4
Allocate the input buffer within the AacBuffer struct.
2008-11-12aac: reject SEEK commandsMax Kellermann1-1/+3
The aac plugin does not support seeking. Reject SEEK requests by calling decoder_seek_error(). Quit the plugin's main loop only when STOP is received.
2008-11-12aac: get decoder command from decoder_data()Max Kellermann1-4/+5
Removed a superfluous decoder_get_command() call.
2008-11-12aac: convert audio_format to temporary variableMax Kellermann1-5/+6
The audio_format variable is only used and initialized for decoder_initialized(). Move it into that block to save some bytes on the stack.
2008-11-12aac: removed method file_decode()Max Kellermann1-124/+1
aac_stream_decode() was basically copy+pasted from aac_decode(). Since stream_decode() can also decode files, eliminate aac_decode().
2008-11-12aac: check the buffer length in the ADIF parserMax Kellermann1-0/+6
Check whether enough data has been read yet.
2008-11-12aac: use unsigned integers and size_t where appropriateMax Kellermann1-5/+6