mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-22 12:00:11 +00:00
random cleanups and paranoia checks
Original commit message from CVS: random cleanups and paranoia checks
This commit is contained in:
parent
f6f841cbb8
commit
35387bca47
9 changed files with 28 additions and 23 deletions
|
@ -4,7 +4,7 @@ else
|
||||||
GNOME=
|
GNOME=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXAMPLES = dynamic $(GNOME) helloworld helloworld2 queue xml-mp3
|
EXAMPLES = dynamic $(GNOME) helloworld helloworld2 queue threads xml-mp3
|
||||||
noinst_PROGRAMS = $(EXAMPLES)
|
noinst_PROGRAMS = $(EXAMPLES)
|
||||||
|
|
||||||
LDADD = $(GST_LIBS)
|
LDADD = $(GST_LIBS)
|
||||||
|
@ -23,5 +23,5 @@ EXTRA_DIST = extract.pl
|
||||||
# also, it's a bit irritating that right now a change in any xml file
|
# also, it's a bit irritating that right now a change in any xml file
|
||||||
# triggers a rebuild of all examples
|
# triggers a rebuild of all examples
|
||||||
#%.c:
|
#%.c:
|
||||||
dynamic.c gnome.c helloworld.c helloworld2.c queue.c xml-mp3.c: $(top_srcdir)/docs/manual/*.xml
|
dynamic.c gnome.c helloworld.c helloworld2.c queue.c threads.c xml-mp3.c: $(top_srcdir)/docs/manual/*.xml
|
||||||
$(srcdir)/extract.pl $@ $(top_srcdir)/docs/manual/*.xml
|
$(srcdir)/extract.pl $@ $(top_srcdir)/docs/manual/*.xml
|
||||||
|
|
|
@ -296,7 +296,10 @@ cothread_free (cothread_state *cothread)
|
||||||
cothread->cothreadnum);
|
cothread->cothreadnum);
|
||||||
|
|
||||||
/* we simply flag the cothread for destruction here */
|
/* we simply flag the cothread for destruction here */
|
||||||
|
if (cothread)
|
||||||
cothread->flags |= COTHREAD_DESTROYED;
|
cothread->flags |= COTHREAD_DESTROYED;
|
||||||
|
else
|
||||||
|
g_warning ("somebody set up us the bomb");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -4,7 +4,7 @@ else
|
||||||
GNOME=
|
GNOME=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXAMPLES = dynamic $(GNOME) helloworld helloworld2 queue xml-mp3
|
EXAMPLES = dynamic $(GNOME) helloworld helloworld2 queue threads xml-mp3
|
||||||
noinst_PROGRAMS = $(EXAMPLES)
|
noinst_PROGRAMS = $(EXAMPLES)
|
||||||
|
|
||||||
LDADD = $(GST_LIBS)
|
LDADD = $(GST_LIBS)
|
||||||
|
@ -23,5 +23,5 @@ EXTRA_DIST = extract.pl
|
||||||
# also, it's a bit irritating that right now a change in any xml file
|
# also, it's a bit irritating that right now a change in any xml file
|
||||||
# triggers a rebuild of all examples
|
# triggers a rebuild of all examples
|
||||||
#%.c:
|
#%.c:
|
||||||
dynamic.c gnome.c helloworld.c helloworld2.c queue.c xml-mp3.c: $(top_srcdir)/docs/manual/*.xml
|
dynamic.c gnome.c helloworld.c helloworld2.c queue.c threads.c xml-mp3.c: $(top_srcdir)/docs/manual/*.xml
|
||||||
$(srcdir)/extract.pl $@ $(top_srcdir)/docs/manual/*.xml
|
$(srcdir)/extract.pl $@ $(top_srcdir)/docs/manual/*.xml
|
||||||
|
|
|
@ -24,7 +24,7 @@ main (gint argc, gchar *argv[])
|
||||||
GstElement *bin;
|
GstElement *bin;
|
||||||
GstElement *fakesink;
|
GstElement *fakesink;
|
||||||
|
|
||||||
fprintf (stderr, "+");
|
g_print ("+");
|
||||||
|
|
||||||
bin = gst_bin_new ("bin");
|
bin = gst_bin_new ("bin");
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
g_print ("-");
|
||||||
gst_bin_remove (GST_BIN (pipeline), GST_ELEMENT (bin));
|
gst_bin_remove (GST_BIN (pipeline), GST_ELEMENT (bin));
|
||||||
|
|
||||||
}
|
}
|
||||||
fprintf (stderr, "\n");
|
g_print ("\n");
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -31,7 +31,7 @@ construct_pipeline (GstElement *pipeline, gint identities)
|
||||||
}
|
}
|
||||||
gst_element_connect (identity, sink);
|
gst_element_connect (identity, sink);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "num_buffers", 10, "sizetype", 3, NULL);
|
g_object_set (G_OBJECT (src), "num_buffers", 2, "sizetype", 3, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -56,7 +56,7 @@ state_changed (GstElement *el, gint arg1, gint arg2, gpointer user_data)
|
||||||
int
|
int
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
int runs = 130;
|
int runs = 290;
|
||||||
int i;
|
int i;
|
||||||
gulong id;
|
gulong id;
|
||||||
GstElement *thread;
|
GstElement *thread;
|
||||||
|
@ -74,7 +74,8 @@ main (gint argc, gchar *argv[])
|
||||||
construct_pipeline (thread, i / 10 + 1);
|
construct_pipeline (thread, i / 10 + 1);
|
||||||
|
|
||||||
g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
|
g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
|
||||||
gst_element_set_state (thread, GST_STATE_PLAYING);
|
if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE)
|
||||||
|
g_error ("Failed setting thread to play\n");
|
||||||
|
|
||||||
g_print ("Going into the main GStreamer loop\n");
|
g_print ("Going into the main GStreamer loop\n");
|
||||||
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
||||||
|
|
|
@ -48,7 +48,7 @@ thread (void)
|
||||||
int i;
|
int i;
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
|
|
||||||
for (i = 0; i < runs; ++i)
|
for (i = 50; i < runs; ++i)
|
||||||
{
|
{
|
||||||
pipeline = gst_pipeline_new ("main_pipeline");
|
pipeline = gst_pipeline_new ("main_pipeline");
|
||||||
g_assert (pipeline);
|
g_assert (pipeline);
|
||||||
|
|
|
@ -24,7 +24,7 @@ main (gint argc, gchar *argv[])
|
||||||
GstElement *bin;
|
GstElement *bin;
|
||||||
GstElement *fakesink;
|
GstElement *fakesink;
|
||||||
|
|
||||||
fprintf (stderr, "+");
|
g_print ("+");
|
||||||
|
|
||||||
bin = gst_bin_new ("bin");
|
bin = gst_bin_new ("bin");
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
g_print ("-");
|
||||||
gst_bin_remove (GST_BIN (pipeline), GST_ELEMENT (bin));
|
gst_bin_remove (GST_BIN (pipeline), GST_ELEMENT (bin));
|
||||||
|
|
||||||
}
|
}
|
||||||
fprintf (stderr, "\n");
|
g_print ("\n");
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -31,7 +31,7 @@ construct_pipeline (GstElement *pipeline, gint identities)
|
||||||
}
|
}
|
||||||
gst_element_connect (identity, sink);
|
gst_element_connect (identity, sink);
|
||||||
|
|
||||||
g_object_set (G_OBJECT (src), "num_buffers", 10, "sizetype", 3, NULL);
|
g_object_set (G_OBJECT (src), "num_buffers", 2, "sizetype", 3, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -56,7 +56,7 @@ state_changed (GstElement *el, gint arg1, gint arg2, gpointer user_data)
|
||||||
int
|
int
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
int runs = 130;
|
int runs = 290;
|
||||||
int i;
|
int i;
|
||||||
gulong id;
|
gulong id;
|
||||||
GstElement *thread;
|
GstElement *thread;
|
||||||
|
@ -74,7 +74,8 @@ main (gint argc, gchar *argv[])
|
||||||
construct_pipeline (thread, i / 10 + 1);
|
construct_pipeline (thread, i / 10 + 1);
|
||||||
|
|
||||||
g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
|
g_print ("Setting thread to play with %d identities\n", i / 10 + 1);
|
||||||
gst_element_set_state (thread, GST_STATE_PLAYING);
|
if (gst_element_set_state (thread, GST_STATE_PLAYING) == GST_STATE_FAILURE)
|
||||||
|
g_error ("Failed setting thread to play\n");
|
||||||
|
|
||||||
g_print ("Going into the main GStreamer loop\n");
|
g_print ("Going into the main GStreamer loop\n");
|
||||||
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
can_quit = TRUE; /* we don't want gst_main_quit called before gst_main */
|
||||||
|
|
|
@ -48,7 +48,7 @@ thread (void)
|
||||||
int i;
|
int i;
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
|
|
||||||
for (i = 0; i < runs; ++i)
|
for (i = 50; i < runs; ++i)
|
||||||
{
|
{
|
||||||
pipeline = gst_pipeline_new ("main_pipeline");
|
pipeline = gst_pipeline_new ("main_pipeline");
|
||||||
g_assert (pipeline);
|
g_assert (pipeline);
|
||||||
|
|
Loading…
Reference in a new issue