aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-31 17:18:10 +0100
committerMax Kellermann <max@duempel.org>2009-12-31 18:27:48 +0100
commit6b96f5d566a6a36bfcdb70c8a27771717eb3d038 (patch)
tree4792f3d8f9e16c3ba3416e46cc613e7457428cde /test
parent7a2e07e124ebaae8ecc55de6ea24cbb10c32cebd (diff)
downloadmpd-6b96f5d566a6a36bfcdb70c8a27771717eb3d038.tar.gz
mpd-6b96f5d566a6a36bfcdb70c8a27771717eb3d038.tar.xz
mpd-6b96f5d566a6a36bfcdb70c8a27771717eb3d038.zip
decoder_plugin: added method stream_tag()
This is like tag_dup(), but works with an input_stream object instead of a file path.
Diffstat (limited to 'test')
-rw-r--r--test/read_tags.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/read_tags.c b/test/read_tags.c
index adeabb156..1e88005c2 100644
--- a/test/read_tags.c
+++ b/test/read_tags.c
@@ -169,6 +169,20 @@ int main(int argc, char **argv)
}
tag = decoder_plugin_tag_dup(plugin, path);
+ if (tag == NULL && plugin->stream_tag != NULL) {
+ struct input_stream is;
+
+ if (!input_stream_open(&is, path, &error)) {
+ g_printerr("Failed to open %s: %s\n",
+ path, error->message);
+ g_error_free(error);
+ return 1;
+ }
+
+ tag = decoder_plugin_stream_tag(plugin, &is);
+ input_stream_close(&is);
+ }
+
decoder_plugin_deinit_all();
input_stream_global_finish();
if (tag == NULL) {