aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mp4ff_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-06-30decoder/mp4ff: support tag "album artist"Max Kellermann1-0/+1
We already supported "albumartist", but it seems some folks also use "album artist" (with a space).
2010-06-30decoder/mp4ff: remove duplicate entries in the tag name tableMax Kellermann1-9/+5
Reuse the function tag_name_parse_i().
2010-06-30decoder/mp4ff: moved code to mp4ff_tag_name_parse()Max Kellermann1-1/+7
2010-06-30decoder/mp4ff: support tags "albumartist", "band"Max Kellermann1-0/+2
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it might be better than nothing.
2010-06-30decoder/mp4ff: use tag_table.h to parse tag namesMax Kellermann1-18/+15
Convert if/else/else/... to a loop.
2009-04-28mp4ff_decoder: use g_ascii_strcasecmp() instead of strcasecmp()Max Kellermann1-8/+9
strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
2009-03-13all: Update copyright header.Avuton Olrich1-6/+7
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.
2009-02-18mp4ff: always free the mp4ff_read_sample() bufferMax Kellermann1-2/+2
When mp4ff_read_sample() returns a value bigger than zero, it guarantees that the buffer is set. Remove the check.
2009-02-18mp4ff: don't allocate seek_table when input is not seekableMax Kellermann1-2/+10
Don't waste any precious memory when the seek_table cannot be used.
2009-02-18mp4ff: include cleanupMax Kellermann1-4/+4
Don't include limits.h, use GLib constants instead.
2009-02-18mp4ff: use faacDecInit2() to find the AAC trackMax Kellermann1-49/+36
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.
2009-02-18mp4ff: moved code to mp4_faad_new()Max Kellermann1-53/+65
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().
2009-02-18mp4ff: call decoder_initialized() after libfaad initializationMax Kellermann1-23/+32
Don't wait for the first frame to be decoded. We already have the sample rate and the channel count from faacDecInit2().
2009-02-18mp4ff: merged mp4_load_tag() into mp4_tag_dup()Max Kellermann1-7/+1
The function mp4_load_tag() is used only once, and mp4_tag_dup() is a one-liner. Merge them.
2009-02-17decoders: added and fixed GLib log domainsMax Kellermann1-1/+4
Fixed the log domains of the renamed decoders. Added G_LOG_DOMAIN macros in decoders which don't have one already.
2009-02-17renamed decoder plugin "mp4" to "mp4ff"Max Kellermann1-1/+1
This plugin is based on "libmp4ff".
2009-01-25use g_free() instead of free()Max Kellermann1-2/+2
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.
2009-01-17moved fallback APE/ID3 tag loader to song.cMax Kellermann1-15/+1
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().
2009-01-08added missing explicit config.h includesMax Kellermann1-1/+2
2008-12-29mp4: support the writer/composer tagFrank Mulder1-0/+2
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.
2008-11-21decoder: check audio_format_valid() in all decodersMax Kellermann1-0/+9
Refuse to play audio formats which are not supported by MPD.
2008-11-16aac: detect whether to pass "uint32_t*" to NeAACDecInit2()Max Kellermann1-1/+9
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*".
2008-11-11decoder: return void from decode() methodsMax Kellermann1-14/+6
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.
2008-11-04decoder: removed stream_typesMax Kellermann1-1/+0
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
2008-11-04mp4: get decoder command from decoder_data()Max Kellermann1-7/+8
Eliminate a superfluous decoder_get_command() call. decoder_data() already returns the command.
2008-11-04mp4: initialize audio_format before decoder_initialized()Max Kellermann1-6/+5
Removed the duplicate audio_format initialization.
2008-11-04mp4: use decoder_read() instead of input_stream_read()Max Kellermann1-1/+4
decoder_read() handles decoder commands, and should be used in decoder plugins.
2008-11-04mp4: pass struct mp4_context to the mp4ff_callback_t methodsMax Kellermann1-10/+18
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.
2008-11-04mp4: use GLib instead of utils.h / log.hMax Kellermann1-13/+14
Replace deprecated code with GLib.
2008-11-04mp4: use tag_is_empty() instead of passing the tag_is_found flagMax Kellermann1-13/+3
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.
2008-11-04mp4: static mp4ff_callback_t variablesMax Kellermann1-22/+15
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().
2008-11-04mp4: no CamelCaseeMax Kellermann1-104/+109
Renamed functions and variables.
2008-11-02decoder_api: pass "seekable" flag to decoder_initialized()Max Kellermann1-2/+2
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.
2008-11-01decoder: make the suffixes and mime_types arrays really constMax Kellermann1-2/+2
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
2008-11-01decoder: make all decoder_plugin structs constMax Kellermann1-1/+1
All decoder_plugin structs are initialized at compile time, and must never change.
2008-10-31decoder_api: pass constant path pointersMax Kellermann1-2/+2
2008-10-30decoder: use bool for return values and flagsMax Kellermann1-8/+8
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
2008-10-29decoder: automatically flush the output buffer after decoder exitsMax Kellermann1-2/+0
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().
2008-10-29decoder_api: removed decoder_clear()Max Kellermann1-4/+2
Call ob_clear() in decoder_command_finished() instead of implementing that call in every decoder plugin.
2008-10-26input_stream: use "bool" instead of "int"Max Kellermann1-2/+3
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
2008-10-26input_stream: no CamelCaseMax Kellermann1-7/+7
Renamed all functions and variables.
2008-10-26input_stream: removed the InputStream typedefMax Kellermann1-4/+7
Everybody should use struct input_stream.
2008-10-26renamed src/inputPlugins/ to src/decoder/Max Kellermann1-0/+0
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.
2008-10-25removed internal copy of libmp4ffMax Kellermann1-1/+1
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.
2008-10-17Makefile.am: don't compile disabled decoder pluginsMax Kellermann1-9/+0
Don't compile the sources of disabled decoder plugins at all, and don't attempt to register these.
2008-10-17input_stream: removed nmemb argumentMax Kellermann1-1/+1
The nmemb argument isn't actually useful, and one of nmemb and size was always passed as 1. Remove it.
2008-10-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-4/+4
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
2008-10-08use the "bool" data type instead of "int"Max Kellermann1-7/+7
"bool" should be used in C99 programs for boolean values.
2008-10-08don't include os_compat.hMax Kellermann1-0/+1
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-09-29use C99 struct initializersMax Kellermann1-10/+6
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.