| Commit message (Collapse) | Author | Files | Lines |
|
Add GMutex, GCond attributes which will be used by callers to
conditionally wait on the stream.
Remove the (now-useless) plugin method buffer(), wait on GCond
instead. Lock the input_stream before each method call. Do the same
with the playlist plugins.
|
|
|
|
Make it X_decoder_plugin.c.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
Let the audio_check library verify the audio format in all (relevant,
i.e. non-hardcoded) plugins.
|
|
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.
|
|
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.
|
|
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.
|
|
On failure, the function should return NULL, not a boolean.
|
|
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.
|
|
Don't use libfaad's internal type names.
|
|
Make some variables more local, and eliminate superfluous ones.
|
|
|
|
Instead of returning the sample rate and channel count as separate
values, fill an audio_format struct.
|
|
Don't wait for the first frame to be decoded. We already have the
sample rate and the channel count from faacDecInit().
|
|
The MPD core will never send a SEEK command to a decoder which has
declared to be not seekable.
|
|
Replace this plugin's own buffer library with the new decoder_buffer
library.
|
|
Instead of checking if the buffer is empty after adts_find_frame(),
check adts_find_frame()'s return value. This is more robust.
|
|
Moved libfaad API quirks to the wrapper functions faad_decoder_init()
and faad_decoder_decode().
|
|
Instead of writing the song duration into a float pointer, return it
from the function.
|
|
There are no callers which pass NULL here.
|
|
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.
|
|
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.
|
|
It's not valid to use the buffer's data without ensuring that the
buffer contains enough data.
|
|
"aac" -> "faad"
|
|
Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN
macros in decoders which don't have one already.
|
|
Renamed functions and variables.
|
|
The element fileOffset is only written, but never read. It can be
removed safely.
|
|
A decoder plugin should be named after the library which is used.
|
|
Pass the input_stream object to decoder_data(). Without it, the MPD
core does not see stream tags.
|
|
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().
|
|
|
|
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().
|