tracer: latency: Show element id, element name and pad name
[platform/upstream/gstreamer.git] / gst / gstpluginloader.c
index 9235136..a933a4b 100644 (file)
@@ -339,7 +339,7 @@ static void
 plugin_loader_create_blacklist_plugin (GstPluginLoader * l,
     PendingPluginEntry * entry)
 {
-  GstPlugin *plugin = g_object_newv (GST_TYPE_PLUGIN, 0, NULL);
+  GstPlugin *plugin = g_object_new (GST_TYPE_PLUGIN, NULL);
 
   plugin->filename = g_strdup (entry->filename);
   plugin->file_mtime = entry->file_mtime;
@@ -408,7 +408,7 @@ gst_plugin_loader_use_usr_bin_arch (void)
 static gboolean
 gst_plugin_loader_try_helper (GstPluginLoader * loader, gchar * location)
 {
-  char *argv[5] = { NULL, };
+  char *argv[6] = { NULL, };
   int c = 0;
 
 #if defined (__APPLE__) && defined (USR_BIN_ARCH_SWITCH)
@@ -419,9 +419,10 @@ gst_plugin_loader_try_helper (GstPluginLoader * loader, gchar * location)
 #endif
   argv[c++] = location;
   argv[c++] = (char *) "-l";
+  argv[c++] = _gst_executable_path;
   argv[c++] = NULL;
 
-  if (c > 3) {
+  if (c > 4) {
     GST_LOG ("Trying to spawn gst-plugin-scanner helper at %s with arch %s",
         location, argv[1]);
   } else {
@@ -480,12 +481,12 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
     {
       gchar *basedir;
 
-      basedir = g_win32_get_package_installation_directory_of_module (_priv_gst_dll_handle);
-      helper_bin = g_build_filename (basedir,
-                                     "lib",
-                                     "gstreamer-" GST_API_VERSION,
-                                     "gst-plugin-scanner.exe",
-                                     NULL);
+      basedir =
+          g_win32_get_package_installation_directory_of_module
+          (_priv_gst_dll_handle);
+      helper_bin =
+          g_build_filename (basedir, GST_PLUGIN_SCANNER_SUBDIR,
+          "gstreamer-" GST_API_VERSION, "gst-plugin-scanner.exe", NULL);
       g_free (basedir);
     }
 #else
@@ -528,6 +529,7 @@ plugin_loader_cleanup_child (GstPluginLoader * l)
 gboolean
 _gst_plugin_loader_client_run (void)
 {
+  gboolean res = TRUE;
   GstPluginLoader *l;
 
   l = plugin_loader_new (NULL);
@@ -543,16 +545,18 @@ _gst_plugin_loader_client_run (void)
 
     dup_fd = dup (0);           /* STDIN */
     if (dup_fd == -1) {
-      GST_ERROR ("Failed to start. Could no dup STDIN, errno %d", errno);
-      return FALSE;
+      GST_ERROR ("Failed to start. Could not dup STDIN, errno %d", errno);
+      res = FALSE;
+      goto beach;
     }
     l->fd_r.fd = dup_fd;
     close (0);
 
     dup_fd = dup (1);           /* STDOUT */
     if (dup_fd == -1) {
-      GST_ERROR ("Failed to start. Could no dup STDOUT, errno %d", errno);
-      return FALSE;
+      GST_ERROR ("Failed to start. Could not dup STDOUT, errno %d", errno);
+      res = FALSE;
+      goto beach;
     }
     l->fd_w.fd = dup_fd;
     close (1);
@@ -578,9 +582,13 @@ _gst_plugin_loader_client_run (void)
   /* Loop, listening for incoming packets on the fd and writing responses */
   while (!l->rx_done && exchange_packets (l));
 
+#ifndef G_OS_WIN32
+beach:
+#endif
+
   plugin_loader_free (l);
 
-  return TRUE;
+  return res;
 }
 
 static void