MPD  0.18~git
Data Fields
decoder_plugin Struct Reference

#include <decoder_plugin.h>

Data Fields

const char * name
bool(* init )(const struct config_param *param)
 Initialize the decoder plugin.
void(* finish )(void)
 Deinitialize a decoder plugin which was initialized successfully.
void(* stream_decode )(struct decoder *decoder, struct input_stream *is)
 Decode a stream (data read from an #input_stream object).
void(* file_decode )(struct decoder *decoder, const char *path_fs)
 Decode a local file.
bool(* scan_file )(const char *path_fs, const struct tag_handler *handler, void *handler_ctx)
 Scan metadata of a file.
bool(* scan_stream )(struct input_stream *is, const struct tag_handler *handler, void *handler_ctx)
 Scan metadata of a file.
char *(* container_scan )(const char *path_fs, const unsigned int tnum)
 Return a "virtual" filename for subtracks in container formats like flac.
const char *const * suffixes
const char *const * mime_types

Detailed Description

Definition at line 37 of file decoder_plugin.h.

Field Documentation

char*(* decoder_plugin::container_scan)(const char *path_fs, const unsigned int tnum)

Return a "virtual" filename for subtracks in container formats like flac.

Parameters
constchar* pathname full pathname for the file on fs
constunsigned int tnum track number
Returns
NULL if there are no multiple files a filename for every single track according to tnum (param 2) do not include full pathname here, just the "virtual" file

Definition at line 101 of file decoder_plugin.h.

void(* decoder_plugin::file_decode)(struct decoder *decoder, const char *path_fs)

Decode a local file.

Either implement this method or stream_decode().

Definition at line 71 of file decoder_plugin.h.

void(* decoder_plugin::finish)(void)

Deinitialize a decoder plugin which was initialized successfully.

Optional method.

Definition at line 54 of file decoder_plugin.h.

bool(* decoder_plugin::init)(const struct config_param *param)

Initialize the decoder plugin.

Optional method.

Parameters
parama configuration block for this plugin, or NULL if none is configured
Returns
true if the plugin was initialized successfully, false if the plugin is not available

Definition at line 48 of file decoder_plugin.h.

const char* const* decoder_plugin::mime_types

Definition at line 105 of file decoder_plugin.h.

const char* decoder_plugin::name

Definition at line 38 of file decoder_plugin.h.

bool(* decoder_plugin::scan_file)(const char *path_fs, const struct tag_handler *handler, void *handler_ctx)

Scan metadata of a file.

Returns
false if the operation has failed

Definition at line 78 of file decoder_plugin.h.

bool(* decoder_plugin::scan_stream)(struct input_stream *is, const struct tag_handler *handler, void *handler_ctx)

Scan metadata of a file.

Returns
false if the operation has failed

Definition at line 87 of file decoder_plugin.h.

void(* decoder_plugin::stream_decode)(struct decoder *decoder, struct input_stream *is)

Decode a stream (data read from an #input_stream object).

Either implement this method or file_decode(). If possible, it is recommended to implement this method, because it is more versatile.

Definition at line 63 of file decoder_plugin.h.

const char* const* decoder_plugin::suffixes

Definition at line 104 of file decoder_plugin.h.


The documentation for this struct was generated from the following file: