aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/faad_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
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
2008-11-12aac: check if the stream is seekable before length checkMax Kellermann1-1/+2
If the stream is not seekable, don't try to decode all frames to find out the total song time.
2008-11-12aac: removed attribute "atEof"Max Kellermann1-14/+7
Use input_stream_eof() instead.
2008-11-11decoder: return void from decode() methodsMax Kellermann1-16/+6
The stream_decode() and file_decode() methods returned a boolean, indicating whether they were able to decode the song. This is redundant, since we already know that: if decoder_initialized() has been called (and dc.state==DECODE), the plugin succeeded. Change both methods to return void.
2008-11-04decoder: removed stream_typesMax Kellermann1-1/+0
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
2008-11-02aac, mod: moved decoder command check into loop conditionMax Kellermann1-8/+4
Avoid while(true) loops, and convert them to a loop with a proper condition.
2008-11-02aac, mod: don't check for SEEK commandMax Kellermann1-14/+2
Since the aac and mod plugins have told MPD that they cannot seek, MPD will never send a SEEK command to them. Removed the SEEK comand checks from both plugins.
2008-11-02decoder_api: pass "seekable" flag to decoder_initialized()Max Kellermann1-4/+5
Don't pass the "seekable" flag with every decoder_data() invocation. Since that flag won't change within the file, it is enough to pass it to decoder_initialized() once per file.
2008-11-01decoder: make the suffixes and mime_types arrays really constMax Kellermann1-2/+2
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
2008-11-01decoder: make all decoder_plugin structs constMax Kellermann1-1/+1
All decoder_plugin structs are initialized at compile time, and must never change.
2008-10-31decoder_api: pass constant path pointersMax Kellermann1-4/+4
2008-10-30decoder: use bool for return values and flagsMax Kellermann1-19/+20
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
2008-10-29decoder: automatically flush the output buffer after decoder exitsMax Kellermann1-4/+0
A decoder_flush() invocation was missing in the FLAC plugin, resulting in casual assertion failures due to a wrong assumption about the last chunk's audio format. It's much easier to remove that decoder_flush() function and make the decoder thread call ob_flush().
2008-10-26input_stream: use "bool" instead of "int"Max Kellermann1-2/+2
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
2008-10-26input_stream: no CamelCaseMax Kellermann1-5/+5
Renamed all functions and variables.
2008-10-26input_stream: removed the InputStream typedefMax Kellermann1-6/+7
Everybody should use struct input_stream.
2008-10-26renamed src/inputPlugins/ to src/decoder/Max Kellermann1-0/+0
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.
2008-10-17Makefile.am: don't compile disabled decoder pluginsMax Kellermann1-8/+0
Don't compile the sources of disabled decoder plugins at all, and don't attempt to register these.
2008-10-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-23/+23
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
2008-10-08don't include os_compat.hMax Kellermann1-0/+1
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-29use C99 struct initializersMax Kellermann1-10/+7
The old struct initializers are error prone and don't allow moving elements around. Since we are going to overhaul some of the APIs soon, it's easier to have all implementations use C99 initializers.
2008-09-29Switch to C99 types (retaining compat with old compilers)Eric Wong1-2/+2
Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the mind needs to retrain itself to skip over the first 4 tokens of a type to get to its meaning. So avoid having extra characters on my terminal to make it easier to follow code at 2:30 am in the morning. Please report any new issues you may come across on Free toolchains. I realize how difficult it can be to build/maintain cross-compiling toolchains and I have no intention of forcing people to upgrade their toolchains to build mpd. Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
2008-09-07audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann1-2/+2
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
2008-08-29tag: renamed functions, no CamelCaseMax Kellermann1-2/+2
2008-08-29tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann1-2/+2
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.