json = g_string_new ("{");
for (i = 2; i < argc; i++) {
- gchar *basename;
+ gchar *basename, **splitext, *filename;
libfile = argv[i];
plugin = gst_plugin_load_file (libfile, &error);
if (!plugin) {
}
basename = g_filename_display_basename (libfile);
+ splitext = g_strsplit (basename, ".", 2);
+ filename =
+ g_str_has_prefix (splitext[0], "lib") ? &splitext[0][3] : splitext[0];
g_string_append_printf (json,
"%s\"%s\": {"
"\"description\":\"%s\","
first ? "" : ",",
gst_plugin_get_name (plugin),
gst_plugin_get_description (plugin),
- basename,
+ filename,
gst_plugin_get_source (plugin),
gst_plugin_get_package (plugin),
gst_plugin_get_license (plugin), gst_plugin_get_origin (plugin));
g_free (basename);
+ g_strfreev (splitext);
first = FALSE;
features =
"rank": "none"
}
},
- "filename": "libgstcoreelements.so",
+ "filename": "gstcoreelements",
"license": "LGPL",
"package": "GStreamer git",
"source": "gstreamer",