aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-10-17input: declare struct input_streamMax Kellermann1-3/+5
Provide a struct type which can be forward-declared. The typedef InputStream is deprecated now.
2008-10-08song: removed CamelCaseMax Kellermann1-1/+1
CamelCase is ugly... rename all functions.
2008-10-08use the "bool" data type instead of "int"Max Kellermann1-1/+1
"bool" should be used in C99 programs for boolean values.
2008-10-08don't include os_compat.hMax Kellermann1-0/+2
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-10-08song: converted typedef Song to struct songMax Kellermann1-0/+1
Again, a data type which can be forward-declared.
2008-09-29switch to C99 types, part IIMax Kellermann1-1/+1
Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
2008-09-09audio: moved cmpAudioFormat() to audio_format.hMax Kellermann1-1/+1
Rename it to audio_format_equals() and return "true" if they are equal.
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-26renamed player.c to player_control.cMax Kellermann1-1/+1
Give player.c a better name, meaning that the code is used to control the player thread.
2008-08-26renamed decode.h to decoder_control.hMax Kellermann1-1/+1
2008-08-26moved global variable "pc" to player.hMax Kellermann1-1/+1
This is the last of the three variables. Now we don't need playerData.h anymore in most sources.
2008-08-26moved global variable "ob" to outputBuffer.hMax Kellermann1-0/+1
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-26moved variable "dc" to decode.hMax Kellermann1-0/+1
Now that "dc" is available here, we don't have to pass it to decoder_is_idle() and decoder_is_starting() anymore.
2008-08-26added flag "decoder.seeking"Max Kellermann1-1/+8
This flag is used internally; it is set by decoder_seek_where(), and indicates that the decoder plugin has begun the seek process. It is used for the case that the decoder plugin has to read data during the seek process. Before this patch, that was impossible, because decoder_read() would refuse to read data unless dc->command is NONE. This patch is kind of a dirty workaround, and needs to be redesigned later.
2008-08-26added decoder_read()Max Kellermann1-0/+24
On our way to stabilize the decoder API, we will one day remove the input stream functions. The most basic function, read() will be provided by decoder_api.h with this patch. It already contains a loop (still with manual polling), error/eof handling and decoder command checks. This kind of code used to be duplicated in all decoder plugins.
2008-08-26added decoder_plugin_register()Max Kellermann1-0/+11
With the functions decoder_plugin_register() and decoder_plugin_unregister(), decoder plugins can register a "secondary" plugin, like the flac input plugin does this for "oggflac".
2008-08-26eliminate OUTPUT_BUFFER_DC_STOP, OUTPUT_BUFFER_DC_SEEKMax Kellermann1-11/+11
(Ab)use the decoder_command enumeration, which has nearly the same values and the same meaning.
2008-08-26added decoder_get_url()Max Kellermann1-0/+5
The wavpack decoder plugin implements a hack, and it needs the song URL for that. This API (and the hack) should be revised later, but add that function for now.
2008-08-26added decoder_seek_where() and decoder_seek_error()Max Kellermann1-2/+16
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-3/+12
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-0/+5
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-26moved convState to struct decoderMax Kellermann1-4/+6
Since we moved all PCM conversions to decoder_data(), the attribute convState isn't being used anymore by the OutputBuffer code. Move it to struct decoder.
2008-08-26moved struct AudioFormat to audio_format.hMax Kellermann1-0/+1
We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.
2008-08-26added parameter total_time to decoder_initialized()Max Kellermann1-1/+4
Similar to the previous patch: pass total_time instead of manipulating dc->totalTime directly.
2008-08-26added audio_format parameter to decoder_initialized()Max Kellermann1-1/+8
dc->audioFormat is set once by the decoder plugins before invoking decoder_initialized(); hide dc->audioFormat and let the decoder pass an AudioFormat pointer to decoder_initialized().
2008-08-26added decoder_clear() and decoder_flush()Max Kellermann1-0/+10
We are now beginning to remove direct structure accesses from the decoder plugins. decoder_clear() and decoder_flush() mask two very common buffer functions.
2008-08-26added decoder_data()Max Kellermann1-0/+80
Moved all of the player-waiting code to decoder_data(), to make OutputBuffer more generic.
2008-08-26added decoder_initialized()Max Kellermann1-6/+9
decoder_initialized() sets the state to DECODE_STATE_DECODE and wakes up the player thread. It is called by the decoder plugin after its internal initialization is finished. More arguments will be added later to prevent direct accesses to the DecoderControl struct.
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-2/+0
This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-30Standardize state_file handling routines.Eric Wong1-6/+8
This way it's easier to manage and extend. git-svn-id: https://svn.musicpd.org/mpd/trunk@4494 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-2/+2
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14[CLEANUP] Remove closeCharSetConversion from theAvuton Olrich1-2/+0
header, there's no need to export it. Static it. git-svn-id: https://svn.musicpd.org/mpd/trunk@4330 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-03remove vim &*(@Warren Dukes1-1/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@2500 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-17actually, scratch the last changeWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1524 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-06-17check in configure script if iconv() needs CONSTWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1523 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-18bunch of autotool cleanupsWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f