aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder_plugin.h23
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