Define default scheduler name in just one place.
authorWim Taymans <wim.taymans@gmail.com>
Tue, 11 Feb 2003 20:41:40 +0000 (20:41 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 11 Feb 2003 20:41:40 +0000 (20:41 +0000)
Original commit message from CVS:
Define default scheduler name in just one place.

gst/gst.c
gst/gstscheduler.c
gst/gstscheduler.h

index 17748a1..4341d5a 100644 (file)
--- a/gst/gst.c
+++ b/gst/gst.c
@@ -100,8 +100,8 @@ enum {
 #define NUL '\0'
 #endif
 
-/* default scheduler, 'basicomega', can be changed in
- * gstscheduler.c in function gst_scheduler_factory_class_init
+/* default scheduler, can be changed in gstscheduler.h with
+ * the GST_SCHEDULER_DEFAULT_NAME define.
  */
 static const struct poptOption options[] = {
   {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL},
@@ -114,7 +114,7 @@ static const struct poptOption options[] = {
   {"gst-plugin-spew",    NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP,   NULL, ARG_PLUGIN_SPEW,    "enable verbose plugin loading diagnostics", NULL},
   {"gst-plugin-path",    NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH,    "'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins", "PATHS"},
   {"gst-plugin-load",    NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD,    "comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH", "PLUGINS"},
-  {"gst-scheduler",      NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER,      "scheduler to use ('basicomega' is the default)", "SCHEDULER"},
+  {"gst-scheduler",      NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER,      "scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)", "SCHEDULER"},
   {"gst-nothreads",      NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP,   NULL, ARG_NOTHREADS,      "use NOPs for all threading and locking operations", NULL},
   {"gst-registry",       NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY,       "registry to use" , "REGISTRY"},
   POPT_TABLEEND
index 53f78a1..c538865 100644 (file)
@@ -802,7 +802,7 @@ gst_scheduler_factory_class_init (GstSchedulerFactoryClass *klass)
   factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE);
 
   if (!_default_name)
-    _default_name = g_strdup ("basicomega");
+    _default_name = g_strdup (GST_SCHEDULER_DEFAULT_NAME);
 }
 
 static void
index bbac780..bd9ad3e 100644 (file)
@@ -151,6 +151,9 @@ void                        gst_scheduler_show              (GstScheduler *sched);
 #define GST_IS_SCHEDULER_FACTORY_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SCHEDULER_FACTORY))
 #define GST_SCHEDULER_FACTORY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SCHEDULER_FACTORY, GstSchedulerFactoryClass))
 
+/* change this to change the default scheduler */
+#define GST_SCHEDULER_DEFAULT_NAME     "basicomega"
+
 typedef struct _GstSchedulerFactory GstSchedulerFactory;
 typedef struct _GstSchedulerFactoryClass GstSchedulerFactoryClass;