| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Variables which hold one of the DECODE_* values should be declared as
"enum mp3_action" instead of "int".
|
|
|
|
| |
Use GLib's g_warning(), ... instead of MPD's deprecated log.h.
|
|
|
|
|
|
| |
mp3 seeking was broken, because the command==SEEK check was never
reached. Swap the command check order (==SEEK before !=NONE) to fix
that.
|
|
|
|
|
|
|
| |
Parse ID3 tags, even when they are in the middle of the stream. Very
few streams provide embedded ID3 tags. Most of them send only
Shoutcast "icy" tags, which limits the practical usefulness of this
patch.
|
|
|
|
|
|
|
| |
When a command is received, decode_next_frame_header() and
decodeNextFrame() return DECODE_BREAK. This is already checked by
both callers, which means that we can eliminate lots of
decoder_get_command() checks.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Having an array instead of individual variables allows the use of the
replay_gain_mode enum as an array index.
|
|
|
|
| |
Renamed functions and variables.
|
|
|
|
|
| |
Instead of checking the stream_types bit set, we can simply check
whether the methods stream_decode() and file_decode() are implemented.
|
|
|
|
|
|
|
|
|
|
| |
If an input stream provides tags (e.g. from an icecast server), send
them in the decoder_data() and decoder_tag() methods. Removed the
according code from the mp3 and oggvorbis plugins - decoders shouldn't
have to care about stream tags.
This patch also adds the missing decoder_tag() invocation to the mp3
plugin.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Its only caller in mp3_decode() just compared its value with
DECODE_BREAK. Convert that to bool, and return false if the loop
should be ended. Also eliminate some superfluous command checking
code, which was already done in the preceding while loop.
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
Call ob_clear() in decoder_command_finished() instead of implementing
that call in every decoder plugin.
|
|
|
|
|
|
|
|
|
|
| |
Remember the seek_where argument and call decoder_command_finished()
immediately. This way, the player thread can continue working, and we
can receive more commands.
This also fixes several issues which resulted in broken frames,
leading to erroneos "elapsed" values: frames weren't parsed properly,
since the code was checking for command!=NONE.
|
|
|
|
|
| |
Previously, the function would only return when a STOP was issued. It
makes more sense to consider all possible commands.
|
|
|
|
| |
Break the large function mp3_read() into smaller pieces.
|
|
|
|
| |
Break the large function mp3_read() into smaller pieces.
|
|
|
|
| |
Break the large function mp3_read() into smaller pieces.
|
|
|
|
| |
Break the large function mp3_read() into smaller pieces.
|
|
|
|
| |
Break the large function mp3_read() into smaller pieces.
|
|
|
|
|
|
| |
dc_seek() won't send a SEEK command to the decoder thread unless the
stream is seekable. No need to do another check; convert that to an
assertion.
|
|
|
|
|
| |
The function mp3_decode_first_frame() is too large. Move some code to
separate smaller functions.
|
|
|
|
| |
http://xkcd.com/292/
|
|
|
|
| |
This removes the need for util.h.
|
|
|
|
| |
Use the C99 bool data type for boolean values.
|
|
|
|
|
| |
Renamed all functions and variables. Also removed the mp3DecodeData
typedef.
|
| |
|
|
|
|
|
|
| |
size_t and long aren't 64 bit safe (i.e. files larger than 2 GB on a
32 bit OS). Use off_t instead, which is a 64 bit integer if compiled
with large file support.
|
|
|
|
| |
Remove duplicated code from MPD.
|
|
|
|
|
| |
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.
|