aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mp4_plugin.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* added missing explicit config.h includesMax Kellermann2009-01-081-1/+2
|
* mp4: support the writer/composer tagFrank Mulder2008-12-291-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.
* decoder: check audio_format_valid() in all decodersMax Kellermann2008-11-211-0/+9
| | | | Refuse to play audio formats which are not supported by MPD.
* aac: detect whether to pass "uint32_t*" to NeAACDecInit2()Max Kellermann2008-11-161-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*".
* decoder: return void from decode() methodsMax Kellermann2008-11-111-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.
* decoder: removed stream_typesMax Kellermann2008-11-041-1/+0
| | | | | Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
* mp4: get decoder command from decoder_data()Max Kellermann2008-11-041-7/+8
| | | | | Eliminate a superfluous decoder_get_command() call. decoder_data() already returns the command.
* mp4: initialize audio_format before decoder_initialized()Max Kellermann2008-11-041-6/+5
| | | | Removed the duplicate audio_format initialization.
* mp4: use decoder_read() instead of input_stream_read()Max Kellermann2008-11-041-1/+4
| | | | | decoder_read() handles decoder commands, and should be used in decoder plugins.
* mp4: pass struct mp4_context to the mp4ff_callback_t methodsMax Kellermann2008-11-041-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.
* mp4: use GLib instead of utils.h / log.hMax Kellermann2008-11-041-13/+14
| | | | Replace deprecated code with GLib.
* mp4: use tag_is_empty() instead of passing the tag_is_found flagMax Kellermann2008-11-041-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.
* mp4: static mp4ff_callback_t variablesMax Kellermann2008-11-041-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().
* mp4: no CamelCaseeMax Kellermann2008-11-041-104/+109
| | | | Renamed functions and variables.
* decoder_api: pass "seekable" flag to decoder_initialized()Max Kellermann2008-11-021-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.
* decoder: make the suffixes and mime_types arrays really constMax Kellermann2008-11-011-2/+2
| | | | | The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
* decoder: make all decoder_plugin structs constMax Kellermann2008-11-011-1/+1
| | | | | All decoder_plugin structs are initialized at compile time, and must never change.
* decoder_api: pass constant path pointersMax Kellermann2008-10-311-2/+2
|
* decoder: use bool for return values and flagsMax Kellermann2008-10-301-8/+8
| | | | | Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
* decoder: automatically flush the output buffer after decoder exitsMax Kellermann2008-10-291-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().
* decoder_api: removed decoder_clear()Max Kellermann2008-10-291-4/+2
| | | | | Call ob_clear() in decoder_command_finished() instead of implementing that call in every decoder plugin.
* input_stream: use "bool" instead of "int"Max Kellermann2008-10-261-2/+3
| | | | | For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
* input_stream: no CamelCaseMax Kellermann2008-10-261-7/+7
| | | | Renamed all functions and variables.
* input_stream: removed the InputStream typedefMax Kellermann2008-10-261-4/+7
| | | | Everybody should use struct input_stream.
* renamed src/inputPlugins/ to src/decoder/Max Kellermann2008-10-261-0/+423
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.