| Commit message (Collapse) | Author | Files | Lines |
|
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
|
|
Reuse the function tag_name_parse_i().
|
|
|
|
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it
might be better than nothing.
|
|
Convert if/else/else/... to a loop.
|
|
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.
|
|
When mp4ff_read_sample() returns a value bigger than zero, it
guarantees that the buffer is set. Remove the check.
|
|
Don't waste any precious memory when the seek_table cannot be used.
|
|
Don't include limits.h, use GLib constants instead.
|
|
Use faacDecInit2() instead of AudioSpecificConfig() to detect the AAC
track in the MP4 file. This has a great advantage: it initializes the
libfaad decoder, which the caller would normally do anyway - but now
we can go without the AudioSpecificConfig() call. When decoder==NULL
(called from mp4_tag_dup()), fall back to a mp4ff_get_track_type()==1
check, like other audio players do.
|
|
Moved the libfaad decoder initialization to mp4_faad_new(), and also
fill the audio_format struct there. This eliminates a little bit of
complexity in mp4_decode().
|
|
Don't wait for the first frame to be decoded. We already have the
sample rate and the channel count from faacDecInit2().
|
|
The function mp4_load_tag() is used only once, and mp4_tag_dup() is a
one-liner. Merge them.
|
|
Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN
macros in decoders which don't have one already.
|
|
This plugin is based on "libmp4ff".
|
|
On some platforms, g_free() must be used for memory allocated by
GLib. This patch intends to correct a lot of occurrences, but is
probably not complete.
|
|
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().
|
|
|
|
I tried to search for a certain composer in my collection, but only
non-mp4 files showed up. The source code reveals that this tag is not
read. This can be fixed by reading the 'Writer' tag field, in
mp4_plugin.c, in function mp4_load_tag.
I actually tried this, and after compiling with those lines added,
also mp4 (.m4a) files showed up when searching for a composer.
|
|
Refuse to play audio formats which are not supported by MPD.
|
|
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*".
|
|
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.
|
|
Eliminate a superfluous decoder_get_command() call. decoder_data()
already returns the command.
|
|
Removed the duplicate audio_format initialization.
|
|
decoder_read() handles decoder commands, and should be used in decoder
plugins.
|
|
We need the decoder object, so we have to begin passing a new struct
to these callbacks, instead of only the pointer to the input_stream
object.
|
|
Replace deprecated code with GLib.
|
|
The API of mp4_load_tag() was strange: it always returned a tag
object, no matter if a tag was found in the file; the existence of a
tag was indicated with the tag_found integer reference. This flag is
superfluous, since we can simply check whether the tag is empty or
not.
|
|
Allocate the mp4ff_callback_t object on the stack. This is easier to
handle, since we don't have to free it. Incidentally, this fixes a
memory leak in mp4_load_tag().
|
|
Renamed functions and variables.
|
|
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().
|
|
Call ob_clear() in decoder_command_finished() instead of implementing
that call in every decoder plugin.
|
|
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.
|
|
MPD shouldn't integrate sources of other libraries. Since libmp4ff is
part of libfaad, we should remove the old copy from src/mp4ff and link
with the current version from libfaad instead.
|
|
Don't compile the sources of disabled decoder plugins at all, and
don't attempt to register these.
|
|
The nmemb argument isn't actually useful, and one of nmemb and size
was always passed as 1. Remove it.
|
|
The last bit of CamelCase in audio_format.h. Additionally, rename a
bunch of local variables.
|
|
"bool" should be used in C99 programs for boolean values.
|
|
When there are standardized headers, use these instead of the bloated
os_compat.h.
|
|
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.
|