aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_plugin.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-06-03 08:31:48 +0200
committerMax Kellermann <max@duempel.org>2009-06-04 08:22:43 +0200
commited475718e6d21434c76cea0e76c6cf3cfd4e1f7d (patch)
treed943d7447781f886fd0334e42b6538e7b0769ccc /src/decoder_plugin.h
parent70d7c795466b8074acfed36fd54e114749cac9d8 (diff)
downloadmpd-ed475718e6d21434c76cea0e76c6cf3cfd4e1f7d.tar.gz
mpd-ed475718e6d21434c76cea0e76c6cf3cfd4e1f7d.tar.xz
mpd-ed475718e6d21434c76cea0e76c6cf3cfd4e1f7d.zip
decoder_plugin: corrected outdated API documentation
Diffstat (limited to 'src/decoder_plugin.h')
-rw-r--r--src/decoder_plugin.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/decoder_plugin.h b/src/decoder_plugin.h
index 6737522a5..66501a0a1 100644
--- a/src/decoder_plugin.h
+++ b/src/decoder_plugin.h
@@ -37,43 +37,44 @@ struct decoder_plugin {
const char *name;
/**
- * optional, set this to NULL if the InputPlugin doesn't
- * have/need one this must return < 0 if there is an error and
- * >= 0 otherwise
+ * Initialize the decoder plugin. Optional method.
+ *
+ * @param param a configuration block for this plugin, or NULL
+ * if none is configured
+ * @return true if the plugin was initialized successfully,
+ * false if the plugin is not available
*/
bool (*init)(const struct config_param *param);
/**
- * optional, set this to NULL if the InputPlugin doesn't have/need one
+ * Deinitialize a decoder plugin which was initialized
+ * successfully. Optional method.
*/
void (*finish)(void);
/**
- * this will be used to decode InputStreams, and is
- * recommended for files and networked (HTTP) connections.
+ * Decode a stream (data read from an #input_stream object).
*
- * @return false if the plugin cannot decode the stream, and
- * true if it was able to do so (even if an error occured
- * during playback)
+ * Either implement this method or file_decode(). If
+ * possible, it is recommended to implement this method,
+ * because it is more versatile.
*/
- void (*stream_decode)(struct decoder *, struct input_stream *);
+ void (*stream_decode)(struct decoder *decoder,
+ struct input_stream *is);
/**
- * use this if and only if your InputPlugin can only be passed
- * a filename or handle as input, and will not allow callbacks
- * to be set (like Ogg-Vorbis and FLAC libraries allow)
+ * Decode a local file.
*
- * @return false if the plugin cannot decode the file, and
- * true if it was able to do so (even if an error occured
- * during playback)
+ * Either implement this method or stream_decode().
*/
- void (*file_decode)(struct decoder *, const char *path);
+ void (*file_decode)(struct decoder *decoder, const char *path_fs);
/**
- * file should be the full path! Returns NULL if a tag cannot
- * be found or read
+ * Read the tags of a local file.
+ *
+ * @return NULL if the operation has failed
*/
- struct tag *(*tag_dup)(const char *file);
+ struct tag *(*tag_dup)(const char *path_fs);
/**
* @brief Return a "virtual" filename for subtracks in
@@ -85,7 +86,7 @@ struct decoder_plugin {
* a filename for every single track according to tnum (param 2)
* do not include full pathname here, just the "virtual" file
*/
- char* (*container_scan)(const char* pathname, const unsigned int tnum);
+ char* (*container_scan)(const char *path_fs, const unsigned int tnum);
/* last element in these arrays must always be a NULL: */
const char *const*suffixes;