| Commit message (Collapse) | Author | Files | Lines |
|
When libid3tag is disabled, the libmad decoder plugin is unable to
identify ID3 frames. If the file starts with an (unidentified) ID3
frame, it assumes that the file is not a valid MP3 song. This patch
solves this by adding minimal stubs for the ID3 functions.
|
|
strcasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
|
|
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.
|
|
Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN
macros in decoders which don't have one already.
|
|
A decoder plugin should be named after the library which is used.
|
|
Preparing for per-plugin configuration sections in mpd.conf.
|
|
|
|
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().
|
|
|
|
This patch adds RVA2 (relative volume adjustment) tag
support to mpd, as a fallback if no replaygain tags are
found. The code is almost directly from madplay (GPL).
RVA2 tags are generated for example by the "normalize" utility.
Updated by: Avuton Olrich <avuton@gmail.com>
|
|
Add G_GNUC_UNUSED attributes.
|
|
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.
|
|
libmad produces samples of more than 24 bit. Rounding that down to 16
bits using dithering makes those people lose quality who have a 24 bit
capable sound device. Send 24 bit PCM data, and let the receiver
decide whether to apply 16 bit dithering.
|