scheduler renaming

Original commit message from CVS:
scheduler renaming
- wingo or omega for cothreads package
- basic or fast or optimal for algorithms
This commit is contained in:
Thomas Vander Stichele 2002-09-12 19:23:41 +00:00
parent 27301abdb3
commit 17d01b5d21
6 changed files with 40 additions and 33 deletions

View file

@ -88,6 +88,9 @@ enum {
#define NUL '\0' #define NUL '\0'
#endif #endif
/* default scheduler, 'basicomega', can be changed in
* gstscheduler.c in function gst_scheduler_factory_class_init
*/
static const struct poptOption options[] = { static const struct poptOption options[] = {
{NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL}, {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL},
{"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, "Print the GStreamer version", NULL}, {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, "Print the GStreamer version", NULL},
@ -99,7 +102,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-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-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-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 ('basic' is the default)", "SCHEDULER"}, {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, "scheduler to use ('basicomega' 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-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"}, {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, "registry to use" , "REGISTRY"},
POPT_TABLEEND POPT_TABLEEND

View file

@ -681,7 +681,7 @@ gst_scheduler_factory_class_init (GstSchedulerFactoryClass *klass)
factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE); factory_parent_class = g_type_class_ref (GST_TYPE_PLUGIN_FEATURE);
if (!_default_name) if (!_default_name)
_default_name = g_strdup ("basic"); _default_name = g_strdup ("basicomega");
} }
static void static void

View file

@ -1,34 +1,38 @@
plugindir = $(libdir)/gst plugindir = $(libdir)/gst
plugin_LTLIBRARIES = libgstbasicscheduler.la libgststandardscheduler.la libgstfastbasicscheduler.la libgstfaststandardscheduler.la plugin_LTLIBRARIES = \
libgstbasicomegascheduler.la \
libgstbasicwingoscheduler.la \
libgstfastomegascheduler.la \
libgstfastwingoscheduler.la
libgstbasicscheduler_la_SOURCES = gstbasicscheduler.c libgstbasicomegascheduler_la_SOURCES = gstbasicscheduler.c
libgstbasicscheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_BASIC libgstbasicomegascheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_OMEGA
libgstbasicscheduler_la_LIBADD = ../libcothreads.la libgstbasicomegascheduler_la_LIBADD = ../libcothreads.la
libgstbasicscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstbasicomegascheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
# some silly bug prevents us from putting both $(top_builddir) and # some silly bug prevents us from putting both $(top_builddir) and
# $(src_dir) on the same line for CFLAGS (try it, reverse them, see the # $(src_dir) on the same line for CFLAGS (try it, reverse them, see the
# strangeness on your gcc line) so we pull this dirty += trick on it, hah ! # strangeness on your gcc line) so we pull this dirty += trick on it, hah !
libgststandardscheduler_la_SOURCES = gstbasicscheduler.c libgstbasicwingoscheduler_la_SOURCES = gstbasicscheduler.c
libgststandardscheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_STANDARD libgstbasicwingoscheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_WINGO
libgststandardscheduler_la_CFLAGS += -I$(top_builddir)/libs/ext/cothreads libgstbasicwingoscheduler_la_CFLAGS += -I$(top_builddir)/libs/ext/cothreads
libgststandardscheduler_la_CFLAGS += -I$(top_srcdir)/libs/ext/cothreads libgstbasicwingoscheduler_la_CFLAGS += -I$(top_srcdir)/libs/ext/cothreads
libgststandardscheduler_la_LIBADD = $(top_builddir)/libs/ext/cothreads/cothreads/libcothreads-gthreads.la libgstbasicwingoscheduler_la_LIBADD = $(top_builddir)/libs/ext/cothreads/cothreads/libcothreads-gthreads.la
libgststandardscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstbasicwingoscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstfastbasicscheduler_la_SOURCES = gstfastscheduler.c libgstfastomegascheduler_la_SOURCES = gstfastscheduler.c
libgstfastbasicscheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_BASIC libgstfastomegascheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_OMEGA
libgstfastbasicscheduler_la_LIBADD = ../libcothreads.la libgstfastomegascheduler_la_LIBADD = ../libcothreads.la
libgstfastbasicscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstfastomegascheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstfaststandardscheduler_la_SOURCES = gstfastscheduler.c libgstfastwingoscheduler_la_SOURCES = gstfastscheduler.c
libgstfaststandardscheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_STANDARD libgstfastwingoscheduler_la_CFLAGS = $(GST_CFLAGS) -D_COTHREADS_WINGO
libgstfaststandardscheduler_la_CFLAGS += -I$(top_builddir)/libs/ext/cothreads libgstfastwingoscheduler_la_CFLAGS += -I$(top_builddir)/libs/ext/cothreads
libgstfaststandardscheduler_la_CFLAGS += -I$(top_srcdir)/libs/ext/cothreads libgstfastwingoscheduler_la_CFLAGS += -I$(top_srcdir)/libs/ext/cothreads
libgstfaststandardscheduler_la_LIBADD = $(top_builddir)/libs/ext/cothreads/cothreads/libcothreads-gthreads.la libgstfastwingoscheduler_la_LIBADD = $(top_builddir)/libs/ext/cothreads/cothreads/libcothreads-gthreads.la
libgstfaststandardscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstfastwingoscheduler_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
## this is a REALLY evil hack ## this is a REALLY evil hack
## but we need to keep it as long as we have libs/gst and libs/ext ## but we need to keep it as long as we have libs/gst and libs/ext

View file

@ -21,13 +21,13 @@
*/ */
/* use the old cothreads implementation in gst/cothreads.[ch] */ /* use the old cothreads implementation in gst/cothreads.[ch] */
#if defined(_COTHREADS_BASIC) #if defined(_COTHREADS_OMEGA)
#include "../cothreads.h" #include "../cothreads.h"
/* the name of this cothreads type */ /* the name of this cothreads type */
#define COTHREADS_NAME "basic" #define COTHREADS_NAME "omega"
#define COTHREADS_NAME_CAPITAL "Basic" #define COTHREADS_NAME_CAPITAL "Omega"
/* unify the structs /* unify the structs
* *
@ -70,14 +70,14 @@ typedef cothread_state cothread;
/* use the new cothreads implementation in libs/ext/cothreads */ /* use the new cothreads implementation in libs/ext/cothreads */
#elif defined(_COTHREADS_STANDARD) #elif defined(_COTHREADS_WINGO)
#include <cothreads/cothreads.h> #include <cothreads/cothreads.h>
#include <errno.h> #include <errno.h>
/* the name of this cothreads */ /* the name of this cothreads */
#define COTHREADS_NAME "standard" #define COTHREADS_NAME "wingo"
#define COTHREADS_NAME_CAPITAL "Standard" #define COTHREADS_NAME_CAPITAL "Wingo"
/* unify the structs /* unify the structs
* *

View file

@ -244,7 +244,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_plugin_set_longname (plugin, "A basic scheduler"); gst_plugin_set_longname (plugin, "A basic scheduler");
factory = gst_scheduler_factory_new (COTHREADS_NAME, factory = gst_scheduler_factory_new ("basic"COTHREADS_NAME,
"A basic scheduler using "COTHREADS_NAME" cothreads", "A basic scheduler using "COTHREADS_NAME" cothreads",
gst_basic_scheduler_get_type()); gst_basic_scheduler_get_type());
@ -260,7 +260,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstPluginDesc plugin_desc = { GstPluginDesc plugin_desc = {
GST_VERSION_MAJOR, GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
"gst"COTHREADS_NAME"scheduler", "gstbasic"COTHREADS_NAME"scheduler",
plugin_init plugin_init
}; };

View file

@ -198,7 +198,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
gst_plugin_set_longname (plugin, "A fast scheduler"); gst_plugin_set_longname (plugin, "A fast scheduler");
factory = gst_scheduler_factory_new ("fast"COTHREADS_NAME, factory = gst_scheduler_factory_new ("fast"COTHREADS_NAME,
"A fast scheduler, it uses "COTHREADS_NAME" cothreads", "A fast scheduler using "COTHREADS_NAME" cothreads",
gst_fast_scheduler_get_type()); gst_fast_scheduler_get_type());
if (factory != NULL) { if (factory != NULL) {
@ -213,7 +213,7 @@ plugin_init (GModule *module, GstPlugin *plugin)
GstPluginDesc plugin_desc = { GstPluginDesc plugin_desc = {
GST_VERSION_MAJOR, GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
"gstfast"COTHREADS_NAME_CAPITAL"scheduler", "gstfast"COTHREADS_NAME"scheduler",
plugin_init plugin_init
}; };