aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/sidplay_plugin.cxx1
-rw-r--r--src/decoder_plugin.h23
2 files changed, 24 insertions, 0 deletions
diff --git a/src/decoder/sidplay_plugin.cxx b/src/decoder/sidplay_plugin.cxx
index cea7f84db..06ac9493d 100644
--- a/src/decoder/sidplay_plugin.cxx
+++ b/src/decoder/sidplay_plugin.cxx
@@ -156,6 +156,7 @@ const struct decoder_plugin sidplay_decoder_plugin = {
NULL, /* stream_decode() */
sidplay_file_decode,
sidplay_tag_dup,
+ NULL, /* container_scan */
sidplay_suffixes,
NULL, /* mime_types */
};
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