re-enable thread test, although it does not work but passes right now warn for bizarre behavior in plugin loading

Original commit message from CVS:
re-enable thread test, although it does not work but passes right now
warn for bizarre behavior in plugin loading
This commit is contained in:
Andy Wingo 2002-05-25 17:45:51 +00:00
parent e8982eaf0f
commit 631c8f5ca5
6 changed files with 37 additions and 48 deletions

View file

@ -437,6 +437,7 @@ testsuite/dynparams/Makefile
testsuite/elements/Makefile
testsuite/plugin/Makefile
testsuite/refcounting/Makefile
testsuite/threads/Makefile
examples/Makefile
examples/autoplug/Makefile
examples/helloworld/Makefile

View file

@ -1482,15 +1482,17 @@ gst_xml_registry_rebuild (GstRegistry *registry)
walk = plugins;
while (walk) {
/* should return FALSE */
gst_plugin_load_plugin (GST_PLUGIN (walk->data), &error);
GST_INFO (GST_CAT_PLUGIN_LOADING, "Plugin %s failed to load: %s\n",
((GstPlugin*)walk->data)->filename, error->message);
if (gst_plugin_load_plugin (GST_PLUGIN (walk->data), &error)) {
g_warning ("Bizarre behavior: plugin %s actually loaded", ((GstPlugin*)walk->data)->filename);
} else {
GST_INFO (GST_CAT_PLUGIN_LOADING, "Plugin %s failed to load: %s",
((GstPlugin*)walk->data)->filename, error->message);
g_free (((GstPlugin*)walk->data)->filename);
g_free (walk->data);
g_error_free (error);
error = NULL;
g_free (((GstPlugin*)walk->data)->filename);
g_free (walk->data);
g_error_free (error);
error = NULL;
}
walk = g_list_next (walk);
}

View file

@ -1,4 +1,4 @@
# FIXME : refcounting threads bytestream
# FIXME : threads bytestream
SUBDIRS = caps cleanup plugin elements clock refcounting ## dynparams
GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
@ -14,8 +14,7 @@ check_PROGRAMS = $(testprogs)
LIBS = $(GST_LIBS)
CFLAGS = $(GST_CFLAGS)
# FIXME : refcounting threadds
DIST_SUBDIRS = bytestream caps cleanup clock dynparams elements \
plugin refcounting
plugin refcounting threads
EXTRA_DIST = gst-inspect-check

View file

@ -15,21 +15,18 @@ usage (void)
static void
construct_pipeline (GstElement *pipeline)
{
GstElement *src, *sink, *queue, *thread;
GstElement *src, *sink, *queue, *identity, *thread;
src = gst_element_factory_make ("fakesrc", "src");
sink = gst_element_factory_make ("fakesink", "sink");
queue = gst_element_factory_make ("queue", "queue");
thread = gst_element_factory_make ("thread", "thread");
src = gst_element_factory_make ("fakesrc", NULL);
sink = gst_element_factory_make ("fakesink", NULL);
identity = gst_element_factory_make ("identity", NULL);
queue = gst_element_factory_make ("queue", NULL);
thread = gst_element_factory_make ("thread", NULL);
gst_element_connect (src, "src", queue, "sink");
gst_element_connect (queue, "src", sink, "sink");
gst_element_connect_many (src, queue, identity, sink, NULL);
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), queue);
gst_bin_add (GST_BIN (pipeline), thread);
gst_bin_add (GST_BIN (thread), sink);
gst_bin_add_many (GST_BIN (pipeline), src, queue, thread, NULL);
gst_bin_add_many (GST_BIN (thread), identity, sink, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 5, NULL);
}
@ -75,10 +72,7 @@ main (gint argc, gchar *argv[])
gst_element_set_state (pipeline, GST_STATE_PAUSED);
g_print ("PLAYING\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_print ("PAUSED\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
g_print ("PLAYING\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* element likely hits EOS and does a state transition to PAUSED */
g_print ("READY\n");
gst_element_set_state (pipeline, GST_STATE_READY);
g_print ("NULL\n");
@ -112,7 +106,7 @@ main (gint argc, gchar *argv[])
sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
g_signal_connect (G_OBJECT (sink), "handoff", change_state, pipeline);
g_signal_connect (G_OBJECT (sink), "handoff", G_CALLBACK (change_state), pipeline);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_print ("running3 ...\n");
while (gst_bin_iterate (GST_BIN (pipeline)));

View file

@ -1,4 +1,4 @@
# FIXME : refcounting threads bytestream
# FIXME : threads bytestream
SUBDIRS = caps cleanup plugin elements clock refcounting ## dynparams
GST_PLUGIN_PATH = $(shell cd $(top_builddir) && pwd)
@ -14,8 +14,7 @@ check_PROGRAMS = $(testprogs)
LIBS = $(GST_LIBS)
CFLAGS = $(GST_CFLAGS)
# FIXME : refcounting threadds
DIST_SUBDIRS = bytestream caps cleanup clock dynparams elements \
plugin refcounting
plugin refcounting threads
EXTRA_DIST = gst-inspect-check

View file

@ -15,21 +15,18 @@ usage (void)
static void
construct_pipeline (GstElement *pipeline)
{
GstElement *src, *sink, *queue, *thread;
GstElement *src, *sink, *queue, *identity, *thread;
src = gst_element_factory_make ("fakesrc", "src");
sink = gst_element_factory_make ("fakesink", "sink");
queue = gst_element_factory_make ("queue", "queue");
thread = gst_element_factory_make ("thread", "thread");
src = gst_element_factory_make ("fakesrc", NULL);
sink = gst_element_factory_make ("fakesink", NULL);
identity = gst_element_factory_make ("identity", NULL);
queue = gst_element_factory_make ("queue", NULL);
thread = gst_element_factory_make ("thread", NULL);
gst_element_connect (src, "src", queue, "sink");
gst_element_connect (queue, "src", sink, "sink");
gst_element_connect_many (src, queue, identity, sink, NULL);
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), queue);
gst_bin_add (GST_BIN (pipeline), thread);
gst_bin_add (GST_BIN (thread), sink);
gst_bin_add_many (GST_BIN (pipeline), src, queue, thread, NULL);
gst_bin_add_many (GST_BIN (thread), identity, sink, NULL);
g_object_set (G_OBJECT (src), "num_buffers", 5, NULL);
}
@ -75,10 +72,7 @@ main (gint argc, gchar *argv[])
gst_element_set_state (pipeline, GST_STATE_PAUSED);
g_print ("PLAYING\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_print ("PAUSED\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
g_print ("PLAYING\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* element likely hits EOS and does a state transition to PAUSED */
g_print ("READY\n");
gst_element_set_state (pipeline, GST_STATE_READY);
g_print ("NULL\n");
@ -112,7 +106,7 @@ main (gint argc, gchar *argv[])
sink = gst_bin_get_by_name (GST_BIN (pipeline), "sink");
g_signal_connect (G_OBJECT (sink), "handoff", change_state, pipeline);
g_signal_connect (G_OBJECT (sink), "handoff", G_CALLBACK (change_state), pipeline);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
g_print ("running3 ...\n");
while (gst_bin_iterate (GST_BIN (pipeline)));