- 04 Nov, 2008 1 commit
-
-
Max Kellermann authored
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
-
- 02 Nov, 2008 3 commits
-
-
Max Kellermann authored
Avoid while(true) loops, and convert them to a loop with a proper condition.
-
Max Kellermann authored
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.
-
Max Kellermann authored
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.
-
- 01 Nov, 2008 2 commits
-
-
Max Kellermann authored
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
-
Max Kellermann authored
All decoder_plugin structs are initialized at compile time, and must never change.
-
- 31 Oct, 2008 1 commit
-
-
Max Kellermann authored
-
- 30 Oct, 2008 1 commit
-
-
Max Kellermann authored
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
-
- 29 Oct, 2008 1 commit
-
-
Max Kellermann authored
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().
-
- 26 Oct, 2008 4 commits
-
-
Max Kellermann authored
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
-
Max Kellermann authored
Renamed all functions and variables.
-
Max Kellermann authored
Everybody should use struct input_stream.
-
Max Kellermann authored
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.
-
- 17 Oct, 2008 1 commit
-
-
Max Kellermann authored
Don't compile the sources of disabled decoder plugins at all, and don't attempt to register these.
-
- 10 Oct, 2008 1 commit
-
-
Max Kellermann authored
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
-
- 08 Oct, 2008 1 commit
-
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-
- 29 Sep, 2008 2 commits
-
-
Max Kellermann authored
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.
-
Eric Wong authored
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.
-
- 07 Sep, 2008 1 commit
-
-
Max Kellermann authored
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
-
- 29 Aug, 2008 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
-
- 26 Aug, 2008 19 commits
-
-
Max Kellermann authored
On our way to stabilize the decoder API, we will one day remove the input stream functions. The most basic function, read() will be provided by decoder_api.h with this patch. It already contains a loop (still with manual polling), error/eof handling and decoder command checks. This kind of code used to be duplicated in all decoder plugins.
-
Max Kellermann authored
We need the decoder object at several places in the AAC plugin. Add it to mp3DecodeData, so we don't have to pass it around in every function.
-
Max Kellermann authored
Copy some code from aac_decode() to aac_stream_decode() and apply necessary changes to allow streaming audio data. Both functions might be merged later.
-
Max Kellermann authored
initAacBuffer() should really only initialize the buffer; currently, it also reads data from the input stream and parses the header. All of the AAC buffer code should probably be moved to a separate library anyway.
-
Max Kellermann authored
The AAC plugin sometimes does not check the length of available data when checking for magic prefixes. Add length checks.
-
Max Kellermann authored
Eliminate some duplicated code by using fillAacBuffer().
-
Max Kellermann authored
Find AAC frames in the input and skip invalid data. This prepares AAC streaming.
-
Max Kellermann authored
adts_check_frame() checks whether the buffer head is an AAC frame, and returns the frame length.
-
Max Kellermann authored
Shifting from the buffer queue is a common operation, and should be provided as a separate function. Move code to aac_buffer_shift() and add a bunch of assertions.
-
Max Kellermann authored
When checking for EOF, we should not check whether the read request has been fully satisified. The InputStream API does not guarantee that readFromInputStream() always fills the whole buffer, if EOF is not reached. Since there is the function inputStreamAtEOF() dedicated for this purpose, we should use it for EOF checking after readFromInputStream()==0.
-
Max Kellermann authored
Fill the AacBuffer even when nothing has been consumed yet. The function should not check for consumed data, but for free space at the end of the buffer.
-
Max Kellermann authored
Return instead of putting all the code into a if-closure. That saves one level of indentation.
-
Max Kellermann authored
adtsParse() always returns 1, and its caller does not use the return value.
-
Max Kellermann authored
-
Max Kellermann authored
Since we eliminated the parameters retFileread and retTagsize in all callers, we can now safely remove it from the function prototype.
-
Max Kellermann authored
-
Max Kellermann authored
"decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
-
Max Kellermann authored
Since we want to hide mpd internals from the decoder plugins, the plugins should not check dc->state whether they have already called decoder_initialized(). Use a local variable to track that.
-
Max Kellermann authored
Provide access to seeking for the decoder plugins; they have to know where to seek, and they need a way to tell us that seeking has failed.
-