blob: 3dcc4a574c7d86a5d896814cbc4b1c1a11b5d415 [file] [log] [blame]
/*** block a from ../../../docs/manual/basics-pads.xml ***/
#include <gst/gst.h>
int
main (int argc,
char *argv[])
{
GstElement *bin, *sink;
GstPad *pad;
/* init */
gst_init (&argc, &argv);
/* create element, add to bin */
sink = gst_element_factory_make ("fakesink", "sink");
bin = gst_bin_new ("mybin");
gst_bin_add (GST_BIN (bin), sink);
/* add ghostpad */
pad = gst_element_get_static_pad (sink, "sink");
gst_element_add_pad (bin, gst_ghost_pad_new ("sink", pad));
gst_object_unref (GST_OBJECT (pad));
/*** block b from ../../../docs/manual/basics-pads.xml ***/
return 0;
/*** block c from ../../../docs/manual/basics-pads.xml ***/
}