Added docs on library init.
authorWim Taymans <wim.taymans@gmail.com>
Sat, 7 Jul 2001 15:10:29 +0000 (15:10 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 7 Jul 2001 15:10:29 +0000 (15:10 +0000)
Original commit message from CVS:
Added docs on library init.

docs/manual/gstreamer-manual.sgml
docs/manual/init.sgml [new file with mode: 0644]
docs/manual/utility.sgml

index 7c718c1..43e6c9a 100644 (file)
@@ -3,6 +3,7 @@
 <!ENTITY MOTIVATION SYSTEM "motivation.sgml">
 <!ENTITY GOALS SYSTEM "goals.sgml">
 
+<!ENTITY INIT SYSTEM "init.sgml">
 <!ENTITY ELEMENTS SYSTEM "elements.sgml">
 <!ENTITY PADS SYSTEM "pads.sgml">
 <!ENTITY CONNECTIONS SYSTEM "connections.sgml">
@@ -98,6 +99,8 @@
     </partintro>
 
 <!-- ############ Basic concepts - chapter ############# -->
+      &INIT;
+
       &ELEMENTS;
 
       &PLUGINS;
diff --git a/docs/manual/init.sgml b/docs/manual/init.sgml
new file mode 100644 (file)
index 0000000..985dcc2
--- /dev/null
@@ -0,0 +1,38 @@
+<chapter id="cha-initialisation">
+  <title>Initializing <application>GStreamer</application></title>
+  <para> 
+    When writing a <application>GStreamer</application> application, you can
+    simply include gst/gst.h to get access to the library functions.
+  </para> 
+  <para> 
+    Before the <application>GStreamer</application> libraries can be used
+    gst_init () has to be performed from the main app. this call will perform
+    first initialisation and will parse the GStreamer specific command line 
+    options. 
+  </para>
+  <para> 
+    A typical program would start like this:
+  </para>
+
+  <programlisting>
+#include &lt;gst/gst.h&gt;
+
+...
+
+int
+main (int argc, char *argv[])
+{
+  ...
+  gst_init (&amp;argc, &amp;argv);
+  ...
+}
+  </programlisting>
+  <para>
+    It is also possible to call the gst_init method with two NULL argumants.
+  </para>
+  <para> 
+    Use the GST_VERSION_MAJOR, GST_VERSION_MINOR and GST_VERSION_MICRO macros to
+    get the <application>GStreamer</application> version you are building against.
+  </para>
+
+</chapter>
index ca5a39b..85b304e 100644 (file)
     </itemizedlist>
   </para> 
   <para> 
+    One usually sets object properties using g_object_set (). The problem with this
+    method is that you need to know the type of the property. A convenience function,
+    gst_utils_set_object_arg () is therefore provided so that you can always set 
+    the property with a string value. for example:
+  </para>
+  <programlisting>
+  gst_util_set_object_arg (someobject, "int_property", "1000");
+  </programlisting>
+  <para>
+    Will do The Right Thing(tm), converting the string to the type of the property when
+    needed.
+  </para>
+
+  <para> 
     There is also another utility function that can be used to dump a block
     of memory on the console. This function is very usefull for plugin
     developers. The function will dump size bytes of the memory pointed