index 4050326df15c442f2a8c9833bfe95ecd3f49fb18..7d87782c6159e7974fe4f13222dbc29d23f0de7a 100644 (file)
#include <gst/gst.h>
gint
-main (gint argc, gchar *argv[])
+main (gint argc, gchar * argv[])
{
GstElement *pipeline, *bin;
GstElement *fakesrc, *fakesink, *identity;
- GstPad *sink, *src, *real = (GstPad*)0xdeadbeef;
+ GstPad *sink, *src, *real = (GstPad *) 0xdeadbeef;
gst_init (&argc, &argv);
fakesrc = gst_element_factory_make ("fakesrc", NULL);
fakesink = gst_element_factory_make ("fakesink", NULL);
identity = gst_element_factory_make ("identity", NULL);
-
+
gst_bin_add_many (GST_BIN (pipeline), fakesrc, bin, fakesink, NULL);
gst_bin_add (GST_BIN (bin), identity);
-
+
sink = gst_element_add_ghost_pad (bin,
- gst_element_get_pad (identity, "sink"),
- "sink");
+ gst_element_get_pad (identity, "sink"), "sink");
src = gst_element_add_ghost_pad (bin,
- gst_element_get_pad (identity, "src"),
- "src");
+ gst_element_get_pad (identity, "src"), "src");
gst_element_link_many (fakesrc, bin, fakesink, NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
+
if (!gst_bin_iterate (GST_BIN (pipeline)))
g_assert_not_reached ();
-
+
gst_element_set_state (pipeline, GST_STATE_NULL);
/* test the cleanup */
gst_object_ref (GST_OBJECT (sink));
- gst_object_unref ((GstObject*)pipeline);
+ gst_object_unref ((GstObject *) pipeline);
g_object_get (sink, "real-pad", &real, NULL);
g_assert (real == NULL);
g_assert (G_OBJECT (sink)->ref_count == 1);
gst_object_unref (GST_OBJECT (sink));
-
+
return 0;
}