2002-01-27 19:24:23 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
int main(int argc,char *argv[])
|
|
|
|
{
|
2002-01-27 19:29:57 +00:00
|
|
|
GstElement *bin, *element;
|
2002-05-09 16:43:10 +00:00
|
|
|
gint i = 100000;
|
|
|
|
gint step = 100;
|
|
|
|
|
2002-01-27 19:24:23 +00:00
|
|
|
|
2002-01-27 22:10:10 +00:00
|
|
|
free (malloc(8)); /* -lefence */
|
|
|
|
|
2002-01-27 19:29:57 +00:00
|
|
|
gst_init (&argc, &argv);
|
2002-01-27 19:24:23 +00:00
|
|
|
|
2002-01-27 22:10:10 +00:00
|
|
|
g_mem_chunk_info ();
|
|
|
|
|
2002-01-27 19:29:57 +00:00
|
|
|
bin = gst_pipeline_new ("pipeline");
|
2002-01-27 19:24:23 +00:00
|
|
|
|
2002-01-27 19:29:57 +00:00
|
|
|
while (i--)
|
2002-01-27 19:24:23 +00:00
|
|
|
{
|
2002-05-08 20:40:48 +00:00
|
|
|
GstPad *pad;
|
|
|
|
|
2002-05-09 16:43:10 +00:00
|
|
|
if (i % step == 0)
|
|
|
|
fprintf (stderr, "\r%10d", i);
|
2002-01-27 22:10:10 +00:00
|
|
|
|
2002-04-11 20:35:18 +00:00
|
|
|
element = gst_element_factory_make ("tee", "tee");
|
2002-01-27 19:29:57 +00:00
|
|
|
if (!element)
|
2002-01-27 19:24:23 +00:00
|
|
|
break;
|
|
|
|
|
2002-05-09 16:43:10 +00:00
|
|
|
pad = gst_element_get_request_pad (element, "src%d");
|
2002-01-27 19:29:57 +00:00
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (bin), element);
|
|
|
|
gst_bin_remove (GST_BIN (bin), element);
|
2002-01-27 22:10:10 +00:00
|
|
|
|
2002-01-27 19:24:23 +00:00
|
|
|
}
|
2002-01-27 22:10:10 +00:00
|
|
|
fprintf (stderr, "+\n");
|
|
|
|
|
|
|
|
gst_object_unref (GST_OBJECT (bin));
|
|
|
|
|
|
|
|
g_mem_chunk_info ();
|
2002-05-09 16:43:10 +00:00
|
|
|
return 0;
|
2002-01-27 19:24:23 +00:00
|
|
|
}
|