Initialize Tizen 2.3
[framework/multimedia/gstreamer0.10.git] / mobile / tests / examples / manual / bin.c
1
2 /*** block a  from ../../../docs/manual/basics-bins.xml ***/
3 #include <gst/gst.h>
4
5 int
6 main (int   argc,
7       char *argv[])
8 {
9   GstElement *bin, *pipeline, *source, *sink;
10
11   /* init */
12   gst_init (&argc, &argv);
13
14   /* create */
15   pipeline = gst_pipeline_new ("my_pipeline");
16   bin = gst_bin_new ("my_bin");
17   source = gst_element_factory_make ("fakesrc", "source");
18   sink = gst_element_factory_make ("fakesink", "sink");
19
20   /* First add the elements to the bin */
21   gst_bin_add_many (GST_BIN (bin), source, sink, NULL);
22   /* add the bin to the pipeline */
23   gst_bin_add (GST_BIN (pipeline), bin);
24
25   /* link the elements */
26   gst_element_link (source, sink);
27
28 /*** block b  from ../../../docs/manual/basics-bins.xml ***/
29   return 0;
30
31 /*** block c  from ../../../docs/manual/basics-bins.xml ***/
32 }