Material to learn GObject and Glib [closed]
Asked Answered
C

6

51

I am comfortable with C. but need to learn GObject and Glib for gstreamer. All i found on net is Gobject reference manual. Its good but looking for tutorial for Gobject/Glib as the main focus is on gstreamer.

So pls share any other resources to learn the glib and gobject.

Cochleate answered 1/2, 2009 at 9:43 Comment(0)
E
45

Start with Glib, its quite easy and well described here: Glib Reference Manual

GObject is mostly a lot of boilerplate code to achieve object orientation. Try out the "maman bar" examples found in the GObject Reference Manual

For me, GStreamer took the most time to understand. The documentation is good but there is alot to read (GStreamer docs). After reading about the basics, try starting a pipeline from the cmdline using gst-launch. Then read the full manual about application development and do some examples. Before trying to build your own plugin, check out some simple plugin and try understand the different parts, a simple place to start is the identity plugin

Good luck!

/Joel Larsson

Elderberry answered 1/2, 2009 at 22:55 Comment(0)
V
12

You may be interested in these sample programs I uploaded to github after I read the chapter in the Gnome Developers Guide and went through the gobject manual.

Virendra answered 20/2, 2010 at 0:26 Comment(3)
+1 do you have a simple example that uses : GAsyncReadyCallbackProwess
Nice examples. Do you also have example of class with signals? Couldn't find: g_signal_newv in your code. From developer.gnome.org/gobject/stable/signal.htmlUpanddown
@Virendra where is the "gobject manual"? I only could find the “reference manual” here--- developer.gnome.org/gobject/2.68Tears
C
6

There is also "the offical Gnome 2 Developer's guide". See 59 ff. on the mentioned book... And it's really a good idea to check the sources of gtk. I've spend the last few weeks on getting into it, and found this book to be very helpful. What's quite tedious is to get the constuctors right and the order of initialization is "quite" mind-bending. What you should check is chapter 4 in the GObject documentation also. It does not cover everything but together with the book it' quite ok. I suggest starting with a very simple derived glass form GObject....., to better understand on base principle

One always has two structures. A Class Structure in which you store all the function pointers and an instance structure which represents one Object. This is the most important thing to get.

Another point which is a bit harder to understand it the reference counting for memory management. It helps if you had contact before with Objective-C and/or libapr and/or COM.

Regards Friedrich

Choke answered 1/2, 2009 at 12:56 Comment(0)
C
5

This is best GTK+ book I found, it has a chapter on GLib, but reference manual is the best place to learn and the most up to date "book" you will find.

Contiguity answered 1/2, 2009 at 10:27 Comment(0)
T
5

Manage C data using the GLib collections is a introduction of glib collection(links, hash tables, arrays, trees, queues, relations). Lots of examples are included. Good for beginners.

Trombidiasis answered 15/6, 2012 at 19:48 Comment(0)
P
2

Maybe too much easy but there are the GNOME platform demos which you can get used to the idiomatics of GNOME and its libraries.

Polis answered 21/11, 2011 at 1:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.