aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/decoder_plugin.h')
-rw-r--r--src/decoder_plugin.h39
1 files changed, 37 insertions, 2 deletions
diff --git a/src/decoder_plugin.h b/src/decoder_plugin.h
index 66501a0a1..d8371ddb8 100644
--- a/src/decoder_plugin.h
+++ b/src/decoder_plugin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2009 The Music Player Daemon Project
+ * Copyright (C) 2003-2010 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -77,6 +77,13 @@ struct decoder_plugin {
struct tag *(*tag_dup)(const char *path_fs);
/**
+ * Read the tags of a stream.
+ *
+ * @return NULL if the operation has failed
+ */
+ struct tag *(*stream_tag)(struct input_stream *is);
+
+ /**
* @brief Return a "virtual" filename for subtracks in
* container formats like flac
* @param const char* pathname full pathname for the file on fs
@@ -147,7 +154,21 @@ static inline struct tag *
decoder_plugin_tag_dup(const struct decoder_plugin *plugin,
const char *path_fs)
{
- return plugin->tag_dup(path_fs);
+ return plugin->tag_dup != NULL
+ ? plugin->tag_dup(path_fs)
+ : NULL;
+}
+
+/**
+ * Read the tag of a stream.
+ */
+static inline struct tag *
+decoder_plugin_stream_tag(const struct decoder_plugin *plugin,
+ struct input_stream *is)
+{
+ return plugin->stream_tag != NULL
+ ? plugin->stream_tag(is)
+ : NULL;
}
/**
@@ -161,4 +182,18 @@ decoder_plugin_container_scan( const struct decoder_plugin *plugin,
return plugin->container_scan(pathname, tnum);
}
+/**
+ * Does the plugin announce the specified file name suffix?
+ */
+bool
+decoder_plugin_supports_suffix(const struct decoder_plugin *plugin,
+ const char *suffix);
+
+/**
+ * Does the plugin announce the specified MIME type?
+ */
+bool
+decoder_plugin_supports_mime_type(const struct decoder_plugin *plugin,
+ const char *mime_type);
+
#endif