fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
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 (GST_BIN (pipeline), fakesink);
+ gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
main (gint argc, gchar *argv[])
{
GstElement *pipeline;
- gint i;
+ gint i = 10000;
+ gint step = 100;
free (malloc(8)); /* -lefence */
gst_init (&argc, &argv);
- i = 10000;
-
g_mem_chunk_info ();
while (i--) {
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_NULL);
- fprintf (stderr, "-");
gst_object_unref (GST_OBJECT (pipeline));
}
gst_bin_add (GST_BIN (bin), fakesink);
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 (GST_BIN (pipeline), bin);
+ gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
main (gint argc, gchar *argv[])
{
GstElement *pipeline;
- gint i;
+ gint i = 10000;
+ gint step = 100;
free (malloc(8)); /* -lefence */
gst_init (&argc, &argv);
- i = 10000;
g_mem_chunk_info ();
while (i--) {
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_NULL);
- fprintf (stderr, "-");
gst_object_unref (GST_OBJECT (pipeline));
}
+ fprintf (stderr, "\n");
g_mem_chunk_info ();
return 0;
queue = gst_element_factory_make ("queue", "queue");
gst_bin_add (GST_BIN (thread), fakesink);
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_connect (fakesrc, "src", thread, "sink");
+ gst_element_connect (fakesrc, thread);
gst_bin_add (GST_BIN (pipeline), fakesrc);
gst_bin_add (GST_BIN (pipeline), thread);
main (gint argc, gchar *argv[])
{
GstElement *pipeline;
- gint i;
+ gint i = 10000;
+ gint step = 100;
free (malloc(8)); /* -lefence */
gst_init (&argc, &argv);
- i = 10000;
g_mem_chunk_info ();
while (i--) {
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_NULL);
- fprintf (stderr, "-");
gst_object_unref (GST_OBJECT (pipeline));
}
fprintf (stderr, "\n");
#include <gst/gst.h>
-static GstElement *
-create_pipeline (void)
-{
-}
-
gint
main (gint argc, gchar *argv[])
{
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 (pipeline), bin);
int main(int argc,char *argv[])
{
GstElement *bin, *element;
- gint i=1000000;
+ gint i = 100000;
+ gint step = 100;
+
free (malloc(8)); /* -lefence */
{
GstPad *pad;
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "\r%10d", i);
element = gst_element_factory_make ("tee", "tee");
if (!element)
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_remove (GST_BIN (bin), element);
gst_object_unref (GST_OBJECT (bin));
g_mem_chunk_info ();
+ return 0;
}
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
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 (GST_BIN (pipeline), fakesink);
+ gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
main (gint argc, gchar *argv[])
{
GstElement *pipeline;
- gint i;
+ gint i = 10000;
+ gint step = 100;
free (malloc(8)); /* -lefence */
gst_init (&argc, &argv);
- i = 10000;
-
g_mem_chunk_info ();
while (i--) {
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_NULL);
- fprintf (stderr, "-");
gst_object_unref (GST_OBJECT (pipeline));
}
gst_bin_add (GST_BIN (bin), fakesink);
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 (GST_BIN (pipeline), bin);
+ gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
main (gint argc, gchar *argv[])
{
GstElement *pipeline;
- gint i;
+ gint i = 10000;
+ gint step = 100;
free (malloc(8)); /* -lefence */
gst_init (&argc, &argv);
- i = 10000;
g_mem_chunk_info ();
while (i--) {
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_NULL);
- fprintf (stderr, "-");
gst_object_unref (GST_OBJECT (pipeline));
}
+ fprintf (stderr, "\n");
g_mem_chunk_info ();
return 0;
queue = gst_element_factory_make ("queue", "queue");
gst_bin_add (GST_BIN (thread), fakesink);
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_connect (fakesrc, "src", thread, "sink");
+ gst_element_connect (fakesrc, thread);
gst_bin_add (GST_BIN (pipeline), fakesrc);
gst_bin_add (GST_BIN (pipeline), thread);
main (gint argc, gchar *argv[])
{
GstElement *pipeline;
- gint i;
+ gint i = 10000;
+ gint step = 100;
free (malloc(8)); /* -lefence */
gst_init (&argc, &argv);
- i = 10000;
g_mem_chunk_info ();
while (i--) {
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "%10d\r", i);
pipeline = create_pipeline ();
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_element_set_state (pipeline, GST_STATE_NULL);
- fprintf (stderr, "-");
gst_object_unref (GST_OBJECT (pipeline));
}
fprintf (stderr, "\n");
#include <gst/gst.h>
-static GstElement *
-create_pipeline (void)
-{
-}
-
gint
main (gint argc, gchar *argv[])
{
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 (pipeline), bin);
int main(int argc,char *argv[])
{
GstElement *bin, *element;
- gint i=1000000;
+ gint i = 100000;
+ gint step = 100;
+
free (malloc(8)); /* -lefence */
{
GstPad *pad;
- fprintf (stderr, "+");
+ if (i % step == 0)
+ fprintf (stderr, "\r%10d", i);
element = gst_element_factory_make ("tee", "tee");
if (!element)
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_remove (GST_BIN (bin), element);
gst_object_unref (GST_OBJECT (bin));
g_mem_chunk_info ();
+ return 0;
}