renamed the InputPlugin function types
Continuing the effort to rename InputPlugin to decoder_plugin...
This commit is contained in:
parent
41c5fbbb07
commit
f1a014d094
@ -42,42 +42,41 @@ struct decoder;
|
|||||||
|
|
||||||
/* optional, set this to NULL if the InputPlugin doesn't have/need one
|
/* 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 */
|
* this must return < 0 if there is an error and >= 0 otherwise */
|
||||||
typedef int (*InputPlugin_initFunc) (void);
|
typedef int (*decoder_init_func) (void);
|
||||||
|
|
||||||
/* optional, set this to NULL if the InputPlugin doesn't have/need one */
|
/* optional, set this to NULL if the InputPlugin doesn't have/need one */
|
||||||
typedef void (*InputPlugin_finishFunc) (void);
|
typedef void (*decoder_finish_func) (void);
|
||||||
|
|
||||||
/* boolean return value, returns 1 if the InputStream is decodable by
|
/* boolean return value, returns 1 if the InputStream is decodable by
|
||||||
* the InputPlugin, 0 if not */
|
* the InputPlugin, 0 if not */
|
||||||
typedef unsigned int (*InputPlugin_tryDecodeFunc) (InputStream *);
|
typedef unsigned int (*decoder_try_decode_func) (InputStream *);
|
||||||
|
|
||||||
/* this will be used to decode InputStreams, and is recommended for files
|
/* this will be used to decode InputStreams, and is recommended for files
|
||||||
* and networked (HTTP) connections.
|
* and networked (HTTP) connections.
|
||||||
*
|
*
|
||||||
* returns -1 on error, 0 on success */
|
* returns -1 on error, 0 on success */
|
||||||
typedef int (*InputPlugin_streamDecodeFunc) (struct decoder *,
|
typedef int (*decoder_stream_decode_func) (struct decoder *, InputStream *);
|
||||||
InputStream *);
|
|
||||||
|
|
||||||
/* use this if and only if your InputPlugin can only be passed a filename or
|
/* 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
|
* handle as input, and will not allow callbacks to be set (like Ogg-Vorbis
|
||||||
* and FLAC libraries allow)
|
* and FLAC libraries allow)
|
||||||
*
|
*
|
||||||
* returns -1 on error, 0 on success */
|
* returns -1 on error, 0 on success */
|
||||||
typedef int (*InputPlugin_fileDecodeFunc) (struct decoder *,
|
typedef int (*decoder_file_decode_func) (struct decoder *, char *path);
|
||||||
char *path);
|
|
||||||
|
|
||||||
/* file should be the full path! Returns NULL if a tag cannot be found
|
/* file should be the full path! Returns NULL if a tag cannot be found
|
||||||
* or read */
|
* or read */
|
||||||
typedef MpdTag *(*InputPlugin_tagDupFunc) (char *file);
|
typedef MpdTag *(*decoder_tag_dup_func) (char *file);
|
||||||
|
|
||||||
struct decoder_plugin {
|
struct decoder_plugin {
|
||||||
const char *name;
|
const char *name;
|
||||||
InputPlugin_initFunc initFunc;
|
|
||||||
InputPlugin_finishFunc finishFunc;
|
decoder_init_func initFunc;
|
||||||
InputPlugin_tryDecodeFunc tryDecodeFunc;
|
decoder_finish_func finishFunc;
|
||||||
InputPlugin_streamDecodeFunc streamDecodeFunc;
|
decoder_try_decode_func tryDecodeFunc;
|
||||||
InputPlugin_fileDecodeFunc fileDecodeFunc;
|
decoder_stream_decode_func streamDecodeFunc;
|
||||||
InputPlugin_tagDupFunc tagDupFunc;
|
decoder_file_decode_func fileDecodeFunc;
|
||||||
|
decoder_tag_dup_func tagDupFunc;
|
||||||
|
|
||||||
/* one or more of the INPUT_PLUGIN_STREAM_* values OR'd together */
|
/* one or more of the INPUT_PLUGIN_STREAM_* values OR'd together */
|
||||||
unsigned char streamTypes;
|
unsigned char streamTypes;
|
||||||
|
Loading…
Reference in New Issue
Block a user