aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/audiofile_decoder_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2011-02-09general: whitespace cleanupThomas Jansen1-1/+1
Remove trailing whitespace found by this command: find -name '*.[ch]' | xargs grep "[[:space:]]$"
2011-01-29copyright year 2011Max Kellermann1-1/+1
2010-01-04renamed decoder plugin sourcesMax Kellermann1-0/+0
Make it X_decoder_plugin.c.
2010-01-04decoder_api: added function decoder_replay_gain()Max Kellermann1-1/+1
This function replaces the replay_gain_info parameter for decoder_data(). This allows the decoder to announce replay gain changes, instead of having to pass the same object over and over.
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-26decoder_api: added function decoder_timestamp()Max Kellermann1-6/+3
Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default.
2009-12-15input_stream: return errors with GErrorMax Kellermann1-3/+13
2009-12-02audio_format: changed "bits" to "enum sample_format"Max Kellermann1-3/+23
This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
2009-11-14decoder/audio: eliminate the "bits" variableMax Kellermann1-4/+1
Pass the audiofile_setup_sample_format() result to audio_format_init_checked().
2009-11-14decoder/audiofile: moved code to audiofile_setup_sample_format()Max Kellermann1-10/+20
2009-11-14decoder: use audio_format_init_checked()Max Kellermann1-7/+9
Let the audio_check library verify the audio format in all (relevant, i.e. non-hardcoded) plugins.
2009-11-12include config.h in all sourcesMax Kellermann1-1/+2
After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
2009-07-19Add audio_format_init() functionDavid Woodhouse1-5/+3
It makes no difference right now, but we're about to add an endianness flag and will want to make sure it's correctly initialised every time.
2009-04-02decoder: Rename all main decoder plugins functions to *decoder_plugin.Avuton Olrich1-1/+1
2009-03-13all: Update copyright header.Avuton Olrich1-9/+8
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-03-01audiofile: added 24 bit supportMax Kellermann1-1/+8
Don't hard code the "bits" parameter to 16. Try to use the input's sample format, if possible.
2009-02-28audiofile: removed duplicate decoder_get_command() callsMax Kellermann1-12/+16
decoder_data() returns a decoder_command, no need to call decoder_get_command() twice after decoder_command().
2009-02-28audiofile: refuse to play non-seekable filesMax Kellermann1-0/+5
If an input_stream is not seekable, libaudiofile fails to play at all: Audio File Library: unrecognized audio file format [error 0] Since we know in advance whether the input_stream is seekable, just refuse to play on a non-seekable stream.
2009-02-28audiofile: no CamelCaseMax Kellermann1-9/+9
Renamed several variables and a function.
2008-12-27audiofile: don't close onput stream in libaudiofile destroy()Max Kellermann1-2/+3
The input_stream object should only be closed by the MPD core (i.e. decoder_thread.c / decoder_run()). A decoder plugin which attempts to close it will result in a segmentation fault.
2008-12-03decoder: audiofile plugin using input stream instead of fileViliam Mateicka1-15/+74
2008-11-21decoder: check audio_format_valid() in all decodersMax Kellermann1-7/+8
Refuse to play audio formats which are not supported by MPD.
2008-11-21audiofile: use GLib instead of log.hMax Kellermann1-8/+10
2008-11-18audiofile: fixed misplaced ifViliam Mateicka1-2/+1
[mk: by definition, tag_new() cannot fail - removed check]
2008-11-11decoder: return void from decode() methodsMax Kellermann1-5/+4
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-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-1/+3
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-3/+3
2008-10-30decoder: use bool for return values and flagsMax Kellermann1-5/+6
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-3/+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-1/+0
Call ob_clear() in decoder_command_finished() instead of implementing that call in every decoder plugin.
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-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-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-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/+5
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.
2008-09-29switch to C99 types, part IIMax Kellermann1-4/+4
Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
2008-09-07audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann1-1/+1
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
2008-08-29tag: renamed functions, no CamelCaseMax Kellermann1-1/+1
2008-08-29tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann1-2/+2
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
2008-08-26moved global variable "ob" to outputBuffer.hMax Kellermann1-0/+3
This releases several include file dependencies. As a side effect, "CHUNK_SIZE" isn't defined by decoder_api.h anymore, so we have to define it directly in the plugins which need it. It just isn't worth it to add it to the decoder plugin API.
2008-08-26renamed InputPlugin to struct decoder_pluginMax Kellermann1-2/+2
"decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
2008-08-26added decoder_seek_where() and decoder_seek_error()Max Kellermann1-1/+1
Provide access to seeking for the decoder plugins; they have to know where to seek, and they need a way to tell us that seeking has failed.
2008-08-26added decoder_command_finished() to decoder_api.hMax Kellermann1-1/+1
Some decoder commands are implemented in the decoder plugins, thus they need to have an API call to signal that their current command has been finished. Let them use the new decoder_command_finished() instead of the internal dc_command_finished().
2008-08-26added decoder_get_command()Max Kellermann1-2/+2
Another big patch which hides internal mpd APIs from decoder plugins: decoder plugins regularly poll dc->command; expose it with a decoder_api.h function.
2008-08-26remove one indent level from audiofile pluginMax Kellermann1-30/+25
Anonymous code blocks just to declare variables look ugly. Move the variable declarations up and disband the code block.
2008-08-26use break instead of local variable "eof"Max Kellermann1-16/+12
Similar to previous patch: eliminate one variable by using "break". This also simplifies the code since we can remove one level of indent.
2008-08-26added parameter total_time to decoder_initialized()Max Kellermann1-4/+4
Similar to the previous patch: pass total_time instead of manipulating dc->totalTime directly.