<?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>sebruiz.net &#187; gnome</title>
	<atom:link href="http://www.sebruiz.net/tag/gnome/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sebruiz.net</link>
	<description></description>
	<lastBuildDate>Thu, 09 Jul 2009 14:02:06 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>GdkPixbuf woes</title>
		<link>http://www.sebruiz.net/354</link>
		<comments>http://www.sebruiz.net/354#comments</comments>
		<pubDate>Fri, 13 Mar 2009 12:48:27 +0000</pubDate>
		<dc:creator>Seb</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[assert]]></category>
		<category><![CDATA[assertion]]></category>
		<category><![CDATA[gdkpixbuf]]></category>
		<category><![CDATA[glib]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[libgpod]]></category>

		<guid isPermaLink="false">http://www.sebruiz.net/?p=354</guid>
		<description><![CDATA[For the last four days I&#8217;ve been trying to implement cover art support for iPods in Amarok 2.1. I&#8217;ve reached desperate measures here, appealing to the wider public for any hints that might be available.
Here&#8217;s the problem. Any returned GdkPixbuf objects from libgpod when called from within Amarok are invalid &#8212; they&#8217;re either garbled junk, [...]]]></description>
			<content:encoded><![CDATA[<p>For the last four days I&#8217;ve been trying to implement cover art support for iPods in Amarok 2.1. I&#8217;ve reached desperate measures here, appealing to the wider public for any hints that might be available.</p>
<p>Here&#8217;s the problem. Any returned <a href="http://developer.gimp.org/api/2.0/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html">GdkPixbuf</a> objects from <a href="http://www.gtkpod.org/libgpod.html">libgpod</a> when called from within Amarok are invalid &#8212; they&#8217;re either garbled junk, null, glib asserts, or libgpod throws an assertion claiming something or other:</p>
<p><code>(process:26875): GdkPixbuf-CRITICAL **: gdk_pixbuf_scale_simple: assertion `src != NULL' failed<br />
(process:26875): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed</code><br />
<code>(process:16782): CRITICAL **: unpack_UYVY: assertion `width * height * 2 == bytes_len' failed</code></p>
<p>The most bizarre part of it is that the <em>exact</em> same code works perfectly when called from within one of libgpod&#8217;s unit tests, and artwork retrieval works fine in gtkpod.</p>
<p>A few things I know for sure:</p>
<ol>
<li>There is only one version of libgpod installed (0.7.0), self compiled with gdkpixbuf support</li>
<li>Gtkpod was also self compiled against libgpod 0.7.0</li>
<li>The libgpod guys have been very involved but can&#8217;t provide any answers</li>
<li>Both gtkpod and Amarok link to the same versions of libgpod and gdk:<br />
<code>$> ldd /usr/lib/kde4/libamarok_collection-ipodcollection.so<br />
    libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0<br />
    libgpod.so.4 => /usr/lib/libgpod.so.4<br />
$> ldd `which gtkpod`<br />
    libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0<br />
    libgpod.so.4 => /usr/lib/libgpod.so.4<br />
</code></li>
<li>Could it be a race condition somewhere? Perhaps, but as I see it, the code is only ever called from the Qt GUI thread.</li>
</ol>
<p>Here&#8217;s the snippet of code: <a href="http://pastie.org/415144">http://pastie.org/415144</a></p>
<p>Can anyone provide any insight to this problem? I&#8217;m going bananas trying to solve it.</p>
<p><strong>Update:</strong> Problem solved folks! Turned out to be a misuse of the libgpod api &#8211; calling itdb_device_read_sysinfo() kills the artwork structs which have been already initialised. The blame game lies equally on Amarok (for incorrect usage) and libgpod (for poor documentation and unexpected results). Good news is that the grand folks upstream at libgpod have been notified and they&#8217;ll be improving their API and docs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebruiz.net/354/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Some clarity, please</title>
		<link>http://www.sebruiz.net/345</link>
		<comments>http://www.sebruiz.net/345#comments</comments>
		<pubDate>Fri, 26 Sep 2008 05:16:01 +0000</pubDate>
		<dc:creator>Seb</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[phonon]]></category>

		<guid isPermaLink="false">http://www.sebruiz.net/?p=345</guid>
		<description><![CDATA[I do believe that my recommendations very much match the mainstream of the opinions of the key people in Linux multimedia and desktop audio. Of course I don&#8217;t nearly know everyone of the key hackers in Linux multimedia. But I do know most of those who are actively interested in collaboration, whose projects have a [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>I do believe that my recommendations very much match the mainstream of the opinions of the key people in Linux multimedia and desktop audio. Of course I don&#8217;t nearly know everyone of the key hackers in Linux multimedia. But I do know most of those who are actively interested in collaboration, whose projects have a lot mindshare and who attend the conferences that matter for Linux desktop audio.</p></blockquote>
<p><a href="http://0pointer.de/blog/projects/guide-to-sound-apis-followup.html">Lennart forgets</a> that Amarok is definitely a contender for the most popular music player on desktop Linux today. It possibly has <i>the most</i> mindshare of any Linux music player project. Remember that a long time ago, Amarok supported aRts, xine, GStreamer and helix. Now we can take advantage of not needing to care about a specific implementation for an audio output device by using Phonon.</p>
<p>Lennart again:</p>
<blockquote><p>&#8220;Use GStreamer! (Unless your focus is <em>only KDE</em> in which cases Phonon might be an alternative.)&#8221;</p></blockquote>
<p>This implies that a developer should <em>only</em> use Phonon if and only if the developer is targeting a KDE application. Frankly, this reasoning is not very well formed and is shameful. Perhaps what Lennart meant to say belongs along the lines of &#8220;Developers using the KDE development libraries might want to use Phonon&#8221;.</p>
<p>Amarok is a perfect example of an application which uses the KDE development libraries, but is not tied into the KDE plasma workspace. A grand portion of GNOME users pro actively install Amarok on their system because it is their preferred application for listening to music. Time to pick up the slack and get with the times.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebruiz.net/345/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
