aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* use the "bool" data type instead of "int"Max Kellermann2008-10-081-3/+4
| | | | "bool" should be used in C99 programs for boolean values.
* decoder: renamed plugin methodsMax Kellermann2008-09-291-35/+40
| | | | | Why have a "_func" prefix on all method names? Also don't typedef the methods, there is no advantage in that.
* switch to C99 types, part IIMax Kellermann2008-09-291-1/+1
| | | | | Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
* audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann2008-09-071-1/+2
| | | | | Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
* tag: moved code to tag_id3.cMax Kellermann2008-08-291-0/+1
| | | | | The ID3 code uses only the public tag API, but is otherwise unrelated. Move it to a separate source file.
* tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann2008-08-291-1/+1
| | | | | Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
* moved enum decoder_command to decoder_api.hMax Kellermann2008-08-261-1/+8
| | | | | | The decoder plugins need this type, so export it in the public API. This allows is to remove "decode.h" from "decoder_api.h", uncluttering the API namespace some more.
* moved variable "dc" to decode.hMax Kellermann2008-08-261-0/+1
| | | | | Now that "dc" is available here, we don't have to pass it to decoder_is_idle() and decoder_is_starting() anymore.
* added decoder_read()Max Kellermann2008-08-261-0/+9
| | | | | | | | | 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.
* added decoder_plugin_register()Max Kellermann2008-08-261-0/+4
| | | | | | | 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".
* no camel case in struct decoder_pluginMax Kellermann2008-08-261-8/+8
|
* renamed the InputPlugin function typesMax Kellermann2008-08-261-14/+13
| | | | Continuing the effort to rename InputPlugin to decoder_plugin...
* renamed InputPlugin to struct decoder_pluginMax Kellermann2008-08-261-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.
* eliminate OUTPUT_BUFFER_DC_STOP, OUTPUT_BUFFER_DC_SEEKMax Kellermann2008-08-261-5/+4
| | | | | (Ab)use the decoder_command enumeration, which has nearly the same values and the same meaning.
* added decoder_get_url()Max Kellermann2008-08-261-0/+2
| | | | | | 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.
* added decoder_seek_where() and decoder_seek_error()Max Kellermann2008-08-261-0/+4
| | | | | 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.
* added decoder_command_finished() to decoder_api.hMax Kellermann2008-08-261-0/+7
| | | | | | | 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().
* added decoder_get_command()Max Kellermann2008-08-261-0/+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.
* moved InputPlugin to decoder_api.hMax Kellermann2008-08-261-1/+60
| | | | | | InputPlugin is the API which is implemented by a decoder plugin. This belongs to the public API/ABI, so move it to decoder_api.h. It will later be renamed to something like "decoder_plugin".
* added parameter total_time to decoder_initialized()Max Kellermann2008-08-261-1/+2
| | | | | Similar to the previous patch: pass total_time instead of manipulating dc->totalTime directly.
* added audio_format parameter to decoder_initialized()Max Kellermann2008-08-261-1/+2
| | | | | | 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().
* added decoder_clear() and decoder_flush()Max Kellermann2008-08-261-0/+4
| | | | | | We are now beginning to remove direct structure accesses from the decoder plugins. decoder_clear() and decoder_flush() mask two very common buffer functions.
* added decoder_data()Max Kellermann2008-08-261-0/+15
| | | | | Moved all of the player-waiting code to decoder_data(), to make OutputBuffer more generic.
* added decoder_initialized()Max Kellermann2008-08-261-0/+6
| | | | | | | 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.
* added struct decoderMax Kellermann2008-08-261-0/+37
The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions.