From ab3d89f484d7997e3f6dc0d4bb42c1da9377ba40 Mon Sep 17 00:00:00 2001 From: Jochen Keil Date: Sun, 8 Mar 2009 20:16:53 +0100 Subject: decoder_plugin: added method container_scan() [mk: fixed whitespace errors; use delete_song() instead of songvec_delete()] --- src/decoder_plugin.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/decoder_plugin.h') diff --git a/src/decoder_plugin.h b/src/decoder_plugin.h index 35a76bb3..c118a5ec 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 -- cgit v1.2.3