mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
fixing up tests
Original commit message from CVS: fixing up tests
This commit is contained in:
parent
4f9dad74fe
commit
2b51cbeebd
10 changed files with 54 additions and 60 deletions
|
@ -12,10 +12,9 @@ create_pipeline (void)
|
||||||
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
||||||
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", fakesink, "sink");
|
gst_element_connect (fakesrc, fakesink);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesink);
|
|
||||||
|
|
||||||
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
||||||
|
|
||||||
|
@ -26,17 +25,17 @@ gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gint i;
|
gint i = 10000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
i = 10000;
|
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
while (i--) {
|
while (i--) {
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "%10d\r", i);
|
||||||
pipeline = create_pipeline ();
|
pipeline = create_pipeline ();
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
@ -51,7 +50,6 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,9 @@ create_pipeline (void)
|
||||||
gst_bin_add (GST_BIN (bin), fakesink);
|
gst_bin_add (GST_BIN (bin), fakesink);
|
||||||
gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink");
|
gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", bin, "sink");
|
gst_element_connect (fakesrc, bin);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
|
||||||
gst_bin_add (GST_BIN (pipeline), bin);
|
|
||||||
|
|
||||||
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
||||||
|
|
||||||
|
@ -29,17 +28,18 @@ gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gint i;
|
gint i = 10000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
i = 10000;
|
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
while (i--) {
|
while (i--) {
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "%10d\r", i);
|
||||||
pipeline = create_pipeline ();
|
pipeline = create_pipeline ();
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
@ -54,9 +54,9 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
}
|
}
|
||||||
|
fprintf (stderr, "\n");
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -15,10 +15,10 @@ create_pipeline (void)
|
||||||
queue = gst_element_factory_make ("queue", "queue");
|
queue = gst_element_factory_make ("queue", "queue");
|
||||||
gst_bin_add (GST_BIN (thread), fakesink);
|
gst_bin_add (GST_BIN (thread), fakesink);
|
||||||
gst_bin_add (GST_BIN (thread), queue);
|
gst_bin_add (GST_BIN (thread), queue);
|
||||||
gst_element_connect (queue, "src", fakesink, "sink");
|
gst_element_connect (queue, fakesink);
|
||||||
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"), "sink");
|
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"), "sink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", thread, "sink");
|
gst_element_connect (fakesrc, thread);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
||||||
gst_bin_add (GST_BIN (pipeline), thread);
|
gst_bin_add (GST_BIN (pipeline), thread);
|
||||||
|
@ -32,17 +32,18 @@ gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gint i;
|
gint i = 10000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
i = 10000;
|
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
while (i--) {
|
while (i--) {
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "%10d\r", i);
|
||||||
pipeline = create_pipeline ();
|
pipeline = create_pipeline ();
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
@ -57,7 +58,6 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
}
|
}
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
static GstElement *
|
|
||||||
create_pipeline (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
|
@ -35,7 +30,7 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", fakesink, "sink");
|
gst_element_connect (fakesrc, fakesink);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (bin), fakesink);
|
gst_bin_add (GST_BIN (bin), fakesink);
|
||||||
gst_bin_add (GST_BIN (pipeline), bin);
|
gst_bin_add (GST_BIN (pipeline), bin);
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
GstElement *bin, *element;
|
GstElement *bin, *element;
|
||||||
gint i=1000000;
|
gint i = 100000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
|
@ -17,13 +19,14 @@ int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "\r%10d", i);
|
||||||
|
|
||||||
element = gst_element_factory_make ("tee", "tee");
|
element = gst_element_factory_make ("tee", "tee");
|
||||||
if (!element)
|
if (!element)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
pad = gst_element_request_pad_by_name (element, "src%d");
|
pad = gst_element_get_request_pad (element, "src%d");
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (bin), element);
|
gst_bin_add (GST_BIN (bin), element);
|
||||||
gst_bin_remove (GST_BIN (bin), element);
|
gst_bin_remove (GST_BIN (bin), element);
|
||||||
|
@ -34,4 +37,5 @@ int main(int argc,char *argv[])
|
||||||
gst_object_unref (GST_OBJECT (bin));
|
gst_object_unref (GST_OBJECT (bin));
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,9 @@ create_pipeline (void)
|
||||||
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
||||||
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", fakesink, "sink");
|
gst_element_connect (fakesrc, fakesink);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesink);
|
|
||||||
|
|
||||||
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
||||||
|
|
||||||
|
@ -26,17 +25,17 @@ gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gint i;
|
gint i = 10000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
i = 10000;
|
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
while (i--) {
|
while (i--) {
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "%10d\r", i);
|
||||||
pipeline = create_pipeline ();
|
pipeline = create_pipeline ();
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
@ -51,7 +50,6 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,9 @@ create_pipeline (void)
|
||||||
gst_bin_add (GST_BIN (bin), fakesink);
|
gst_bin_add (GST_BIN (bin), fakesink);
|
||||||
gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink");
|
gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", bin, "sink");
|
gst_element_connect (fakesrc, bin);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
|
||||||
gst_bin_add (GST_BIN (pipeline), bin);
|
|
||||||
|
|
||||||
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
|
||||||
|
|
||||||
|
@ -29,17 +28,18 @@ gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gint i;
|
gint i = 10000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
i = 10000;
|
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
while (i--) {
|
while (i--) {
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "%10d\r", i);
|
||||||
pipeline = create_pipeline ();
|
pipeline = create_pipeline ();
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
@ -54,9 +54,9 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
}
|
}
|
||||||
|
fprintf (stderr, "\n");
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -15,10 +15,10 @@ create_pipeline (void)
|
||||||
queue = gst_element_factory_make ("queue", "queue");
|
queue = gst_element_factory_make ("queue", "queue");
|
||||||
gst_bin_add (GST_BIN (thread), fakesink);
|
gst_bin_add (GST_BIN (thread), fakesink);
|
||||||
gst_bin_add (GST_BIN (thread), queue);
|
gst_bin_add (GST_BIN (thread), queue);
|
||||||
gst_element_connect (queue, "src", fakesink, "sink");
|
gst_element_connect (queue, fakesink);
|
||||||
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"), "sink");
|
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"), "sink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", thread, "sink");
|
gst_element_connect (fakesrc, thread);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
gst_bin_add (GST_BIN (pipeline), fakesrc);
|
||||||
gst_bin_add (GST_BIN (pipeline), thread);
|
gst_bin_add (GST_BIN (pipeline), thread);
|
||||||
|
@ -32,17 +32,18 @@ gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
GstElement *pipeline;
|
GstElement *pipeline;
|
||||||
gint i;
|
gint i = 10000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
i = 10000;
|
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
while (i--) {
|
while (i--) {
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "%10d\r", i);
|
||||||
pipeline = create_pipeline ();
|
pipeline = create_pipeline ();
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
|
@ -57,7 +58,6 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
fprintf (stderr, "-");
|
|
||||||
gst_object_unref (GST_OBJECT (pipeline));
|
gst_object_unref (GST_OBJECT (pipeline));
|
||||||
}
|
}
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
static GstElement *
|
|
||||||
create_pipeline (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
gint
|
gint
|
||||||
main (gint argc, gchar *argv[])
|
main (gint argc, gchar *argv[])
|
||||||
{
|
{
|
||||||
|
@ -35,7 +30,7 @@ main (gint argc, gchar *argv[])
|
||||||
|
|
||||||
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
||||||
|
|
||||||
gst_element_connect (fakesrc, "src", fakesink, "sink");
|
gst_element_connect (fakesrc, fakesink);
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (bin), fakesink);
|
gst_bin_add (GST_BIN (bin), fakesink);
|
||||||
gst_bin_add (GST_BIN (pipeline), bin);
|
gst_bin_add (GST_BIN (pipeline), bin);
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
GstElement *bin, *element;
|
GstElement *bin, *element;
|
||||||
gint i=1000000;
|
gint i = 100000;
|
||||||
|
gint step = 100;
|
||||||
|
|
||||||
|
|
||||||
free (malloc(8)); /* -lefence */
|
free (malloc(8)); /* -lefence */
|
||||||
|
|
||||||
|
@ -17,13 +19,14 @@ int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
fprintf (stderr, "+");
|
if (i % step == 0)
|
||||||
|
fprintf (stderr, "\r%10d", i);
|
||||||
|
|
||||||
element = gst_element_factory_make ("tee", "tee");
|
element = gst_element_factory_make ("tee", "tee");
|
||||||
if (!element)
|
if (!element)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
pad = gst_element_request_pad_by_name (element, "src%d");
|
pad = gst_element_get_request_pad (element, "src%d");
|
||||||
|
|
||||||
gst_bin_add (GST_BIN (bin), element);
|
gst_bin_add (GST_BIN (bin), element);
|
||||||
gst_bin_remove (GST_BIN (bin), element);
|
gst_bin_remove (GST_BIN (bin), element);
|
||||||
|
@ -34,4 +37,5 @@ int main(int argc,char *argv[])
|
||||||
gst_object_unref (GST_OBJECT (bin));
|
gst_object_unref (GST_OBJECT (bin));
|
||||||
|
|
||||||
g_mem_chunk_info ();
|
g_mem_chunk_info ();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue