sinkpad = gst_element_get_pad (sink, "sink");
g_return_val_if_fail (srcpad != NULL, -1);
- g_print ("--- connecting\n");
- gst_pad_connect (srcpad, sinkpad);
+ g_print ("--- linking\n");
+ gst_pad_link (srcpad, sinkpad);
g_print ("--- setting up\n");
gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
gst_bin_add(GST_BIN(thread), osssink);
- gst_pad_connect(gst_element_get_pad(queue,"src"),
- gst_element_get_pad(osssink,"sink"));
+ gst_pad_link(gst_element_get_pad(queue,"src"),
+ gst_element_get_pad(osssink,"sink"));
if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) {
g_print("cannot autoplug pipeline\n");
sinkpad = gst_element_get_pad (sink, "sink");
g_return_val_if_fail (srcpad != NULL, -1);
- g_print ("--- connecting\n");
- gst_pad_connect (srcpad, sinkpad);
+ g_print ("--- linking\n");
+ gst_pad_link (srcpad, sinkpad);
g_print ("--- setting up\n");
gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
gst_bin_add(GST_BIN(thread), osssink);
- gst_pad_connect(gst_element_get_pad(queue,"src"),
- gst_element_get_pad(osssink,"sink"));
+ gst_pad_link(gst_element_get_pad(queue,"src"),
+ gst_element_get_pad(osssink,"sink"));
if (!gst_pipeline_autoplug(GST_PIPELINE(pipeline))) {
g_print("cannot autoplug pipeline\n");
}
-static GstPadConnectReturn
+static GstPadLinkReturn
gst_bstest_negotiate_src (GstPad * pad, GstCaps ** caps, gpointer * data)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
/* thomas: I was trying to fix this old test, one of these two pads
* needs to be dropped according to the new api, which one ? */
- return gst_pad_proxy_connect (pad, bstest->sinkpad, caps);
+ return gst_pad_proxy_link (pad, bstest->sinkpad, caps);
}
-static GstPadConnectReturn
+static GstPadLinkReturn
gst_bstest_negotiate_sink (GstPad * pad, GstCaps ** caps, gpointer * data)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
bs = gst_element_factory_make ("bstest", "bs");
g_assert (bs);
- gst_element_connect_many (src, bs, sink);
+ gst_element_link_many (src, bs, sink);
gst_bin_add_many (GST_BIN (pipeline), src, bs, sink);
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
fakesink = gst_element_factory_make ("fakesink", "fakesink");
- gst_element_connect (fakesrc, fakesink);
+ gst_element_link (fakesrc, fakesink);
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
gst_bin_add (GST_BIN (bin), fakesink);
gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink");
- gst_element_connect (fakesrc, bin);
+ gst_element_link (fakesrc, bin);
gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
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, fakesink);
+ gst_element_link (queue, fakesink);
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"), "sink");
- gst_element_connect (fakesrc, thread);
+ gst_element_link (fakesrc, thread);
gst_bin_add (GST_BIN (pipeline), fakesrc);
gst_bin_add (GST_BIN (pipeline), thread);
fakesink = gst_element_factory_make ("fakesink", "fakesink");
- gst_element_connect (fakesrc, fakesink);
+ gst_element_link (fakesrc, fakesink);
gst_bin_add (GST_BIN (bin), fakesink);
gst_bin_add (GST_BIN (pipeline), bin);
return 1;
}
- gst_element_connect_many (src, id, sink, NULL);
+ gst_element_link_many (src, id, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL);
clock = gst_bin_get_clock (GST_BIN (pipeline));
testelement = gst_element_factory_make ("dptest", "testelement");
g_assert (testelement);
- gst_element_connect (src, testelement);
- gst_element_connect (testelement, sink);
+ gst_element_link (src, testelement);
+ gst_element_link (testelement, sink);
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), testelement);
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), sink);
- /* connect */
- g_print ("Connecting elements\n");
+ /* link */
+ g_print ("Linking elements\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* we expect this to give an error */
if (gst_bin_iterate (GST_BIN (pipeline)) != FALSE)
{
- g_warning ("Iterating a bin with unconnected elements should return FALSE !\n");
+ g_warning ("Iterating a bin with unlinked elements should return FALSE !\n");
retval = 1;
}
/* we expect this to work */
if (gst_bin_iterate (GST_BIN (pipeline)) != TRUE)
{
- g_error ("Iterating a bin with connected elements should return TRUE !\n");
+ g_error ("Iterating a bin with linked elements should return TRUE !\n");
retval = 1;
}
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), tee);
- /* connect input part */
- g_print ("Connecting input elements\n");
- gst_pad_connect (gst_element_get_pad (src, "src"),
- gst_element_get_pad (tee, "sink"));
+ /* link input part */
+ g_print ("Linking input elements\n");
+ gst_pad_link (gst_element_get_pad (src, "src"),
+ gst_element_get_pad (tee, "sink"));
/* request one pad from tee */
g_print ("Requesting first pad\n");
tee_src1 = gst_element_get_request_pad (tee, "src%d");
gst_bin_add (GST_BIN (pipeline), sink1);
- gst_pad_connect (tee_src1, gst_element_get_pad (sink1, "sink"));
+ gst_pad_link (tee_src1, gst_element_get_pad (sink1, "sink"));
/* set to play */
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
tee_src2 = gst_element_get_request_pad (tee, "src%d");
gst_bin_add (GST_BIN (pipeline), sink2);
- gst_pad_connect (tee_src2, gst_element_get_pad (sink2, "sink"));
+ gst_pad_link (tee_src2, gst_element_get_pad (sink2, "sink"));
- /* now we have two fakesinks connected, iterate */
+ /* now we have two fakesinks linked, iterate */
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipeline));
/* remove the first one, iterate */
g_print ("Removing first sink\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
- gst_pad_disconnect (tee_src1, gst_element_get_pad (sink1, "sink"));
+ gst_pad_unlink (tee_src1, gst_element_get_pad (sink1, "sink"));
gst_pad_destroy (tee_src1);
gst_bin_remove (GST_BIN (pipeline), sink1);
- /* only second fakesink connected, iterate */
+ /* only second fakesink linked, iterate */
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipeline));
gst_bin_add (GST_BIN (bin), element1);
element2 = gst_element_factory_make ("fakesink", NULL);
gst_bin_add (GST_BIN (bin), element2);
- gst_element_connect_pads (element1, "src", element2, "sink");
+ gst_element_link_pads (element1, "src", element2, "sink");
gst_element_add_ghost_pad (bin, gst_element_get_pad (element1, "sink"), "ghost_sink");
return bin;
for (i=0; i<iters/2; i++) {
element = gst_element_factory_make ("fakesink", NULL);
element2 = gst_element_factory_make ("fakesrc", NULL);
- gst_element_connect_pads (element, "sink", element2, "src");
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element, "sink")));
+ gst_element_link_pads (element, "sink", element2, "src");
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element, "sink")));
gst_object_unref (GST_OBJECT (element));
- g_assert (!GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
+ g_assert (!GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
gst_object_unref (GST_OBJECT (element2));
}
- g_print ("create/connect/unref %d elements %ld\n", iters/2, vmsize()-usage1);
+ g_print ("create/link/unref %d elements %ld\n", iters/2, vmsize()-usage1);
for (i=0; i<iters/2; i++) {
element = gst_element_factory_make ("fakesink", NULL);
element2 = gst_element_factory_make ("fakesrc", NULL);
- gst_element_connect_pads (element, "sink", element2, "src");
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element, "sink")));
+ gst_element_link_pads (element, "sink", element2, "src");
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element, "sink")));
gst_object_destroy (GST_OBJECT (element));
g_assert (GST_OBJECT_DESTROYED (element));
- g_assert (!GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
+ g_assert (!GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
gst_object_unref (GST_OBJECT (element2));
gst_object_unref (GST_OBJECT (element));
}
- g_print ("create/connect/destroy %d elements %ld\n", iters/2, vmsize()-usage1);
+ g_print ("create/link/destroy %d elements %ld\n", iters/2, vmsize()-usage1);
element = gst_element_factory_make ("fakesink", NULL);;
pad = gst_element_get_pad (element, "sink");
gst_element_set_name (element2, "test2");
gst_element_add_pad (element2, gst_pad_new ("sink1", GST_PAD_SINK));
gst_bin_add (GST_BIN (thread), element2);
- gst_element_connect (element1, "src1", element2, "sink1");
+ gst_element_link (element1, "src1", element2, "sink1");
gst_element_add_ghost_pad (thread, gst_element_get_pad (element2, "sink1"), "sink1");
return thread;
queue = gst_element_factory_make ("queue", NULL);
thread = gst_element_factory_make ("thread", NULL);
- gst_element_connect_many (src, queue, identity, sink, NULL);
+ gst_element_link_many (src, queue, identity, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, queue, thread, NULL);
gst_bin_add_many (GST_BIN (thread), identity, sink, NULL);
g_assert (identity);
g_assert (sink);
- gst_element_connect_many (src, identity, sink, NULL);
+ gst_element_link_many (src, identity, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, identity, sink, NULL);
}
-static GstPadConnectReturn
+static GstPadLinkReturn
gst_bstest_negotiate_src (GstPad * pad, GstCaps ** caps, gpointer * data)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
/* thomas: I was trying to fix this old test, one of these two pads
* needs to be dropped according to the new api, which one ? */
- return gst_pad_proxy_connect (pad, bstest->sinkpad, caps);
+ return gst_pad_proxy_link (pad, bstest->sinkpad, caps);
}
-static GstPadConnectReturn
+static GstPadLinkReturn
gst_bstest_negotiate_sink (GstPad * pad, GstCaps ** caps, gpointer * data)
{
GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
bs = gst_element_factory_make ("bstest", "bs");
g_assert (bs);
- gst_element_connect_many (src, bs, sink);
+ gst_element_link_many (src, bs, sink);
gst_bin_add_many (GST_BIN (pipeline), src, bs, sink);
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
fakesink = gst_element_factory_make ("fakesink", "fakesink");
- gst_element_connect (fakesrc, fakesink);
+ gst_element_link (fakesrc, fakesink);
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
gst_bin_add (GST_BIN (bin), fakesink);
gst_element_add_ghost_pad (bin, gst_element_get_pad (fakesink, "sink"), "sink");
- gst_element_connect (fakesrc, bin);
+ gst_element_link (fakesrc, bin);
gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, NULL);
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, fakesink);
+ gst_element_link (queue, fakesink);
gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"), "sink");
- gst_element_connect (fakesrc, thread);
+ gst_element_link (fakesrc, thread);
gst_bin_add (GST_BIN (pipeline), fakesrc);
gst_bin_add (GST_BIN (pipeline), thread);
fakesink = gst_element_factory_make ("fakesink", "fakesink");
- gst_element_connect (fakesrc, fakesink);
+ gst_element_link (fakesrc, fakesink);
gst_bin_add (GST_BIN (bin), fakesink);
gst_bin_add (GST_BIN (pipeline), bin);
return 1;
}
- gst_element_connect_many (src, id, sink, NULL);
+ gst_element_link_many (src, id, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL);
clock = gst_bin_get_clock (GST_BIN (pipeline));
testelement = gst_element_factory_make ("dptest", "testelement");
g_assert (testelement);
- gst_element_connect (src, testelement);
- gst_element_connect (testelement, sink);
+ gst_element_link (src, testelement);
+ gst_element_link (testelement, sink);
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), testelement);
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), sink);
- /* connect */
- g_print ("Connecting elements\n");
+ /* link */
+ g_print ("Linking elements\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
/* we expect this to give an error */
if (gst_bin_iterate (GST_BIN (pipeline)) != FALSE)
{
- g_warning ("Iterating a bin with unconnected elements should return FALSE !\n");
+ g_warning ("Iterating a bin with unlinked elements should return FALSE !\n");
retval = 1;
}
/* we expect this to work */
if (gst_bin_iterate (GST_BIN (pipeline)) != TRUE)
{
- g_error ("Iterating a bin with connected elements should return TRUE !\n");
+ g_error ("Iterating a bin with linked elements should return TRUE !\n");
retval = 1;
}
gst_bin_add (GST_BIN (pipeline), src);
gst_bin_add (GST_BIN (pipeline), tee);
- /* connect input part */
- g_print ("Connecting input elements\n");
- gst_pad_connect (gst_element_get_pad (src, "src"),
- gst_element_get_pad (tee, "sink"));
+ /* link input part */
+ g_print ("Linking input elements\n");
+ gst_pad_link (gst_element_get_pad (src, "src"),
+ gst_element_get_pad (tee, "sink"));
/* request one pad from tee */
g_print ("Requesting first pad\n");
tee_src1 = gst_element_get_request_pad (tee, "src%d");
gst_bin_add (GST_BIN (pipeline), sink1);
- gst_pad_connect (tee_src1, gst_element_get_pad (sink1, "sink"));
+ gst_pad_link (tee_src1, gst_element_get_pad (sink1, "sink"));
/* set to play */
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
tee_src2 = gst_element_get_request_pad (tee, "src%d");
gst_bin_add (GST_BIN (pipeline), sink2);
- gst_pad_connect (tee_src2, gst_element_get_pad (sink2, "sink"));
+ gst_pad_link (tee_src2, gst_element_get_pad (sink2, "sink"));
- /* now we have two fakesinks connected, iterate */
+ /* now we have two fakesinks linked, iterate */
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipeline));
/* remove the first one, iterate */
g_print ("Removing first sink\n");
gst_element_set_state (pipeline, GST_STATE_PAUSED);
- gst_pad_disconnect (tee_src1, gst_element_get_pad (sink1, "sink"));
+ gst_pad_unlink (tee_src1, gst_element_get_pad (sink1, "sink"));
gst_pad_destroy (tee_src1);
gst_bin_remove (GST_BIN (pipeline), sink1);
- /* only second fakesink connected, iterate */
+ /* only second fakesink linked, iterate */
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipeline));
gst_bin_add (GST_BIN (bin), element1);
element2 = gst_element_factory_make ("fakesink", NULL);
gst_bin_add (GST_BIN (bin), element2);
- gst_element_connect_pads (element1, "src", element2, "sink");
+ gst_element_link_pads (element1, "src", element2, "sink");
gst_element_add_ghost_pad (bin, gst_element_get_pad (element1, "sink"), "ghost_sink");
return bin;
for (i=0; i<iters/2; i++) {
element = gst_element_factory_make ("fakesink", NULL);
element2 = gst_element_factory_make ("fakesrc", NULL);
- gst_element_connect_pads (element, "sink", element2, "src");
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element, "sink")));
+ gst_element_link_pads (element, "sink", element2, "src");
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element, "sink")));
gst_object_unref (GST_OBJECT (element));
- g_assert (!GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
+ g_assert (!GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
gst_object_unref (GST_OBJECT (element2));
}
- g_print ("create/connect/unref %d elements %ld\n", iters/2, vmsize()-usage1);
+ g_print ("create/link/unref %d elements %ld\n", iters/2, vmsize()-usage1);
for (i=0; i<iters/2; i++) {
element = gst_element_factory_make ("fakesink", NULL);
element2 = gst_element_factory_make ("fakesrc", NULL);
- gst_element_connect_pads (element, "sink", element2, "src");
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
- g_assert (GST_PAD_IS_CONNECTED (gst_element_get_pad (element, "sink")));
+ gst_element_link_pads (element, "sink", element2, "src");
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
+ g_assert (GST_PAD_IS_LINKED (gst_element_get_pad (element, "sink")));
gst_object_destroy (GST_OBJECT (element));
g_assert (GST_OBJECT_DESTROYED (element));
- g_assert (!GST_PAD_IS_CONNECTED (gst_element_get_pad (element2, "src")));
+ g_assert (!GST_PAD_IS_LINKED (gst_element_get_pad (element2, "src")));
gst_object_unref (GST_OBJECT (element2));
gst_object_unref (GST_OBJECT (element));
}
- g_print ("create/connect/destroy %d elements %ld\n", iters/2, vmsize()-usage1);
+ g_print ("create/link/destroy %d elements %ld\n", iters/2, vmsize()-usage1);
element = gst_element_factory_make ("fakesink", NULL);;
pad = gst_element_get_pad (element, "sink");
gst_element_set_name (element2, "test2");
gst_element_add_pad (element2, gst_pad_new ("sink1", GST_PAD_SINK));
gst_bin_add (GST_BIN (thread), element2);
- gst_element_connect (element1, "src1", element2, "sink1");
+ gst_element_link (element1, "src1", element2, "sink1");
gst_element_add_ghost_pad (thread, gst_element_get_pad (element2, "sink1"), "sink1");
return thread;
queue = gst_element_factory_make ("queue", NULL);
thread = gst_element_factory_make ("thread", NULL);
- gst_element_connect_many (src, queue, identity, sink, NULL);
+ gst_element_link_many (src, queue, identity, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, queue, thread, NULL);
gst_bin_add_many (GST_BIN (thread), identity, sink, NULL);
g_assert (identity);
g_assert (sink);
- gst_element_connect_many (src, identity, sink, NULL);
+ gst_element_link_many (src, identity, sink, NULL);
gst_bin_add_many (GST_BIN (pipeline), src, identity, sink, NULL);