Max Kellermann
122e0f3338
faad: added source code comments
2009-02-17 23:42:06 +01:00
Max Kellermann
76b0601f6b
faad: faad_decoder_init() returns an audio_format
...
Instead of returning the sample rate and channel count as separate
values, fill an audio_format struct.
2009-02-17 23:35:49 +01:00
Max Kellermann
161bfc4bc0
faad: call decoder_initialized() after libfaad initialization
...
Don't wait for the first frame to be decoded. We already have the
sample rate and the channel count from faacDecInit().
2009-02-17 23:26:51 +01:00
Max Kellermann
a72c7a7b18
faad: removed DECODE_COMMAND_SEEK check
...
The MPD core will never send a SEEK command to a decoder which has
declared to be not seekable.
2009-02-17 23:20:16 +01:00
Max Kellermann
7b84f1e6b3
faad: use the decoder_buffer library
...
Replace this plugin's own buffer library with the new decoder_buffer
library.
2009-02-17 22:56:42 +01:00
Max Kellermann
7cea5357e3
faad: check the result of adts_find_frame()
...
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-17 22:56:07 +01:00
Max Kellermann
77db32f8fb
faad: added libfaad wrappers
...
Moved libfaad API quirks to the wrapper functions faad_decoder_init()
and faad_decoder_decode().
2009-02-17 22:54:26 +01:00
Max Kellermann
6a72db22d7
faad: functions return duration, no float pointer
...
Instead of writing the song duration into a float pointer, return it
from the function.
2009-02-17 22:54:01 +01:00
Max Kellermann
e30ba2e4cf
faad: removed length==NULL check in faad_song_duration()
...
There are no callers which pass NULL here.
2009-02-17 22:53:28 +01:00
Max Kellermann
867ae1cf6f
faad: fill buffer in adts_find_frame()
...
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-17 22:53:25 +01:00
Max Kellermann
66b4a3ab2e
faad: converted length check to assertion in adts_check_frame()
...
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-17 19:28:11 +01:00
Max Kellermann
8edd407918
faad: added length check before comparing "ADIF"
...
It's not valid to use the buffer's data without ensuring that the
buffer contains enough data.
2009-02-17 19:27:36 +01:00
Max Kellermann
d75ce5c4a0
faad: renamed internal functions
...
"aac" -> "faad"
2009-02-17 19:27:01 +01:00
Max Kellermann
d8db46edfa
decoders: added and fixed GLib log domains
...
Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN
macros in decoders which don't have one already.
2009-02-17 08:51:34 +01:00
Max Kellermann
68314c33e9
faad: no CamelCase
...
Renamed functions and variables.
2009-02-16 19:31:11 +01:00
Max Kellermann
8d2e6bf54c
faad: removed AacBuffer.fileOffset
...
The element fileOffset is only written, but never read. It can be
removed safely.
2009-02-16 19:31:08 +01:00
Max Kellermann
cafaf33aa8
renamed decoder plugin "aac" to "faad"
...
A decoder plugin should be named after the library which is used.
2009-02-16 19:30:54 +01:00