decoder_plugin: added method stream_tag()

This is like tag_dup(), but works with an input_stream object instead
of a file path.
This commit is contained in:
Max Kellermann
2009-12-31 17:18:10 +01:00
parent 7a2e07e124
commit 6b96f5d566
4 changed files with 63 additions and 1 deletions

View File

@@ -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) {