diff --git a/docs/manual/bins.sgml b/docs/manual/bins.sgml
index 04d46a858d..988687bf63 100644
--- a/docs/manual/bins.sgml
+++ b/docs/manual/bins.sgml
@@ -137,17 +137,17 @@
// create the mp3player element
- GstElement *mp3player = gst_elementfactory_make("mp3player","mp3player");
+ GstElement *mp3player = gst_elementfactory_make ("mp3player", "mp3player");
// set the source mp3 audio file
- gtk_object_set(GTK_OBJECT(mp3player), "location", "helloworld.mp3", NULL);
+ g_object_set (G_OBJECT (mp3player), "location", "helloworld.mp3", NULL);
// start playback
- gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PLAYING);
+ gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_PLAYING);
...
// pause playback
- gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_PAUSED);
+ gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_PAUSED);
...
// stop
- gst_element_set_state(GST_ELEMENT(mp3player),GST_STATE_NULL);
+ gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_NULL);
Custom bins can be created with a plugin or an XML description. You will find more
diff --git a/docs/manual/dynamic.sgml b/docs/manual/dynamic.sgml
index 23a59263e7..6cd753ba5b 100644
--- a/docs/manual/dynamic.sgml
+++ b/docs/manual/dynamic.sgml
@@ -46,7 +46,7 @@ main(int argc, char *argv[])
src = gst_elementfactory_make ("disksrc", "src");
g_return_val_if_fail (src != NULL, -1);
- gtk_object_set (GTK_OBJECT (src), "location", argv[1], NULL);
+ g_object_set (G_OBJECT (src), "location", argv[1], NULL);
parse = gst_elementfactory_make ("mpeg1parse", "parse");
g_return_val_if_fail (parse != NULL, -1);
@@ -54,11 +54,11 @@ main(int argc, char *argv[])
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (src));
gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (parse));
- gtk_signal_connect (GTK_OBJECT (parse), "new_pad",
- GTK_SIGNAL_FUNC (new_pad_created), pipeline);
+ g_signal_connectc (G_OBJECT (parse), "new_pad",
+ G_CALLBACK (new_pad_created), pipeline, FALSE);
- gtk_signal_connect (GTK_OBJECT (src), "eos",
- GTK_SIGNAL_FUNC (eof), NULL);
+ g_signal_connectc (G_OBJECT (src), "eos",
+ G_CALLBACK (eof), NULL, FALSE);
gst_pad_connect (gst_element_get_pad (src, "src"),
gst_element_get_pad (parse, "sink"));
@@ -83,8 +83,8 @@ main(int argc, char *argv[])
'new_pad' that we connected to the mpeg1parser using:
- gtk_signal_connect (GTK_OBJECT (parse), "new_pad",
- GTK_SIGNAL_FUNC (new_pad_created), pipeline);
+ g_signal_connectc (G_OBJECT (parse), "new_pad",
+ G_CALLBACK (new_pad_created), pipeline, FALSE);
When an elementary stream has been detected in the system stream,
@@ -191,7 +191,7 @@ new_pad_created (GstElement *parse, GstPad *pad, GstElement *pipeline)
gst_element_get_pad (video_thread, "sink"));
// set up thread state and kick things off
- gtk_object_set (GTK_OBJECT (video_thread), "create_thread", TRUE, NULL);
+ g_object_set (G_OBJECT (video_thread), "create_thread", TRUE, NULL);
g_print ("setting to READY state\n");
gst_element_set_state (GST_ELEMENT (video_thread), GST_STATE_READY);
}
diff --git a/docs/manual/factories.sgml b/docs/manual/factories.sgml
index d67146f648..62490bb719 100644
--- a/docs/manual/factories.sgml
+++ b/docs/manual/factories.sgml
@@ -21,8 +21,8 @@
...
/* now it's time to get the parser */
- parse = gst_elementfactory_make("mp3parse","parse");
- decoder = gst_elementfactory_make("mpg123","decoder");
+ parse = gst_elementfactory_make ("mp3parse", "parse");
+ decoder = gst_elementfactory_make ("mpg123", "decoder");
...
@@ -158,7 +158,7 @@ struct _GstType {
guint16 id;
- id = gst_type_find_by_mime("audio/mpeg");
+ id = gst_type_find_by_mime ("audio/mpeg");
This function will return 0 if the type was not known.
@@ -174,7 +174,7 @@ struct _GstType {
GstType *type;
- type = gst_type_find_by_id(id);
+ type = gst_type_find_by_id (id);
This function will return NULL if the id was associated with
@@ -191,7 +191,7 @@ struct _GstType {
guint16 id;
- id = gst_type_find_by_ext(".mp3");
+ id = gst_type_find_by_ext (".mp3");
This function will return 0 if the extension was not known.
@@ -211,7 +211,7 @@ struct _GstType {
GList *list;
- list = gst_type_gst_srcs(id);
+ list = gst_type_gst_srcs (id);
@@ -220,7 +220,7 @@ struct _GstType {
GList *list;
- list = gst_type_gst_sinks(id);
+ list = gst_type_gst_sinks (id);
When you have a list of elements, you can simply take the first
@@ -269,7 +269,7 @@ struct _GstType {
GList *list;
- list = gst_type_gst_sink_to_src(sourceid, sinkid);
+ list = gst_type_gst_sink_to_src (sourceid, sinkid);
This piece of code will give you the elements needed to construct
@@ -293,7 +293,7 @@ struct _GstType {
// obtain the factory
factory = ...
- element = gst_elementfactory_create(factory, "name");
+ element = gst_elementfactory_create (factory, "name");
This way, you do not have to create elements by name which
diff --git a/docs/manual/goals.sgml b/docs/manual/goals.sgml
index 1da2432672..f8c5225dff 100644
--- a/docs/manual/goals.sgml
+++ b/docs/manual/goals.sgml
@@ -38,8 +38,8 @@
Object oriented
- Adhere as much as possible to the GTK+ object model. A programmer familiar
- with GTK+ will be confortable with GStreamer.
+ Adhere as much as possible to the glib2.0 object model. A programmer familiar
+ with glib2 and GTK+ will be confortable with GStreamer.
GStreamer uses the mechanism of signals and object arguments.
@@ -53,7 +53,7 @@
Extensible
- All GStreamer Objects can be extended using the GTK+ inheritance methods.
+ All GStreamer Objects can be extended using the glib2 inheritance methods.
All plugins are loaded dynamically and can be extended and upgraded
@@ -65,7 +65,7 @@
Allow binary only plugins
plugins are shared libraries that are loaded at runtime. since all the
- properties of the plugin can be set using the GtkObject arguments, there
+ properties of the plugin can be set using the GObject properties, there
is no need to have any header files installed for the plugins.
diff --git a/docs/manual/gstreamer-manual.sgml b/docs/manual/gstreamer-manual.sgml
index 363934fe6a..de3bf958f2 100644
--- a/docs/manual/gstreamer-manual.sgml
+++ b/docs/manual/gstreamer-manual.sgml
@@ -67,8 +67,8 @@
The first chapter of the book gives you an overview of GStreamer
design goals. Chapter 2 rapidly covers the basics of GStreamer
programming. In chapter 3 we will move on to the examples.
- Since GStreamer adheres to the GTK+ programming model, the reader is
- assumed to understand the basics of GTK+.
+ Since GStreamer adheres to the GTK+/glib2 programming model, the reader is
+ assumed to understand the basics of GTK+ and the glib2.0 object model.
For a gentle introduction to GTK+, you may wish to read the GTK+
Tutorial or Eric Harlow's book Developing Linux
Applications with GTK+ and GDK.
diff --git a/docs/manual/helloworld.sgml b/docs/manual/helloworld.sgml
index 90436398de..0adcfc34ed 100644
--- a/docs/manual/helloworld.sgml
+++ b/docs/manual/helloworld.sgml
@@ -36,7 +36,7 @@ main (int argc, char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
- gtk_object_set (GTK_OBJECT (disksrc),"location", argv[1], NULL);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
@@ -127,13 +127,13 @@ main (int argc, char *argv[])
We then create a disk source element. The disk source element is able to
- read from a file. We use the standard GTK+ argument mechanism to set
+ read from a file. We use the standard GObject property mechanism to set
a property of the element: the file to read from.
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
- gtk_object_set (GTK_OBJECT (disksrc),"location", argv[1], NULL);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
diff --git a/docs/manual/helloworld2.sgml b/docs/manual/helloworld2.sgml
index df973472b7..b10fa0b39d 100644
--- a/docs/manual/helloworld2.sgml
+++ b/docs/manual/helloworld2.sgml
@@ -52,9 +52,9 @@ main (int argc, char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
- gtk_object_set (GTK_OBJECT (disksrc), "location", argv[1], NULL);
- gtk_signal_connect (GTK_OBJECT (disksrc), "eos",
- GTK_SIGNAL_FUNC (eos), NULL);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
+ g_signal_connectc (G_OBJECT (disksrc), "eos",
+ G_CALLBACK (eos), NULL, FALSE);
/* and an audio sink */
audiosink = gst_elementfactory_make ("audiosink", "play_audio");
diff --git a/docs/manual/pads.sgml b/docs/manual/pads.sgml
index 544d0b68c4..1e0886d786 100644
--- a/docs/manual/pads.sgml
+++ b/docs/manual/pads.sgml
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
...
mpeg2parser = gst_elementfactory_make ("mpeg2parse", "mpeg2parse");
- gtk_signal_connect (GTK_OBJECT (mpeg2parser), "new_pad", pad_connect_func, pipeline);
+ g_signal_connectc (G_OBJECT (mpeg2parser), "new_pad", pad_connect_func, pipeline, FALSE);
...
// start the pipeline
@@ -411,7 +411,7 @@ GstProps* gst_props_new (const gchar *firstname, ...);
- All of the above values can be given with a list too using:
+ All of the above values can be given with a list too, using:
diff --git a/docs/manual/programs.sgml b/docs/manual/programs.sgml
index d5fbb6b45f..d61cf4d009 100644
--- a/docs/manual/programs.sgml
+++ b/docs/manual/programs.sgml
@@ -117,29 +117,29 @@ video_00! (mpeg2dec ! videosink)
#include <stdlib.h>
int
-main(int argc, char *argv[])
+main (int argc, char *argv[])
{
GstElement *pipeline;
char **argvn;
gchar *cmdline;
int i;
- gst_init(&argc,&argv);
+ gst_init (&argc, &argv);
- pipeline = gst_pipeline_new("launch");
+ pipeline = gst_pipeline_new ("launch");
// make a null-terminated version of argv
- argvn = g_new0(char *,argc);
- memcpy(argvn,argv+1,sizeof(char*)*(argc-1));
+ argvn = g_new0 (char *,argc);
+ memcpy (argvn, argv+1, sizeof (char*) * (argc-1));
// join the argvs together
- cmdline = g_strjoinv(" ",argvn);
+ cmdline = g_strjoinv (" ", argvn);
// free the null-terminated argv
- g_free(argvn);
+ g_free (argvn);
- gst_parse_launch(cmdline,pipeline);
+ gst_parse_launch (cmdline, pipeline);
fprintf(stderr,"RUNNING pipeline\n");
- gst_element_set_state(pipeline,GST_STATE_PLAYING);
+ gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (1)
gst_bin_iterate (GST_BIN (pipeline));
diff --git a/docs/manual/queues.sgml b/docs/manual/queues.sgml
index 2450e49961..e8ad9d2a10 100644
--- a/docs/manual/queues.sgml
+++ b/docs/manual/queues.sgml
@@ -29,11 +29,11 @@
The standard GStreamer queue implementation has some
- properties that can be changed using the gtk_objet_set () method. To set the
+ properties that can be changed using the g_objet_set () method. To set the
maximum number of buffers that can be queued to 30, do:
- gtk_object_set (GTK_OBJECT (queue), "max_level", 30, NULL);
+ g_object_set (G_OBJECT (queue), "max_level", 30, NULL);
@@ -81,9 +81,9 @@ main (int argc, char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_assert (disksrc != NULL);
- gtk_object_set (GTK_OBJECT (disksrc), "location", argv[1], NULL);
- gtk_signal_connect (GTK_OBJECT (disksrc), "eos",
- GTK_SIGNAL_FUNC (eos), thread);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
+ g_signal_connectc (G_OBJECT (disksrc), "eos",
+ G_CALLBACK (eos), thread, FALSE);
queue = gst_elementfactory_make ("queue", "queue");
@@ -114,8 +114,6 @@ main (int argc, char *argv[])
gst_bin_add (GST_BIN (bin), thread);
- /* make it ready */
- gst_element_set_state (GST_ELEMENT (bin), GST_STATE_READY);
/* start playing */
gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
diff --git a/docs/manual/threads.sgml b/docs/manual/threads.sgml
index b5f24f0bb6..4349783861 100644
--- a/docs/manual/threads.sgml
+++ b/docs/manual/threads.sgml
@@ -94,9 +94,9 @@ main (int argc, char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_assert (disksrc != NULL);
- gtk_object_set (GTK_OBJECT (disksrc), "location", argv[1], NULL);
- gtk_signal_connect (GTK_OBJECT (disksrc), "eos",
- GTK_SIGNAL_FUNC (eos), thread);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
+ g_signal_connectc (G_OBJECT (disksrc), "eos",
+ G_CALLBACK (eos), thread, FALSE);
/* and an audio sink */
audiosink = gst_elementfactory_make ("audiosink", "play_audio");
diff --git a/docs/manual/typedetection.sgml b/docs/manual/typedetection.sgml
index e9bb972e10..7cf294d8c0 100644
--- a/docs/manual/typedetection.sgml
+++ b/docs/manual/typedetection.sgml
@@ -61,44 +61,44 @@ main(int argc, char *argv[])
{
GstElement *bin, *disksrc, *typefind;
- gst_init(&argc,&argv);
+ gst_init (&argc, &argv);
if (argc != 2) {
- g_print("usage: %s <filename>\n", argv[0]);
- exit(-1);
+ g_print ("usage: %s <filename>\n", argv[0]);
+ exit (-1);
}
/* create a new bin to hold the elements */
- bin = gst_bin_new("bin");
- g_assert(bin != NULL);
+ bin = gst_bin_new ("bin");
+ g_assert (bin != NULL);
/* create a disk reader */
- disksrc = gst_elementfactory_make("disksrc", "disk_source");
- g_assert(disksrc != NULL);
- gtk_object_set(GTK_OBJECT(disksrc),"location", argv[1],NULL);
+ disksrc = gst_elementfactory_make ("disksrc", "disk_source");
+ g_assert (disksrc != NULL);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
/* create the typefind element */
- typefind = gst_elementfactory_make("typefind", "typefind");
- g_assert(typefind != NULL);
+ typefind = gst_elementfactory_make ("typefind", "typefind");
+ g_assert (typefind != NULL);
/* add objects to the main pipeline */
- gst_bin_add(GST_BIN(bin), disksrc);
- gst_bin_add(GST_BIN(bin), typefind);
+ gst_bin_add (GST_BIN (bin), disksrc);
+ gst_bin_add (GST_BIN (bin), typefind);
- gtk_signal_connect (GTK_OBJECT (typefind), "have_type",
- type_found, NULL);
+ g_signal_connectc (G_OBJECT (typefind), "have_type",
+ G_CALLBACK (type_found), NULL, FALSE);
- gst_pad_connect(gst_element_get_pad(disksrc,"src"),
- gst_element_get_pad(typefind,"sink"));
+ gst_pad_connect (gst_element_get_pad (disksrc, "src"),
+ gst_element_get_pad (typefind, "sink"));
/* start playing */
- gst_element_set_state(GST_ELEMENT(bin), GST_STATE_PLAYING);
+ gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
- gst_bin_iterate(GST_BIN(bin));
+ gst_bin_iterate (GST_BIN (bin));
- gst_element_set_state(GST_ELEMENT(bin), GST_STATE_NULL);
+ gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
- exit(0);
+ exit (0);
}
diff --git a/docs/manual/utility.sgml b/docs/manual/utility.sgml
index c8247bc498..ca5a39b1c3 100644
--- a/docs/manual/utility.sgml
+++ b/docs/manual/utility.sgml
@@ -1,7 +1,7 @@
Utility functions
- while you can use the regular gtk_object_getv () function to
+ while you can use the regular g_object_getv () function to
query the value of an object property, GStreamer
provides some easy wrappers for this common operation.
@@ -14,7 +14,7 @@
guchar *value;
arg.name = argname;
- gtk_object_getv (GTK_OBJECT (object), 1, &arg);
+ g_object_getv (G_OBJECT (object), 1, &arg);
value = GTK_VALUE_STRING (arg);
@@ -61,11 +61,6 @@
gpointer: with gst_util_get_pointer_arg ();
-
-
- GtkWidget*: with gst_util_get_widget_arg ();
-
-
@@ -75,7 +70,7 @@
to by mem.
- void gst_util_dump_mem(guchar *mem, guint size);
+ void gst_util_dump_mem (guchar *mem, guint size);
diff --git a/docs/manual/xml.sgml b/docs/manual/xml.sgml
index 18413f187b..cf8d1022d2 100644
--- a/docs/manual/xml.sgml
+++ b/docs/manual/xml.sgml
@@ -55,7 +55,7 @@ main (int argc, char *argv[])
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_assert (disksrc != NULL);
- gtk_object_set (GTK_OBJECT (disksrc), "location", argv[1], NULL);
+ g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
queue = gst_elementfactory_make ("queue", "queue");
queue2 = gst_elementfactory_make ("queue", "queue2");
@@ -195,8 +195,9 @@ xmlNsPtr ns;
...
ns = xmlNewNs (NULL, "http://gstreamer.net/gst-test/1.0/", "test");
...
- thread = gst_elementfactory_make("thread", "thread");
- gtk_signal_connect (GTK_OBJECT (thread), "object_saved", object_saved, g_strdup ("decoder thread"));
+ thread = gst_elementfactory_make ("thread", "thread");
+ g_signal_connectc (G_OBJECT (thread), "object_saved",
+ G_CALLBACK (object_saved), g_strdup ("decoder thread"), FALSE);
...
@@ -209,8 +210,8 @@ object_saved (GstObject *object, xmlNodePtr parent, gpointer data)
{
xmlNodePtr child;
- child = xmlNewChild(parent, ns, "comment", NULL);
- xmlNewChild(child, ns, "text", (gchar *)data);
+ child = xmlNewChild (parent, ns, "comment", NULL);
+ xmlNewChild (child, ns, "text", (gchar *)data);
}
@@ -245,9 +246,10 @@ object_saved (GstObject *object, xmlNodePtr parent, gpointer data)
xml = gst_xml_new ();
- gtk_signal_connect (GTK_OBJECT (xml), "object_loaded", xml_loaded, xml);
+ g_signal_connectc (G_OBJECT (xml), "object_loaded",
+ G_CALLBACK (xml_loaded), xml);
- ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
+ ret = gst_xml_parse_file (xml, "xmlTest.gst", NULL);
g_assert (ret == TRUE);