<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Damien Lespiau &#187; GNOME</title>
	<atom:link href="http://damien.lespiau.name/blog/category/gnome/feed/" rel="self" type="application/rss+xml" />
	<link>http://damien.lespiau.name/blog</link>
	<description>errands</description>
	<lastBuildDate>Sat, 17 Sep 2011 00:37:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The GStreamer conference from a Clutter point of view</title>
		<link>http://damien.lespiau.name/blog/2010/11/16/the-gstreamer-conference-from-a-clutter-point-of-view/</link>
		<comments>http://damien.lespiau.name/blog/2010/11/16/the-gstreamer-conference-from-a-clutter-point-of-view/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 19:30:21 +0000</pubDate>
		<dc:creator>damien</dc:creator>
				<category><![CDATA[Clutter]]></category>
		<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://damien.lespiau.name/blog/?p=193</guid>
		<description><![CDATA[Two weeks ago I attended the first GStreamer conference, and it was great. I won&#8217;t talk about the 1.0 plan that seems to take shape and looks really good but just what stroke me the most: Happy Clutter Stories and an Tale To Be Told to your manager. Let&#8217;s move on the Clutter stories. You [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I attended<a href="http://gstreamer.freedesktop.org/conference/"> the first GStreamer conference</a>, and it was great. I won&#8217;t talk about the 1.0 plan that seems to take shape and looks really good but just what stroke me the most: Happy Clutter Stories and an Tale To Be Told to your manager.</p>
<p>Let&#8217;s move on the Clutter stories. You had a surprising number of people mixing GStreamer and Clutter, two talks especially:</p>
<ul>
<li>Florent Thiery founder of <a href="http://www.ubicast.eu">Ubicast</a> talked about one of their products: a<a href="http://www.ubicast.eu/en/Products/easycast/"> portable recording system</a> with quite a bit of bling (records the slides, movement detection with OpenCV, RoI, &#8230;). The system was used to <a href="http://gstreamer-devel.966125.n4.nabble.com/GStreamer-Conference-2010-Talks-Recordings-td3043270.html#a3043270">record the talks on the main track</a>. Now, what was of particular interest for me is that the UI to control the system is entirely written with Clutter and python. They have built a whole toolkit on top of Clutter, in python, called <a href="https://launchpad.net/candies">candies</a>/<a href="https://launchpad.net/touchwizard">touchwizard</a> and written their UI with it, cooool.</li>
<li>A very impressive talk from the <a href="http://www.tandberg.com/">Tanberg</a> (now Cisco) guys about their <a href="http://www.tandberg.com/">Movi software</a>, video conferencing at its finest. It uses GStreamer extensively and Clutter for its UI (on Windows!). They said that about 150,000 copies of Movi are deployed in the wild. Patches from Ole André Vadla Ravnås and Haakon Sporsheim have been flowing to Clutter and Clutter-gst (win32 support).</li>
</ul>
<p>As a side note, Fluendo talked about their Open Source, Intel founded, <a href="https://core.fluendo.com/gstreamer/trac/browser/trunk/gst-fluendo-ismd">GStreamer codecs</a> for Intel CE3100/CE4100. This platform specificities are supported natively by Clutter (./configure &#8211;with-flavour=cex100) using the native EGL winsys called &#8220;GDL&#8221; and evdev events coming from the kernel. More on this later :p</p>
<p>A very interesting point about those success stories is that the companies and engineers working with open source software to build their applications, sometimes with parts heavily covered by patents, <strong>while</strong> contributing back to the ecosystem that allowed to build those applications in the first place. Contributing is done at many levels: directly patches but also feedback on the libraries/platform (eg. input for GStreamer 1.0). And guess what? It works! To me, that&#8217;s exactly how the GNOME platform should be used to build proprietary applications: build on top and contribute back to consolidate the libraries. I&#8217;d go as far as saying that contributing upstream is the best way to share code inside the same big corporation. Such companies are always very bad a cooperating between divisions.</p>
]]></content:encoded>
			<wfw:commentRss>http://damien.lespiau.name/blog/2010/11/16/the-gstreamer-conference-from-a-clutter-point-of-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>g_object_notify_by_pspec()</title>
		<link>http://damien.lespiau.name/blog/2010/09/28/g_object_notify_by_pspec/</link>
		<comments>http://damien.lespiau.name/blog/2010/09/28/g_object_notify_by_pspec/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 13:30:44 +0000</pubDate>
		<dc:creator>damien</dc:creator>
				<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://damien.lespiau.name/blog/?p=186</guid>
		<description><![CDATA[Now that GLib 2.26.0 is out, it&#8217;s time to talk about a little patch to GObject I&#8217;ve written (well, the original idea was born while looking at it with Neil): add a new g_object_notify_by_pspec() symbol to GObject. As shown in the bug it can improve the notification of GObject properties by 10-15% (the test case [...]]]></description>
			<content:encoded><![CDATA[<p>Now that  GLib 2.26.0 is out, it&#8217;s time to talk about a little patch to GObject I&#8217;ve written (well, the original idea was born while looking at it with <a href="http://www.busydoingnothing.co.uk/blog/">Neil</a>): add a new <a href="http://library.gnome.org/devel/gobject/stable/gobject-The-Base-Object-Type.html#g-object-notify-by-pspec"><code>g_object_notify_by_pspec()</code></a> symbol to GObject. As shown <a href="https://bugzilla.gnome.org/show_bug.cgi?id=615425">in the bug </a>it can improve the notification of GObject properties by 10-15% (the test case tested was without any handler connected to the notify signal).</p>
<p>If you can depend on GLib 2.26, consider using it!</p>
]]></content:encoded>
			<wfw:commentRss>http://damien.lespiau.name/blog/2010/09/28/g_object_notify_by_pspec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using glib.py and gobject.py GDB scripts</title>
		<link>http://damien.lespiau.name/blog/2010/03/23/using-glibpy-and-gobjectpy-gdb-scripts/</link>
		<comments>http://damien.lespiau.name/blog/2010/03/23/using-glibpy-and-gobjectpy-gdb-scripts/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 20:58:31 +0000</pubDate>
		<dc:creator>damien</dc:creator>
				<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://damien.lespiau.name/blog/?p=158</guid>
		<description><![CDATA[Some time ago, Alexander Larson blogged about using gdb python macros when debugging Glib and GObject projects. I&#8217;ve wanted to try those for ages, so I spent part of the week-end looking at what you could do with the new python enabled GDB, result: quite a lot of neat stuff! Let&#8217;s start by making the [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago, Alexander Larson blogged about <a href="http://blogs.gnome.org/alexl/2009/09/21/archer-gdb-macros-for-glib/ ">using gdb python macros</a> when debugging Glib and GObject projects. I&#8217;ve wanted to try those for ages, so I spent part of the week-end looking at what you could do with the new python enabled GDB, result: quite a lot of neat stuff!</p>
<p>Let&#8217;s start by making the script that now comes with glib work on stock gdb 7.0 and 7.1 (ie not the archer branch that contains more of the python work). If those two scripts don&#8217;t work for you yet (because your distribution is not packaging them, or is packaging a stock gdb 7.0. 7.1), here are a few hints you can follow:</p>
<ul>
<li>glib&#8217;s GDB macros rely on GDB&#8217;s auto-load feature, ie, every time GDB load a library your program uses, it&#8217;ll look for a corresponding python script to execute:</li>
</ul>
<pre>open("/lib/libglib-2.0.so.0.2200.4-gdb.py", O_RDONLY)
open("/usr/lib/debug/lib/libglib-2.0.so.0.2200.4-gdb.py", O_RDONLY)
open("/usr/share/gdb/auto-load/lib/libglib-2.0.so.0.2200.4-gdb.py", O_RDONLY)</pre>
<p>Some distributions have decided not to ship glib&#8217;s and gobject&#8217;s auto-load helpers, if you are in that case, you&#8217;d need to load <code class="filename">gobject.py</code> and <code class="filename">glib.py</code> by hand. For that purpose I&#8217;ve added a small python command in my <code class="filename">~/.gdbinit</code>:</p>
<pre>python
import os.path
import sys
import gdb

# Update module path.
dir = os.path.join(os.path.expanduser("~"), ".gdb")
if not dir in sys.path:
    sys.path.insert(0, dir)

class RegisterCommand (gdb.Command):
    """Register GLib and GObject modules"""

    def __init__ (self):
        super (RegisterCommand, self).__init__ ("gregister",
                                                gdb.COMMAND_DATA,
                                                gdb.COMPLETE_NONE)

    def invoke (self, arg, from_tty):
        objects = gdb.objfiles ()
        for object in objects:
            if object.filename.find ("libglib-2.0.so.") != -1:
                from glib import register
                register (object)
            elif object.filename.find ("libgobject-2.0.so.") != -1:
                from gobject import register
                register (object)

RegisterCommand ()
end</pre>
<p>What I do is put <code class="filename">glib.py</code> and <code class="filename">gobject.py</code> in a<code class="filename"> ~/.gdb</code> directory and don&#8217;t forget to call <code>gregister</code> inside GDB (once gdb has loaded glib and gobject)</p>
<ul>
<li>The scripts that are inside glib&#8217;s repository were written with the archer branch of gdb (which bring all the python stuff). Unfortunately stock GDB (7.0 and 7.1) does not have everything the archer gdb has. I have a <a href="https://bugzilla.gnome.org/show_bug.cgi?id=613732">couple</a> of <a href="https://bugzilla.gnome.org/show_bug.cgi?id=613736">patches</a> to fix that in the queue. Meanwhile you can grab them in <a href="http://git.lespiau.name/cgit/sk/tree/dotfiles/gdb">my survival kit repository</a>. This will disable the back trace filters as they are still not in stock GDB.</li>
</ul>
<p>You&#8217;re all set! it&#8217;s time to enjoy pretty printing and <code>gforeach</code>. Hopefully people will join the fun at some point and add more GDB python macro goodness both inside glib and in other projects (for instance a ClutterActor could print its name).</p>
<pre>int main (int argc, char **argv)
{
	glist = g_list_append (glist, "first");
	glist = g_list_append (glist, "second");

	return breeeaaak_oooon_meeeee ();
}</pre>
<p>gives:</p>
<pre>(gdb) b breeeaaak_oooon_meeeee
Breakpoint 1 at 0x80484b7: file glib.c, line 9.
(gdb) r
Starting program: /home/damien/src/test-gdb/glib
Breakpoint 1, breeeaaak_oooon_meeeee () at glib.c:9
9        return 0;
(gdb) gregister
(gdb) gforeach s in glistp: print ((char *)$s)
No symbol "glistp" in current context.
(gdb) gforeach s in glist: print ((char *)$s)
$2 = 0x80485d0 "first"
$3 = 0x80485d6 "second"</pre>
]]></content:encoded>
			<wfw:commentRss>http://damien.lespiau.name/blog/2010/03/23/using-glibpy-and-gobjectpy-gdb-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aligning C function parameters with vim</title>
		<link>http://damien.lespiau.name/blog/2009/12/07/aligning-c-function-parameters-with-vim/</link>
		<comments>http://damien.lespiau.name/blog/2009/12/07/aligning-c-function-parameters-with-vim/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 12:56:11 +0000</pubDate>
		<dc:creator>damien</dc:creator>
				<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://damien.lespiau.name/blog/?p=145</guid>
		<description><![CDATA[updated: now saves/retores the paste register It has bothered me for a while, some coding styles, most notably in the GNOME world try to enforce good looking alignment of functions parameters such as: static UniqueResponse on_unique_message_received (UniqueApp         *unique_app, gint               command, UniqueMessageData *message_data, guint              time_, gpointer           user_data) { } Until now, I aligned the arguments by [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">updated:</span> now saves/retores the paste register</p>
<p>It has bothered me for a while, some coding styles, most notably in the GNOME world try to enforce good looking alignment of functions parameters such as:</p>
<pre>static UniqueResponse
on_unique_message_received (UniqueApp         *unique_app,
                            gint               command,
                            UniqueMessageData *message_data,
                            guint              time_,
                            gpointer           user_data)
{
}</pre>
<p>Until now, I aligned the arguments by hand, but that time is over! Please welcome my first substantial vim plugin: it defines a  <code class="command">GNOMEAlignArguments</code> command to help you in that task. All you have to do is to <a title="GNOME-align-args.vim" href="http://git.lespiau.name/cgit/sk/plain/dotfiles/vim/plugin/GNOME-align-args.vim">add this file</a> in your  <code class="filename">~/.vim/plugin</code> directory and define a macro in your  <code class="filename">~/.vimrc</code> to invoke it just like this:</p>
<pre>" Align arguments
nmap ,a :GNOMEAlignArguments&lt;CR&gt;</pre>
<p>HTH.</p>
]]></content:encoded>
			<wfw:commentRss>http://damien.lespiau.name/blog/2009/12/07/aligning-c-function-parameters-with-vim/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

