Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Material to learn GObject and Glib [closed]

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.

like image 308
rahijain Avatar asked Feb 01 '09 09:02

rahijain


6 Answers

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

like image 70
tilljoel Avatar answered Oct 04 '22 17:10

tilljoel


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.

like image 36
Jake Avatar answered Oct 04 '22 17:10

Jake


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

like image 23
Friedrich Avatar answered Oct 04 '22 17:10

Friedrich


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.

like image 23
kliketa Avatar answered Oct 04 '22 16:10

kliketa


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.

like image 39
flyrain Avatar answered Oct 04 '22 15:10

flyrain


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

like image 40
gforcada Avatar answered Oct 04 '22 15:10

gforcada