| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Refuse to play audio formats which are not supported by MPD.
|
|
|
|
| |
Removed the superfluous my_usleep() call.
|
| |
|
|
|
|
|
|
| |
Define the special value "-1" as "unknown size". Previously, there
was no indicator for streams with unknown size, which might confuse
some decoders.
|
|
|
|
|
|
|
|
|
| |
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*".
|
| |
|
|
|
|
|
| |
In 432da18e a dynamic buffer was replaced by a static one but some
frees were accidently left there which caused some segfaults.
|
|
|
|
|
| |
When the buffer was full, but everything was already consumed,
fillAacBuffer() would not attempt to flush and refill it.
|
|
|
|
| |
Allocate the input buffer within the AacBuffer struct.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Removed a superfluous decoder_get_command() call.
|
|
|
|
|
|
| |
The audio_format variable is only used and initialized for
decoder_initialized(). Move it into that block to save some bytes on
the stack.
|
|
|
|
|
| |
aac_stream_decode() was basically copy+pasted from aac_decode().
Since stream_decode() can also decode files, eliminate aac_decode().
|
|
|
|
| |
Check whether enough data has been read yet.
|
| |
|
|
|
|
|
| |
If the stream is not seekable, don't try to decode all frames to find
out the total song time.
|
|
|
|
| |
Use input_stream_eof() instead.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Instead of checking the stream_types bit set, we can simply check
whether the methods stream_decode() and file_decode() are implemented.
|
|
|
|
|
| |
Avoid while(true) loops, and convert them to a loop with a proper
condition.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The strings were constant, but the pointers weren't. C syntax is
somewhat tricky..
|
|
|
|
|
| |
All decoder_plugin structs are initialized at compile time, and must
never change.
|
| |
|
|
|
|
|
| |
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
For boolean values and success flags, use bool instead of integer (1/0
for true/false, 0/-1 for success/failure).
|
|
|
|
| |
Renamed all functions and variables.
|
|
|
|
| |
Everybody should use struct input_stream.
|
|
These plugins are not input plugins, they are decoder plugins. No
CamelCase in the directory name.
|