From 6b96f5d566a6a36bfcdb70c8a27771717eb3d038 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 31 Dec 2009 17:18:10 +0100 Subject: decoder_plugin: added method stream_tag() This is like tag_dup(), but works with an input_stream object instead of a file path. --- test/read_tags.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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) { -- cgit v1.2.3