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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user