diff options
author | Jochen Keil <jochen.keil@gmail.com> | 2009-03-08 20:16:53 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-09 07:58:26 +0100 |
commit | ab3d89f484d7997e3f6dc0d4bb42c1da9377ba40 (patch) | |
tree | a0cd18bc4d69c9f090b9b79c8c2acf4ead9fc2a4 /src/decoder_plugin.h | |
parent | 94d1a87d0432d885756f9d23cfba1f8229cfe453 (diff) | |
download | mpd-ab3d89f484d7997e3f6dc0d4bb42c1da9377ba40.tar.gz mpd-ab3d89f484d7997e3f6dc0d4bb42c1da9377ba40.tar.xz mpd-ab3d89f484d7997e3f6dc0d4bb42c1da9377ba40.zip |
decoder_plugin: added method container_scan()
[mk: fixed whitespace errors; use delete_song() instead of
songvec_delete()]
Diffstat (limited to 'src/decoder_plugin.h')
-rw-r--r-- | src/decoder_plugin.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/decoder_plugin.h b/src/decoder_plugin.h index 35a76bb38..c118a5ec3 100644 --- a/src/decoder_plugin.h +++ b/src/decoder_plugin.h @@ -74,6 +74,18 @@ struct decoder_plugin { */ struct tag *(*tag_dup)(const char *file); + /** + * @brief Return a "virtual" filename for subtracks in + * container formats like flac + * @param const char* pathname full pathname for the file on fs + * @param const unsigned int tnum track number + * + * @return 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 + */ + char* (*container_scan)(const char* pathname, const unsigned int tnum); + /* last element in these arrays must always be a NULL: */ const char *const*suffixes; const char *const*mime_types; @@ -136,4 +148,15 @@ decoder_plugin_tag_dup(const struct decoder_plugin *plugin, return plugin->tag_dup(path_fs); } +/** + * return "virtual" tracks in a container + */ +static inline char * +decoder_plugin_container_scan( const struct decoder_plugin *plugin, + const char* pathname, + const unsigned int tnum) +{ + return plugin->container_scan(pathname, tnum); +} + #endif |