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