Branch data Line data Source code
1 : :
2 : : /*** block from ../../../docs/manual/basics-elements.xml ***/
3 : : #include <gst/gst.h>
4 : :
5 : : int
6 : 1 : main (int argc,
7 : : char *argv[])
8 : : {
9 : : GstElement *element;
10 : : gchar *name;
11 : :
12 : : /* init GStreamer */
13 : 1 : gst_init (&argc, &argv);
14 : :
15 : : /* create element */
16 : 1 : element = gst_element_factory_make ("fakesrc", "source");
17 : :
18 : : /* get name */
19 : 1 : g_object_get (G_OBJECT (element), "name", &name, NULL);
20 : 1 : g_print ("The name of the element is '%s'.\n", name);
21 : 1 : g_free (name);
22 : :
23 : 1 : gst_object_unref (GST_OBJECT (element));
24 : :
25 : 1 : return 0;
26 : : }
|