extern gint _gst_trace_on;
+extern gboolean _gst_plugin_spew;
static gboolean gst_init_check (int *argc, gchar ***argv);
(*argv)[i] = NULL;
}
+ else if (!strncmp ("--gst-plugin-spew", (*argv)[i], 17)) {
+ _gst_plugin_spew = TRUE;
+
+ (*argv)[i] = NULL;
+ }
+ else if (!strncmp ("--gst-plugin-path=", (*argv)[i], 17)) {
+ gst_plugin_add_path ((*argv)[i]+18);
+
+ (*argv)[i] = NULL;
+ }
else if (!strncmp ("--help", (*argv)[i], 6)) {
showhelp = TRUE;
}
g_print ("usage %s [OPTION...]\n", (*argv)[0]);
g_print ("\nGStreamer options\n");
- g_print (" --gst-info-mask=FLAGS Gst info flags to set (current %08x)\n", gst_info_get_categories());
- g_print (" --gst-debug-mask=FLAGS Gst debugging flags to set\n");
+ g_print (" --gst-info-mask=FLAGS GST info flags to set (current %08x)\n", gst_info_get_categories());
+ g_print (" --gst-debug-mask=FLAGS GST debugging flags to set\n");
+ g_print (" --gst-plugin-spew Enable printout of errors while loading GST plugins\n");
+ g_print (" --gst-plugin-path=PATH Add a directory to the plugin search path\n");
g_print ("\n Mask (to be OR'ed) info/debug FLAGS \n");
g_print ("--------------------------------------------------------\n");
xmlFreeDoc (doc);
}
+void
+gst_plugin_add_path (const gchar *path)
+{
+ _gst_plugin_paths = g_list_prepend (_gst_plugin_paths,g_strdup(path));
+}
+
static time_t
get_time(const char * path)
{
path = _gst_plugin_paths;
while (path != NULL) {
- GST_DEBUG (GST_CAT_PLUGIN_LOADING,"loading plugins from %s\n",(gchar *)path->data);
+ GST_INFO (GST_CAT_PLUGIN_LOADING,"loading plugins from %s\n",(gchar *)path->data);
gst_plugin_load_recurse(path->data,NULL);
path = g_list_next(path);
}
}
return TRUE;
} else if (_gst_plugin_spew) {
- gst_info("error loading plugin: %s, reason: %s\n", name, g_module_error());
+ // FIXME this should be some standard gst mechanism!!!
+ g_printerr ("error loading plugin %s, reason: %s\n", name, g_module_error());
}
return FALSE;
GstPlugin* gst_plugin_new (const gchar *name);
+void gst_plugin_add_path (const gchar *path);
+
const gchar* gst_plugin_get_name (GstPlugin *plugin);
void gst_plugin_set_name (GstPlugin *plugin, const gchar *name);
const gchar* gst_plugin_get_longname (GstPlugin *plugin);
GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING);
gst_thread_signal_thread (thread);
+ pthread_join(thread->thread_id,NULL);
break;
default:
break;
}
GST_FLAG_UNSET (thread, GST_THREAD_STATE_REAPING);
- //pthread_join (thread->thread_id, 0);
+// FIXME this should be removed (why's it here???)
+// //pthread_join (thread->thread_id, 0);
GST_INFO (GST_CAT_THREAD, "gstthread: thread \"%s\" is stopped",
GST_ELEMENT_NAME (thread));