<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Amarok Blog - Flameeyes</title>
    <link>http://amarok.kde.org/blog/</link>
    <description>Amarok developers at work</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1-alpha7 - http://www.s9y.org/</generator>
    <pubDate>Thu, 10 May 2007 01:38:00 GMT</pubDate>

    <image>
        <url>http://amarok.kde.org/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Amarok Blog - Flameeyes - Amarok developers at work</title>
        <link>http://amarok.kde.org/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>My fiddling with OpenJDK</title>
    <link>http://amarok.kde.org/blog/archives/393-My-fiddling-with-OpenJDK.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/393-My-fiddling-with-OpenJDK.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=393</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=393</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;It might sound strange coming from someone who wrote a post titled &lt;a href=&quot;http://planet.gentoo.org/developers/flameeyes/2005/08/13/rant_the_java_t_crap&quot;&gt;The Java t..crap&lt;/a&gt; but I&amp;#8217;m liking playing with OpenJDK.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Not like my Java skills (pretty much non-existant, I used it only a few times in my life) are improved, but I find myself comfortable when working with most build systems, after you get scons out of the way (note that I didn&amp;#8217;t say I &lt;strong&gt;like&lt;/strong&gt; it, but I can do it just fine), and I do have experience with adding support for external libraries, after all, and that is something that OpenJDK might need.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;So, let&amp;#8217;s start from the start. The first problem was getting to build OpenJDK on Linux. If you try to build it on &lt;span class=&quot;caps&quot;&gt;AMD64&lt;/span&gt; you&amp;#8217;ll see it fails, the reason for this is that the list of files to compile on hotspot is too long for the maximum size of arguments available on Linux; this in turn is caused by the long default path for sources that Portage sets. Petteri was able to build it fine because on x86 the architecture name is &amp;#8220;i486&amp;#8221;, while on &lt;span class=&quot;caps&quot;&gt;AMD64&lt;/span&gt; is, well, &amp;#8220;amd64&amp;#8221;: the extra character there is enough to make it burn in flames. Kelly O&amp;#8217;Hair from Sun is looking after the issue now, but he says it might take a few weeks to get the results out; not a problem, I suppose, in the mean time you might want to try changing &lt;code&gt;PORTAGE_TMPDIR&lt;/code&gt; to use /tmp for openjdk (if you have space in the /tmp partition) or you might want to fool the ebuild by renaming the openjdk directory inside &lt;code&gt;$WORKDIR&lt;/code&gt; to something shorter, like &amp;#8220;ojdk&amp;#8221;; actually, a single character less will work just fine.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;After getting a working build of OpenJDK, and trying so that it worked fine on Konqueror (it does!), I had to start messing with it, or I wouldn&amp;#8217;t have been myself &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; The first thing was to get it to build with my flags correctly; I was able to get something that worked, but there are a few issues, and I&amp;#8217;d like to be able to provide a less invasive patch. O&amp;#8217;Hair also got me on the right track now, by telling that hotspot and j2se build systems are different, which might call for just using the same method on boths, by ignoring the default C(XX)FLAGS values coming from environment, and instead use the _OTHER variables. This should allow for just four lines changed, if I find where to put the &lt;span class=&quot;caps&quot;&gt;CFLAGS&lt;/span&gt;/CXXFLAGS unset.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;After this I started thinking of an useful hack to do to at least understand how the build system works; I could have looked at fixing a few warnings, but I thought it would have been more useful to actually start by looking at the build system, that is what I will need to understand to be able to get OpenJDK building on FreeBSD. I&amp;#8217;ve seen zlib-1.1.3 sources in the tree, so I decided to find a way to build against external zlib. Easy, quick, interesting and useful.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Why useful? Well, first of all, it would use a more stable version of zlib, and would share its code with the rest of the system (almost every process has a zlib copy loaded one way or another), second of all that would make it non-vulnerable by possible attacks on the zlib code. Unfortunately adding the support for external zlib was not as easy as I thought, but it was mostly because I stupidly forgot &lt;code&gt;FEATURES=keepwork&lt;/code&gt; on the environment (I wanted to get the object files output, as I want to see if the executable stack problems that affects Java are due to the architecture, or just a problem of not having the &lt;span class=&quot;caps&quot;&gt;GNU&lt;/span&gt; stack markings on the source files).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;And while looking at fixing this, and seeing a &lt;code&gt;tempnam()&lt;/code&gt; warning at linking stage, I ended up finding a tiny memory leak, as the string coming from tempnam() is never freed. I&amp;#8217;ve prepared a patch and sent it, hopefully to the right mailing list.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Other hacks that might be useful would be finding a way to enable or disable &lt;span class=&quot;caps&quot;&gt;ALSA&lt;/span&gt; and Motif bindings building, to reduce the size of the final output, and to avoid depending on those to build openjdk, but I wonder if Sun would ever accept such changes.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;When I&amp;#8217;ll be comfortable enough with both build system and development environment, I&amp;#8217;ll see to start working on building OpenJDK on FreeBSD; for what I can read on the build system mailing list, it should be possible, for now, to build OpenJDK using a &lt;span class=&quot;caps&quot;&gt;JDK 1&lt;/span&gt;.5, which &lt;strong&gt;is&lt;/strong&gt; available for Gentoo/FreeBSD, even if the best thing would be using 1.6. Probably I&amp;#8217;ll have to provide a openjdk-bin package for Gentoo/FreeBSD to use as a seed, afterward.. this of course if the license allows to do this (most of OpenJDK is &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt;-2, but there are some binary blobs still present, until they are replaced, it might not be possible to redistribute the binary itself).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately a big problem I have to face while hacking at this is that I don&amp;#8217;t have any Solaris/OpenSolaris installation, and I suppose that Sun will accept more willingly contributions that don&amp;#8217;t break their main target platform &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Now, of course, the reasons I have to find this project interesting and to revert my attitude toward Java are not limited to the simple &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt;-2 licensing. What I find more attractive, and makes me hope I&amp;#8217;m not mistaken on my judgement, is that now it would be possible to support more hardware platforms, making Java a true platform agnostic language (okay, Kaffe help a bit with this, but the results are not really at the same level), and will also allow to support more operating systems. And with more users&amp;#8217; contributions, it will probably also get better optimisations (hey we got guys like FFmpeg devs who are able to optimise the hell out of multimedia codecs, someone might find useful things to improve on OpenJDK too!).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;For what concerns Gentoo/FreeBSD, for sure FreeBSD guys have already some build definitions to support FreeBSD; the problem of those are that are likely not &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt;-2 as it is, as they were designed for previous &lt;span class=&quot;caps&quot;&gt;JDK&lt;/span&gt; versions, so I&amp;#8217;d rather not even look at them to avoid legal issues. The assembler code would likely be the same between Linux and FreeBSD, with the same architecture; for &lt;span class=&quot;caps&quot;&gt;SPARC&lt;/span&gt;, the code might be just taken out of the Solaris assembler sources, at least on i486, the assembler between Linux and Solaris doesn&amp;#8217;t change besides from a few minor places, and the main issue there is the difference in the assembler program used, and thus in the syntax.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Let&amp;#8217;s try to make Java a truly Free platform, and allow it to run on as many system as possible, then it might replace Flash and beat the heck out of Silverlight; Sun seems to be in the right mind set&amp;#8230; so waste no time!&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 09 May 2007 21:38:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/393-guid.html</guid>
    
</item>
<item>
    <title>Avoid SpamAssassin 3.2.0</title>
    <link>http://amarok.kde.org/blog/archives/392-Avoid-SpamAssassin-3.2.0.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/392-Avoid-SpamAssassin-3.2.0.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=392</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=392</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Seems like this release has some problems, I&amp;#8217;ve been seeing the Junk folder empty for the past few days, and I thought the problem was due to PostgreSQL update (that&amp;#8217;s also a damned update, but that&amp;#8217;s for another day). Seems like 3.2.0 instead is not scoring anything at all anymore.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Mails that are pure spam are not even considered by 3.2.0 as possible spam, marking them with a 0.0 score, while 3.1.8 finds them just fine.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I&amp;#8217;ve downgraded to 3.1.8 and I&amp;#8217;ll probably stick with that for a while.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Ah and forgot to count that the update channel for 3.2 is broken too, with two different bugs, so it can&amp;#8217;t even be updated.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I hope in a 3.2.1, but I won&amp;#8217;t count on it as it is.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;By the way, I got some progress on OpenJDK, I&amp;#8217;ll probably blog about that later or tomorrow.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 09 May 2007 18:36:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/392-guid.html</guid>
    
</item>
<item>
    <title>OpenJDK and Gentoo/FreeBSD</title>
    <link>http://amarok.kde.org/blog/archives/391-OpenJDK-and-GentooFreeBSD.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/391-OpenJDK-and-GentooFreeBSD.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=391</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=391</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;So, &lt;a href=&quot;http://planet.gentoo.org/developers/betelgeuse/2007/05/08/openjdk_ebuild&quot;&gt;Betelgeuse&lt;/a&gt; blogged about the new partly-free &lt;span class=&quot;caps&quot;&gt;JDK&lt;/span&gt; released by Sun Microsystems. Kudos to them for actually starting to fix the Java Trap. Hopefully in the next months we&amp;#8217;ll finally see Java taking the place it was designed for in development of platform-agnostic software, and applets in web pages, with the (hoped) availability of it on more platform that are available right now.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Of course I want to get OpenJDK working on Gentoo/FreeBSD as soon as possible, as the FreeBSD Foundation&amp;#8217;s &amp;#8220;Diablo&amp;#8221; project seems to be stale and broken (latest version is 1.5.0-7, I&amp;#8217;m not even sure if it&amp;#8217;s vulnerable, as I remember some security advisories for sun-jdk for Linux), and I wanted to move to Tomcat for my blog. So I asked Betelgeuse a bit of information about openjdk and downloaded the Java &lt;strong&gt;Experimental&lt;/strong&gt; overlay, and decided to merge openjdk on Linux first.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;To get it to work on Gentoo/FreeBSD the first thing is to get the Linux emulation support at least partly working, as a &lt;span class=&quot;caps&quot;&gt;JDK 1&lt;/span&gt;.7 is needed as a seed to build OpenJDK (this reminds me a lot of &lt;span class=&quot;caps&quot;&gt;GHC&lt;/span&gt; unfortunately). So I&amp;#8217;ll work on it until I can get OpenJDK building here.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately I can&amp;#8217;t build openjdk yet, the build fails with an &amp;#8220;Argument list too long&amp;#8221; error in an execve() call. I&amp;#8217;m not sure what causes it, but I hope to investigate it further in the near future (maybe I should ask Betelgeuse tomorrow after his exam).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Another problem I&amp;#8217;ve found with OpenJDK is that the build of hotspot mixes the values of &lt;span class=&quot;caps&quot;&gt;CFLAGS&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;CXXFLAGS&lt;/span&gt;, throwing a lot of warnings about &lt;code&gt;-Wno-pointer-sign&lt;/code&gt; and &lt;code&gt;-Wno-format-zero-length&lt;/code&gt; that I have in &lt;span class=&quot;caps&quot;&gt;CFLAGS&lt;/span&gt; and are not supported by &lt;span class=&quot;caps&quot;&gt;GNU C&lt;/span&gt;++ building. I&amp;#8217;ve tried fixing this one but I was unable to find the perfect patch to fix it, so I reported the bug with the tentative patch to Sun, hopefully they know their build system better than I do &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;When I&amp;#8217;m able to get OpenJDK building on Linux, and I understand the process well enough to work on it, then I&amp;#8217;ll try to do my best so that OpenJDK works on Gentoo/FreeBSD at the best I can. I&amp;#8217;m sure there are people from FreeBSD project working on it too, they did this already to get Diablo out, after all, but most of them don&amp;#8217;t blog so you can&amp;#8217;t really know what they are up to (beside if they are the same who would be releasing the new Diablos, they are probably missing in action for months now).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Who knows, maybe we&amp;#8217;ll be able to get OpenJDK working on Gentoo/FreeBSD/SPARC64 too, that would be neat &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; After all, FreeBSD and Solaris aren&amp;#8217;t that much different (as the DTrace and the &lt;span class=&quot;caps&quot;&gt;ZFS&lt;/span&gt; ports shows) and &lt;span class=&quot;caps&quot;&gt;SPARC64&lt;/span&gt; is supported by Sun for sure &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 08 May 2007 19:02:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/391-guid.html</guid>
    
</item>
<item>
    <title>The relaxing method failure</title>
    <link>http://amarok.kde.org/blog/archives/390-The-relaxing-method-failure.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/390-The-relaxing-method-failure.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=390</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=390</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Not sure if you remember, but I&amp;#8217;ve started, since a month and a half ago, trying to relax myself by playing with the Nintendo DS. When I bought I also bought Mario Kart DS (provided with the unit itself) and Pokémon Sapphire (for &lt;span class=&quot;caps&quot;&gt;GBA&lt;/span&gt;, but that was needed also to protect the &lt;span class=&quot;caps&quot;&gt;GBA&lt;/span&gt; card slot, as the pre-Lite version doesn&amp;#8217;t have a dustcover for it). I&amp;#8217;m the nerd kind of guy who actually &lt;strong&gt;like&lt;/strong&gt; the Pokémon series, and I was pretty happy to play it through the end; I&amp;#8217;ve played emulated the previous generations, this was the first time I could afford a game myself, and so I took the chance.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I don&amp;#8217;t actually like racing games, I got Mario Kart just because it was sold together with the unit, but I enjoyed it, especially to try out the Nintendo DS graphic which was quite nice. Of course after a while, playing only two games starts to be boring, so when I had the last cold I asked my syster to pick up Lego StarWars II for me.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Nice game, nice graphic, nice ideas&amp;#8230; too bad that starting from Episode V (the second of the three movies reproduced in the game), it starts to feel buggy.. there are times when you can end up stuck in a wall, requiring to end the mission and then restart from scratch. The game is nice so even if bugged, I continued playing, till in Episode &lt;span class=&quot;caps&quot;&gt;VI I&lt;/span&gt; got stuck in a big bug and I needed to search for the solution of the game to find how to pass that mission&amp;#8230; the solution also referred to the bug, so I did a bit of search, and I found that LucasArts admitted that the game, in its DS version, was shipped incomplete and unfinished. Nice one.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Oh well, as I said the game is interesting on its own so I don&amp;#8217;t feel like I totally wasted my money (I also got it relatively cheap), still I would have liked if Nintendo paid more attention to the title that are published worldwide, maybe putting a &amp;#8220;Notice: might contain annoying bugs&amp;#8221;  on the package&amp;#8230; okay I know it won&amp;#8217;t ever happen, but let&amp;#8217;s say that this game didn&amp;#8217;t relax me that much.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Then finally the game I was expecting was released, Yu-Gi-Oh Championship 2007, a nice game after all, although I don&amp;#8217;t play the &lt;span class=&quot;caps&quot;&gt;TCG&lt;/span&gt;, I found it quite interesting to play emulated before, so I gone for it as soon as it was available (via Amazon, as the local suppliers don&amp;#8217;t carry it), I received it last Saturday and I started playing around. The nice thing about this game is the online challenge, which finally allows me to play against human opponents: playing against the computer becomes just a run to a better deck every time until you can beat the next opponent.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;So there I go, I try to get some decent cards and start getting beaten up by human adversaries, I wasn&amp;#8217;t expecting anything different, but I wanted to see some more strategies before working out a deck that might work against the computer but not against an human.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;The online play is a nice thing, really cool especially since it&amp;#8217;s WiFi-based so you don&amp;#8217;t have to stay put while playing, and the stylus control in the game is well designed; but then I&amp;#8217;ve started feeling bothered by the repeated &amp;#8220;communication errors&amp;#8221; I started getting during games.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;First I thought it was truly random, then I&amp;#8217;ve seen it happened mostly when I was leading the game.. I thought of a coincidence, but when it happened after I &lt;strong&gt;did&lt;/strong&gt; win the game, the opponent coming to 0 life points&amp;#8230; I was sure the thing was not that random.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Now, of course Konami can&amp;#8217;t disallow people from closing their connection, or powering off the DS when they see they are losing, but&amp;#8230; they could at least assign you the bonus points for the match, or at least the 10 match points you get for playing online, when the adversary fails to complete the game!&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Even if I like the game, I&amp;#8217;m tempted to ask Konami my money back, online playing is poorly designed.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 07 May 2007 20:56:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/390-guid.html</guid>
    
</item>
<item>
    <title>Proceeding with xine</title>
    <link>http://amarok.kde.org/blog/archives/384-Proceeding-with-xine.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/384-Proceeding-with-xine.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=384</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=384</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;My changes to xine in the audio conversion branch are improving step by step; now all the decoders should playback fine, with their maximum resolution, by using the 32-bit floating point format as highest upscale. &lt;span class=&quot;caps&quot;&gt;AC3&lt;/span&gt; files are still a problem, although thanks to moesaji I now know that the mysterious function reduces the value basically by a value of 383 units; it&amp;#8217;s still a mystery to me as I have no idea why that happens, and I can&amp;#8217;t seem to find any documentation about these magic numbes for other stuff but a52dec.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Anyway, beside a52dec, most of other decoders are already fixed for the new interface, and I&amp;#8217;ve started working on updating the &lt;span class=&quot;caps&quot;&gt;ALSA&lt;/span&gt; audio output plugin; unfortunately the code of that plugin is ugly and complex, and seems to be a great big compendium of bad code style. With my changes in the audio conversion branch, the size of the initialisation function was reduced by 1KB, which is far from being small. It should also reduce the number of strings to translate, as I&amp;#8217;ve used two loops rather than unrolling the tests for the capabilities of &lt;span class=&quot;caps&quot;&gt;ALSA&lt;/span&gt; devices, which then condensed the number of strings to translate (they are composed during output, rather than being complete literals).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Hopefully the audio conversion branch will be merged into 1.2 series as soon as all the audio output plugins are converted, and a few more audio conversions routines are written. As the conversions are all limited to a single source file, it should also be quite easy to write more optimised routines using &lt;span class=&quot;caps&quot;&gt;SIMD&lt;/span&gt; extensions for various architectures.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;By working on this I ended up applying a few changes to 1.2 series itself already, by removing a few members from the decoder&amp;#8217;s state structure for many plugins, and putting them into the functions they are used (why declare them in a state structure that is allocated in heap and passed, by pointer, everywhere, when they are used only in a single function? Sometimes even in a single &lt;em&gt;branch&lt;/em&gt; of a given function.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;The nice parts are that for instance &lt;span class=&quot;caps&quot;&gt;NSF&lt;/span&gt; files now playback with a smaller memory footprint, as the buffer is allocated only when needed, and in the audio conversion branch also reduces the whole xine-lib memory footprint by two megabytes, this result means that to playback an mp3 file, xine-lib-1.2-audio-conversion takes &lt;strong&gt;half&lt;/strong&gt; the memory xine-lib-1.1 takes! It&amp;#8217;s incredible, but it&amp;#8217;s true.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;There are a lot more improvements that I hope to push into xine-lib-1.2, one of these is the splitting out of the modplug demuxer on its own plugin, so that binary distributions can just package it separately, allowing users wanting mod playback to actually get it, and saving the ones who cares not about mod files from having to initialise libmodplug every time (it takes quite a bit of &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; time, because of the calculation of the samples, I think I&amp;#8217;ll post some images about this in the next days).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Oh and I&amp;#8217;m actually thinking of reducing even more the code present in the decoders, by handling also the downmixing into the audio output loop (currently at least &lt;span class=&quot;caps&quot;&gt;A52&lt;/span&gt;, DTS and Vorbis decoders contains the code to handle that) and by providing the code to handle also channels&amp;#8217; interleaving, as currently the same plugins also contain the same code, once again.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;This again is to allow providing optimisations if possible, although I admit I&amp;#8217;m not sure which kind of optimisation can be handled here. Still, it should be better to only have a copy of the code, rather than an undefined number&amp;#8230;&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 04 May 2007 07:39:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/384-guid.html</guid>
    
</item>
<item>
    <title>The mystery of the a52dec decoded samples</title>
    <link>http://amarok.kde.org/blog/archives/375-The-mystery-of-the-a52dec-decoded-samples.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/375-The-mystery-of-the-a52dec-decoded-samples.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=375</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=375</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;I&amp;#8217;ve been working a lot on the audio conversion code for xine-lib, with results that are always more satisfying, although Amarok fails to build on this new version, audio playback improved a lot, and with the code being all self-contained, the option of replacing the functions with more optimised code, using &lt;span class=&quot;caps&quot;&gt;MMX&lt;/span&gt;, SSE, AltiVec or whatever other &lt;span class=&quot;caps&quot;&gt;SIMD&lt;/span&gt; extension is more feasible.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately I&amp;#8217;ve hit one issue: beside &lt;span class=&quot;caps&quot;&gt;A52&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;DTS&lt;/span&gt; having a channel order different than most of other formats, I have an issue with the type of the decoded samples. There&amp;#8217;s a function called &lt;code&gt;float_to_int()&lt;/code&gt; that I supposed truncated the floating-point values to get 16-bit signed integer samples (that were the only format supported by xine before), but the floats themselves don&amp;#8217;t play at all, while floating-point data plays fine for most other formats. I had to look up a lot of documentation to find for sure that floating-point samples, like I supposed before, varies in the interval [-1.0,1.0], so I was doing it alright up to now.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Now, if someone has any idea on what the following code does, I&amp;#8217;d be glad to know it. The &lt;code&gt;blah()&lt;/code&gt; function (with the same name) is present in xine, MPlayer, FFmpeg, and renamed in Ogle and other software too.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;typocode&quot;&gt;&lt;pre&gt;&lt;code class=&quot;typocode_default &quot;&gt;#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static inline int16_t blah (int32_t i) {&lt;br /&gt;
  if (i &amp;gt; 0x43c07fff)&lt;br /&gt;
    return 32767;&lt;br /&gt;
  else if (i &amp;lt; 0x43bf8000)&lt;br /&gt;
    return -32768;&lt;br /&gt;
  else&lt;br /&gt;
    return i - 0x43c00000;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main() {&lt;br /&gt;
  uint8_t val_1[4] = { 0xFF, 0xFF, 0xBF, 0x43 };&lt;br /&gt;
&lt;br /&gt;
  return printf(&amp;quot;%f\n%d\n&amp;quot;, *(float*)(&amp;amp;val_1), blah(*(int32_t*)(&amp;amp;val_1)));&lt;br /&gt;
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;The output (on Little-Endian, as val_1 is the byte representation of a float number in Little-Endian) is: 383.999969 and -1; it makes no sense to me, but maybe someone else has a clue..&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;And for who&amp;#8217;s wondering, the byte-value I chosen there is one of the samples decoded by a52dec, so it&amp;#8217;s a proper value I&amp;#8217;m trying to understand; and for who&amp;#8217;s wondering, the proper correspondence for -1 (int16) in float32 format is (approximated) -3.0517e-05.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; thanks Nathan Smith who made me see the spelling error in the title (I still confuse the two).&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 02 May 2007 13:48:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/375-guid.html</guid>
    
</item>
<item>
    <title>Audio conversion flies!</title>
    <link>http://amarok.kde.org/blog/archives/376-Audio-conversion-flies!.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/376-Audio-conversion-flies!.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=376</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=376</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;After a week spent closing envelopes and attaching labels, I was finally able to get the audio conversion branch of xine-lib 1.2 to play mp3s.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;As libmad decodes the mp3s as 32-bit signed integer samples, the direct output cannot be sent directly to PulseAudio when playing it back (and PulseAudio is the only audio output I converted to the new plugin &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;), so I had to actually implement at least some basic conversion, in this case from almost every integer format to 32-bit floating point samples (which is the simplest conversion, although it&amp;#8217;s &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; consuming.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Previously every mp3 file decoded with libmad was truncated to 16-bit signed integer samples, losing precision, and for what I can see amplifying the volume quite a bit, distorting the signal, but with my new code, there&amp;#8217;s no precision loss, and the difference is audible.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;You can see the difference in the following screenshot:&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;&quot; class=&quot;flickrplugin&quot;&gt;&lt;a href=&quot;http://www.flickr.com/photos/flameeyes/475655629&quot;&gt;&lt;img src=&quot;http://farm1.static.flickr.com/222/475655629_6e25caa4e0.jpg&quot; width=&quot;500&quot; height=&quot;273&quot; alt=&quot;xine-audio-conversion.jpg&quot; title=&quot;xine-audio-conversion.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;If you look at the screenshot you will see the stream info dialog windows of xine-ui: on the left there&amp;#8217;s the window for xine-lib 1.1 while on the right there&amp;#8217;s the one for xine-lib 1.2 audio_conversion branch. As you can see at the bottom of the window, the first one reports 16-bit for the stream, while the new one returns 32-bit as intended.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I can tell you, the difference is great, and this is just the first step! Hopefully it will be merged in xine-lib-1.2 and then it will be able to play hi-fidelity wave files just fine.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately before I can actually merge this branch into main xine-lib-1.2, all the output plugins, the post plugins and most of the audio decoding plugins have to be ported, which is a &lt;span class=&quot;caps&quot;&gt;HUGE&lt;/span&gt; amount of work for just one person. I&amp;#8217;d also require to use some virtual machines to confirm most of the output plugins work afterward, so it will take me &lt;strong&gt;a lot&lt;/strong&gt; of time alone. If you can handle converting and testing the code, that will certainly be appreciated.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sat, 28 Apr 2007 12:01:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/376-guid.html</guid>
    
</item>
<item>
    <title>Self-signed certificates on the E61: failed.</title>
    <link>http://amarok.kde.org/blog/archives/377-Self-signed-certificates-on-the-E61-failed..html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/377-Self-signed-certificates-on-the-E61-failed..html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=377</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=377</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;I&amp;#8217;m not sure if you remember, but last Christmas I &lt;a href=&quot;http://farragut.flameeyes.is-a-geek.org/articles/2006/12/24/holiday-time&quot;&gt;blogged&lt;/a&gt; about my need to find a way to allow my smartphone (a Nokia &lt;span class=&quot;caps&quot;&gt;E61&lt;/span&gt;) to automatically accept the  certificate file for my &lt;span class=&quot;caps&quot;&gt;IMAP&lt;/span&gt; server, to avoid having to accept it every time when I want to check my mails.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Well, I originally thought it was just a problem of format, as a lot of places on the net talked about the need to convert the &lt;span class=&quot;caps&quot;&gt;PEM&lt;/span&gt; certificate to a &lt;span class=&quot;caps&quot;&gt;DER&lt;/span&gt; certificate, and then download it with the internal browser from a properly-configured webserver (properly meaning the certificate is served with the mime-type application/x-509-ca-cert), but then it wasn&amp;#8217;t enough, I thought it was a problem of size of the certificate (over 1024 bits it doesn&amp;#8217;t seem to be supported) but it wasn&amp;#8217;t the case either, and the last idea I had was that the problem was with the firmware version.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately last month when I asked a friend of mine to help me updating the firmware on the phone, the download process on his laptop (with Windows XP) took more than three hours, then we shut everything down, as it was coming late, and the download wasn&amp;#8217;t complete yet. I tried upgrading through a (demo) version of Parallels Desktop for Mac &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt;, but it didn&amp;#8217;t help either, today I tried on vmware-server, and there it worked fine, without the problems with disconnection and reconnection of the &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; device that Parallels suffered from (probably while the device was being reconfigured to provide a different interface to check the phone model, serial and firmware). The firmware upgrade process went fine and easy, in about thirty minutes just like Nokia wrote on the site, I&amp;#8217;m not sure what was wrong with my friend&amp;#8217;s laptop, nor I care much at this point, if I have to be blunt.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;But, not even the firmware update helped me.. so I decided to investigate further: the posts on the web about the configuring the &lt;span class=&quot;caps&quot;&gt;E61&lt;/span&gt; (or the &lt;span class=&quot;caps&quot;&gt;USA&lt;/span&gt;-marketed &lt;span class=&quot;caps&quot;&gt;E62&lt;/span&gt;, which should just be a crippled version of mine) mixes information about the addition of extra Certificate Authority certificates with requests for help with self-signed certificate. As soon as I considered this, light shed into my mind and I found the problem: &lt;strong&gt;the Nokia &lt;span class=&quot;caps&quot;&gt;E61&lt;/span&gt; does not support self-signed certificates&lt;/strong&gt;; this is an absolute, and there doesn&amp;#8217;t seem to be a way to get around this. What you can do instead is create your own Certificate Authority, load that certificate on the smartphone, and then use it to generate your own &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt; certificate; this solved the problem for me entirely.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;If you need an easy way to build a certificate authority certificate, and to create a new certificate signed with that, you might want to look in the openvpn&amp;#8217;s sources&amp;#8217; tarball, that contains an easy-rsa directory with a series of scripts that really helps on that matter.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;By the way, the reason why I updated firmware was also to enable the VoIP features, so that I can have a landline-like number routed on my phone while I&amp;#8217;m at home (or anywhere where a &lt;span class=&quot;caps&quot;&gt;WLAN&lt;/span&gt; can be found) allowing me to receive calls directly without passing through my family&amp;#8217;s number.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 27 Apr 2007 14:16:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/377-guid.html</guid>
    
</item>
<item>
    <title>usb.ids, is it still maintained?</title>
    <link>http://amarok.kde.org/blog/archives/378-usb.ids,-is-it-still-maintained.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/378-usb.ids,-is-it-still-maintained.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=378</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=378</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Classically, usb.ids file can be found at &lt;a href=&quot;http://www.linux-usb.org/usb.ids;&quot;&gt;http://www.linux-usb.org/usb.ids&lt;/a&gt; unfortunately there doesn&amp;#8217;t seem to be any more updates after last December. I sent to Vojtech a few patches to add the devices I have here at home, but I didn&amp;#8217;t get an answer (I know Vojtech usually answers in a day or two).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Since I hate seeing stuff getting obsoleted so easily, I&amp;#8217;ve decided to add a bunch of devices to usb.ids, fix an entry (the one for &lt;span class=&quot;caps&quot;&gt;APC&lt;/span&gt; UPSes, as now I have two of them to cope with), and maintain my own copy of usb.ids.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Most of the devices I&amp;#8217;ve added are things that I have here at home, but they are not limited to, I&amp;#8217;ve added some &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; sticks of friends of mine who happened to pass by here, and an entry for a Microsoft mouse from Timothy. I suppose that while usb.ids is not fixed in the original location, I can continue maintaining it for my systems at least, by changing the cron jobs&amp;#8217; path to fetch from (it&amp;#8217;s also pretty much useless to download the same usb.ids every month).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;So my copy of usb.ids is located at &lt;a href=&quot;http://dev.gentooexperimental.org/~flameeyes/usb.ids&quot;&gt;http://dev.gentooexperimental.org/~flameeyes/usb.ids&lt;/a&gt; (thanks &lt;a href=&quot;http://gentooexperimental.org/~patrick/weblog/&quot;&gt;Patrick&lt;/a&gt; for the hosting, which I&amp;#8217;m also using for a few other stuff like dist tarballs); if you want to add more devices to the list, feel free to mail me at flameeyes@gmail.com with a diff -u, or simple the vendor and product ids of the device, and the complete naming of it.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I know the hardware from the MacBook Pro is missing, I&amp;#8217;ll see to add those the next time I boot the laptop on Linux.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 26 Apr 2007 17:09:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/378-guid.html</guid>
    
</item>
<item>
    <title>Laptop policies on a workstation</title>
    <link>http://amarok.kde.org/blog/archives/379-Laptop-policies-on-a-workstation.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/379-Laptop-policies-on-a-workstation.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=379</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=379</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;As I bought the new &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt;, I now have quite some time to work with it while I&amp;#8217;m without power, as the two UPSes can keep the system online for about one hour without any kind of interruptions, included network access. This is quite nice, but there is one thing I was thinking of today&amp;#8230;&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;When the workstations are running on &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt;&amp;#8217;s battery power, it&amp;#8217;s comparable to a laptop running on battery, so I could be just using the same method laptops use: reduce the frequency of the &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt;. At least Enterprise is able of &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; frequency scaling, so I&amp;#8217;ve configured it to switch to power saving profile when the onbattery event is received by apcupsd.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;It was actually quite simple, first of all apcupsd runs as root (although it should drop all privileges, but I&amp;#8217;m not sure about it), and I have powersave installed and configured to handle this, so I just changed the &lt;code&gt;/etc/apcupsd/onbattery&lt;/code&gt; and &lt;code&gt;/etc/apcupsd/offbattery&lt;/code&gt; scripts to add a call to powersave binary, with &lt;code&gt;-e Powersave&lt;/code&gt; on the onbattery event and &lt;code&gt;-e Performance&lt;/code&gt; on the offbattery event; unfortunately I don&amp;#8217;t think there is anything else beside slowing the &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; speed during &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt; battery supply that can be done on a Workstation &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Now I&amp;#8217;m going to look to split the connection of the power cables in my home office so that the hardware that would just go in standby while I&amp;#8217;m sleeping would be connected to a single multi-socket, which can be disconnected at once, to avoid leaving the hardware consuming power without any reason. I&amp;#8217;d like to be able to do the same with the monitors (that otherwise would remain in standby as they can&amp;#8217;t be shut down. If I wasn&amp;#8217;t using the same &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt; for both networking and monitors, I could probably use the &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt; to shut them down and turn them back on at my command.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Sigh, I&amp;#8217;m afraid there will be a looot of work to do, and I&amp;#8217;m sealing envelopes, once again &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 25 Apr 2007 10:02:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/379-guid.html</guid>
    
</item>
<item>
    <title>A nice productive day</title>
    <link>http://amarok.kde.org/blog/archives/380-A-nice-productive-day.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/380-A-nice-productive-day.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=380</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=380</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;I might be sick, or just crazy, or both of them, but I still think I&amp;#8217;m quite more productive when I have fever, or the days around that time. Yesterday I had fever, and I was knock out till late afternoon, but then I started feeling better, and I started producing.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;First of all, rbot&amp;#8217;s init script in my overlay has been updated: Subversion trunk will now create a rbot.pid file inside the bot&amp;#8217;s directory without need for &lt;code&gt;start-stop-daemon&lt;/code&gt; to create it itself, which means I can finally let rbot fork on its own rather than forcing it to background (which is not really a good thing to do, if it can be avoided). Thanks to tango and jbn for looking after my raw patch.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Then I decided to finish the work with apcupsd; again in my overlay you can find a new ebuild for 3.14.0 based on the one found on bugzilla, but with a new apccontrol file and a totally renewed init script. This script can be multiplied, which means you can have a &lt;code&gt;/etc/init.d/apcupsd.foo&lt;/code&gt; link, which would then start apcupsd looking for &lt;code&gt;/etc/apcupsd/foo.conf&lt;/code&gt; configuration file. Thanks to apcupsd authors for implementing this feature in 3.14!&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I&amp;#8217;ve also attached the two UPSes to Farragut instead of Enterprise, as the latter is not a server and might as well be offline when Farragut is still up (for instance this is the case most of the times I&amp;#8217;m outside for the whole day, or if there is noone at home); apcupsd on FreeBSD works nicely, and doesn&amp;#8217;t require any fiddling with configuration, neither kernel side (the ugen support is built by default) nor with permissions (as the default is to run as root, this might change in the future, but as it is it&amp;#8217;s fine to me; I&amp;#8217;ll be working on a better handling of permissions on device nodes for Gentoo/FreeBSD, but it&amp;#8217;s not in my priority list at the moment). Also here, they work perfectly fine.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I was also able to fix a bug in xine-lib, with mp4/mov files playback that used version 1 rather than version 0 of the media header atom, such as files generated by FFmpeg. The bug was reported on sourceforge already but I wasn&amp;#8217;t sure what it actually meant and where to find a sample file; when I generated the same condition by chance here, I decided to take a deeper look; unfortunately MultimediaWiki doesn&amp;#8217;t provide much information about that, but I asked Mike to give me an account there so I can try to write something useful, maybe next time someone else needs a mdhd atom description they won&amp;#8217;t have to look at the sources of FFmpeg to see how it&amp;#8217;s read and generated.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Then tonight I wanted to resume my work on implementing audio conversions inside the audio output loop instead of doing it for every decoder; it&amp;#8217;s an hard work as it probably will require rewriting a good deal of code, but it should be rewarding once it&amp;#8217;s done. Right now there are a bunch more of flag values for capabilities, so for instance I can say if a drivers supports integer or float 32-bit samples, 64-bit samples, and if it can accept streams in a different endianness. This is important because there&amp;#8217;s little point in doing the job of the output plugin, that might handle that transparently, for instance a big-endian stream might be decoded on a little-endian machine, then sent through PulseAudio to a big-endian machine where it will be reproduced: in this setup, xine&amp;#8217;s endian reversal of the stream (from big to little endian) would have been superfluous, as PulseAudio would have accepted the big-endian samples, then sent them to the other machine that needed not to reverse them to reproduce them.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Anyway, right now the code is quite fragile, there&amp;#8217;s no conversion being done, there are mostly only things that are totally broken out, there are asserts @1 == 0@ used to mark the code that needs to be rewritten. &lt;strong&gt;But&lt;/strong&gt; something works: I was able to remove a lot of code from the musepack decoder, as libmpcdec always produces 32-bit native-endian (or maybe little-endian, I&amp;#8217;m not yet sure) floating point samples; previously the decoder converted all the samples back to 16-bit format, and then gave it to the audio output loop to handle? now instead it sends them directly to the output, and as PulseAudio supports 32-bit float samples, they are not converted and play back fine.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Tomorrow I&amp;#8217;ll see to work a way to handle upsamping and downsampling of streams, the problem is that it&amp;#8217;s not trivial to decide what to do: if a plugin supports 32-bit integer samples, but not 24-bit integer samples, it should probably upscale the 24-bit to 32-bit to avoid losing precision; if it doesn&amp;#8217;t it might upscale it to 32-bit float, or maybe downscale it to 16-bit integers. The same applies to channel mode, if the driver doesn&amp;#8217;t support stereo output, should it be updated to 4.0 or should it be downgraded to mono?&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;For sure this time I&amp;#8217;m very happy of being working on branches: leaving the code broken for weeks, maybe months, is not something you want to do on the main development branch. And I mean it, because with the changes I&amp;#8217;m doing, not only I&amp;#8217;ll be changing the &lt;span class=&quot;caps&quot;&gt;ABI&lt;/span&gt; of the library itself (well, actually not much, just a couple of structures), but more importantly I&amp;#8217;ll be changing the audio output plugins &lt;span class=&quot;caps&quot;&gt;API&lt;/span&gt;, as I need to feed them a sample format rather than a bits-per-sample size.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Anyway, this is not going to be something easy to complete, but it &lt;strong&gt;will&lt;/strong&gt; be a noticeable improvement for Amarok users once done, especially because I want to make sure that the capabilities for &amp;#8220;mixer&amp;#8221; volume and &amp;#8220;PCM&amp;#8221; volume are cleared up, probably by deprecating one of them, so that Amarok can be changed &lt;strong&gt;not&lt;/strong&gt; to use xine&amp;#8217;s software amplification (which also sucks and I also need to rewrite in good part in this branch) if the output plugin actually supports a per-stream volume (like PulseAudio).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Sponsoring, bribing, and comfort words are welcome, as xine-lib&amp;#8217;s audio_out code is giving me creeps.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sat, 21 Apr 2007 21:03:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/380-guid.html</guid>
    
</item>
<item>
    <title>Downtime and new UPS</title>
    <link>http://amarok.kde.org/blog/archives/381-Downtime-and-new-UPS.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/381-Downtime-and-new-UPS.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=381</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=381</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Sorry for the downtime guys, the update to baselayout 2 on Farragut wasn&amp;#8217;t as easy as expected, I have some talk to do with Roy about it &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Now, this is probably going to be the fourth night I&amp;#8217;m not gonna sleep well, today I had a support request to take care of in the afternoon and I was supposed to go out with a few friends tonight, but I was so tired that I started having fever, so I had to get a raincheck for that.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;The good news is that I received the new &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt;, an &lt;span class=&quot;caps&quot;&gt;APC&lt;/span&gt; SmartUPS 1000VA, that seems to be able to take enterprise and farragut up for 1 hour and a quarter, which is quite good (the other &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt; would take the monitors and the network equipment up for also an hour, which is not bad, and should cover most of short-time non-planned outages.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately, if you have followed me for a while, you know there&amp;#8217;s no flawless hardware acquisition for me; this time the problem comes from the software needed to control the &lt;strong&gt;two&lt;/strong&gt; UPSes; please note that there are two.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;First of all, when I started using an &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt;, I used apcupsd but then I moved to nut because it had a decent graphical control software (knutclient); what was the problem with this? Well, nut was confused by the two UPSes, that being both &lt;span class=&quot;caps&quot;&gt;APC&lt;/span&gt;, shares the same identical vendor and product ID for the &lt;span class=&quot;caps&quot;&gt;USB&lt;/span&gt; device. So it was not a nice thing.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I&amp;#8217;ve then decided to come back to apcupsd, but the latest version is not in portage (again) so I bumped it locally with the patch on Bugzilla, and added a gnome useflag for the graphical control utility that is now present. This version is important to me, not only because of the utility, but also because with this version is possible to choose the configuration file at runtime, as it&amp;#8217;s not hardcoded during build.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;This is also important because in previous versions the only way to have more than one &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt; being monitored on the same box with apcupsd required to have two different builds on different places. What I want to do now is to rewrite the init script so that it is multiplexed (like rbot, mt-daapd, openvpn and so on), that way I can simply start two apcupsd instances to have all I need (note that one of them won&amp;#8217;t be shutting off my box at all, as it would just keep monitoring the &lt;span class=&quot;caps&quot;&gt;UPS&lt;/span&gt; that is actually connected to the monitors and networking.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Once Baselayout 2 is more functional on Farragut, I&amp;#8217;ll probably move apcupsd instances there, and network it down here, it would be safer on the long run as enterprise might not be up when farragut is.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I still haven&amp;#8217;t been able to finish working on rbot&amp;#8217;s changes I need, sigh. And don&amp;#8217;t get me started on xine-lib, I&amp;#8217;m taking a few days off because what I found myself working on now is a veeery bad thing I&amp;#8217;m afraid&amp;#8230;. (bit per sample transcoding during output).&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 20 Apr 2007 19:57:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/381-guid.html</guid>
    
</item>
<item>
    <title>About libdvdnav and xine</title>
    <link>http://amarok.kde.org/blog/archives/373-About-libdvdnav-and-xine.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/373-About-libdvdnav-and-xine.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=373</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=373</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Don&amp;#8217;t worry all you people, I wasn&amp;#8217;t killed in a bus accident yet; you are lucky, I actually go out quite rarely so I don&amp;#8217;t suffer from this kind of problems very often, the worst that can happen would be a health problem, but I&amp;#8217;m lucky enough to feel decently well at the moment &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; Of course there is too much heat for my liking and I start to feel how annoying it is at this temperature, especially staying in my home office with two/three boxes online.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Anyway, as I promised, I started looking at the fork of libdvdnav lead by Nico, to import a newer version of libdvdnav in xine, and cleaning up the patches applied.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Unfortunately it wasn&amp;#8217;t exactly straightforward to update the libdvdnav version; beside my will to move the sources into the &lt;code&gt;contrib/&lt;/code&gt; subdirectory as I already did for libmpcdec and ffmpeg, Nico started to replace autotools with a build system alike to FFmpeg&amp;#8217;s (which is quite fine by me, as I can integrate it nicely enough into xine-lib), so I had to make sure that the build system was up to a minimum support for the features I needed. The main showstopper was the lack of a way to build in a directory different from the original sources directory, but that was quite easy to handle.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;But luckily working with Nico is quite enjoyable &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; All the patch I&amp;#8217;ve sent for inclusion up to tonight (so excluding the one I sent less than an hour ago) were accepted and committed to the Subversion repository, which means that the build system is usable from xine-lib&amp;#8217;s custom base system, that the compiler flags we inject are respected, that the library builds with &lt;code&gt;-Werror-implicit-declarations&lt;/code&gt; (the change was needed to libdvdread, Nico took care of sending it up there).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Tonight I rebuilt xine-lib-1.2 with the new libdvdnav, and it&amp;#8217;s working nicely. I suppose the reason why external libdvdnav is not working on seeking is that the code was present in cvs (for sf.net&amp;#8217;s dvd project) but not released yet. I should probably also add support for .pc files for libdvdnav and then use those to check for its presence, so to require at least a new enough version that doesn&amp;#8217;t have seeking problems, but that is not a priority until a release is done.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;There is only one problem that has to be considered: the libdvdnav copy in xine-lib is patched with a patch from Bastien Nocera (Totem&amp;#8217;s author) which is used to play invalid DVDs (non-encrypted &lt;span class=&quot;caps&quot;&gt;ISO&lt;/span&gt; filesystem DVDs; proper DVDs have &lt;span class=&quot;caps&quot;&gt;UDF&lt;/span&gt; as file system). That patch as it is won&amp;#8217;t be accepted by libdvdnav authors, and sincerely I wouldn&amp;#8217;t have accepted it for xine-lib either.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Why this? Well, the patch takes an opaque type, and makes it transparent, copying out of libdvdcss the structure definition. This is fine as long as the structure is not changed on libdvdcss, but the reason why a type is opaque, is just so that you don&amp;#8217;t have to put its definition in the &lt;span class=&quot;caps&quot;&gt;ABI&lt;/span&gt;, so you can change it without having to deal with software crashing because it was compiled against the previous definition. This patch breaks this assumption with xine, so it&amp;#8217;s bad from a good practices point of view.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I&amp;#8217;m not sure myself how much sense does it make to use such a stupid solution (sorry Bastien, but re-declaring an opaque type is a stupid solution) to consider invalid media. A better solution would be to always use the files if they are found, rather than using &lt;span class=&quot;caps&quot;&gt;UDF&lt;/span&gt; access, with fallback to raw &lt;span class=&quot;caps&quot;&gt;UDF&lt;/span&gt; instead. This &lt;strong&gt;should&lt;/strong&gt; work, but I need first some media to test with, and then I have to understand libdvdnav code.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Anyway, the build framework changes are now committed to the xine-lib-1.2-newdvdnav branch, the &amp;#8220;only&amp;#8221; thing missing there is the libdvdnav code itself; the reason for this is that up to tonight I was still working with patched sources, not with upstream sources, and I wanted to avoid recommitting everything every time. I will probably wait as much as I can before committing the sources themselves, with this &amp;#8220;as much as I can&amp;#8221; representing ideally the time till I get to have committed to libdvdnav all the changes that make sense for xine-lib (revised Bastien&amp;#8217;s patch, and the file descriptor leak patch).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I also want to thank Nico for the work being done toward adding an option to use external libdvdread in libdvdnav, which will certainly help Gentoo and other distributions: you wouldn&amp;#8217;t have to duplicate the code between libdvdnav and libdvdread; you&amp;#8217;d have one more dependency in the libdvdnav library, but that shouldn&amp;#8217;t be much overhead.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;And I want to say it officially: there is a lot of code in xine-lib that scares the hell out of me, and I would like to see it killed before it propagates too much; unfortunately overhauling all of it is difficult alone, especially since I might end up having repercussions that I don&amp;#8217;t see (like the &lt;span class=&quot;caps&quot;&gt;CDDA&lt;/span&gt; failure that didn&amp;#8217;t fail for me when I tested &amp;#8211; I was using by-extension detection in Amarok &amp;#8211; and the &lt;span class=&quot;caps&quot;&gt;DVD&lt;/span&gt; failure that still I was unable to reproduce till at least since Darren fixed it).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I start hating spending my time on xine, I hope to be able to continue working on it till it&amp;#8217;s enjoyable to do so.&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 17 Apr 2007 19:03:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/373-guid.html</guid>
    
</item>
<item>
    <title>More progress for XDG support in xine</title>
    <link>http://amarok.kde.org/blog/archives/370-More-progress-for-XDG-support-in-xine.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/370-More-progress-for-XDG-support-in-xine.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=370</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=370</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Returning on yesterday&amp;#8217;s blog entry, today I&amp;#8217;ll see to update you on the status of xine-lib&amp;#8217;s &lt;span class=&quot;caps&quot;&gt;XDG&lt;/span&gt; support.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Thanks to Mark Nevill, I didn&amp;#8217;t have to reinvent the wheel by parsing the various &lt;span class=&quot;caps&quot;&gt;XDG&lt;/span&gt;_ variables to check for the directories I have to search in; he already wrote a libxdg-basedir library that takes care of most of it, allowing me to take care of the implementation details.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Now, xine-lib-1.2 branch has an internal copy of libxdg-basedir (two source files, so it&amp;#8217;s not a big deal, and I&amp;#8217;ve added a switch to use the external copy of it if needed), and uses it to decide where to read and write some files.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;For instance, the plugins cache is no more in &lt;code&gt;~/.xine/catalog.cache&lt;/code&gt; but it&amp;#8217;s in &lt;code&gt;$XDG_CACHE_HOME/xine-lib/plugins.cache&lt;/code&gt; which both makes more sense and can be decided by user to be moved out of its home (for instance I change the value to &lt;span class=&quot;caps&quot;&gt;XDG&lt;/span&gt;_CACHE_HOME, but that&amp;#8217;s a topic for another post). The &lt;span class=&quot;caps&quot;&gt;CDDB&lt;/span&gt; cache is also moved on the cache home, while the fonts are now discovered in the &lt;span class=&quot;caps&quot;&gt;XDG&lt;/span&gt;_DATA_DIRS defined paths. Darren also moved channels.conf load from &lt;code&gt;~/.xine&lt;/code&gt; to &lt;span class=&quot;caps&quot;&gt;XDG&lt;/span&gt;_CONFIG_HOME, which means it&amp;#8217;s loaded in ~/.config/xine-lib by default.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Please note that I&amp;#8217;ve been using xine-lib all over rather than xine, so that users know what is generated/handled by the frontends and what is actually part of the library, if they care.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;There are still a few changes pending, for instance Darren wants to support loading of a system-level channels.conf, so that it can be put in &lt;code&gt;/etc/xdg&lt;/code&gt; and used for all users without having to put it in xine&amp;#8217;s configuration for every user.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;I&amp;#8217;ve also decided to pay more attention to the security side of xine-lib, for instance, after talking with Taviso today, I&amp;#8217;ve added a &lt;code&gt;xine_xcalloc&lt;/code&gt; function to wrap around &lt;code&gt;calloc&lt;/code&gt;, which should avoid possible overflows (there was one in input_dvb); I&amp;#8217;ve changed some of the code, but of course it&amp;#8217;s not totally cleaned up. xine-lib really should be audited piece by piece for improvement, every time I touch something I end up cleaning it up by adding more &lt;code&gt;const&lt;/code&gt; keywords (trying to let the compiler optimise a bit more) and adding/removing/cleaning up code .&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;One thing that certainly would help would be to put a better wall between contributed code (where we should always do the work on upstream&amp;#8217;s side and then merge it back into xine-lib, to avoid getting them out of sync, unless fixing some xine corner case or similar&amp;#8212;although there it could certainly help to put a proper wrapping around the two), and the xine proper code that should fixed/cleaned/improved as we go.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Really, while xine actually do its job most of the times, it still suffers from a lot of possible problems just because the code is too old and stratified. I think I should simply undergo an audit file per file trying to fix stuff while I also update the documentation to be doxygen-compatible, but that&amp;#8217;s going to take so much time that I&amp;#8217;m not sure how realistic is to work on it; beside I don&amp;#8217;t have hardware such as a &lt;span class=&quot;caps&quot;&gt;DVB&lt;/span&gt; tuner that would allow me to complete the audit (I can&amp;#8217;t try that code and I can&amp;#8217;t ensure its working state).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;On the other hand, tonight I fired up Klothos again; it has been some time since I&amp;#8217;ve done any Gentoo/*BSD work, but I&amp;#8217;ve lately asked Roy to put me back in bsd@gentoo.org alias, to see if there is work that needs to be done that I can do. Yes, I suppose I&amp;#8217;m considering coming back, but if I will do that, it will be on a lower profile; maybe I&amp;#8217;ll help Mike, Frysinger, SpanKY and vapier with the &lt;span class=&quot;caps&quot;&gt;ARM&lt;/span&gt; architecture, maybe I&amp;#8217;ll just decide to take care of &lt;span class=&quot;caps&quot;&gt;BSD&lt;/span&gt; alone.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;The problem with Klothos is the &lt;span class=&quot;caps&quot;&gt;PSU&lt;/span&gt;; the whole box is quite silent, as the UltraSPARC &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; is cooled by a slow and silent fan, but the &lt;span class=&quot;caps&quot;&gt;PSU&lt;/span&gt; is annoyingly noisy, and I can&amp;#8217;t just put a &lt;em&gt;be quiet&lt;/em&gt; PSU like I put on Enterprise because of the Ultra5 casing (it&amp;#8217;s a desktop machine, the case is high as the &lt;span class=&quot;caps&quot;&gt;ATX&lt;/span&gt; power supply, which means the big fan used by most silent units would be obstructed by it); I could try a passive &lt;span class=&quot;caps&quot;&gt;PSU&lt;/span&gt;, as the box shouldn&amp;#8217;t be sucking too much power anyway, but I&amp;#8217;m not sure about it and I don&amp;#8217;t have money to waste (at the moment I&amp;#8217;m unemployed).&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;If anybody has a suggestion about which &lt;span class=&quot;caps&quot;&gt;PSU I&lt;/span&gt; could use for such a box, it&amp;#8217;s really appreciated. It&amp;#8217;s funny that I paid ?35 for a working box, and then paid way more to bring it to a standard worth to be a dev machine&amp;#8230; well, I got the &lt;span class=&quot;caps&quot;&gt;SATA&lt;/span&gt; controller already in my possession, as well as the &lt;span class=&quot;caps&quot;&gt;SATA&lt;/span&gt; hard disk; the &lt;span class=&quot;caps&quot;&gt;DVD&lt;/span&gt; reader was also an old one I used, but I had to buy a new ethernet card to avoid using the obnoxious hme0 driver..&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Sat, 14 Apr 2007 20:03:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/370-guid.html</guid>
    
</item>
<item>
    <title>Contributed code and FreeDesktop standard</title>
    <link>http://amarok.kde.org/blog/archives/369-Contributed-code-and-FreeDesktop-standard.html</link>
            <category>Flameeyes</category>
    
    <comments>http://amarok.kde.org/blog/archives/369-Contributed-code-and-FreeDesktop-standard.html#comments</comments>
    <wfw:comment>http://amarok.kde.org/blog/wfwcomment.php?cid=369</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://amarok.kde.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=369</wfw:commentRss>
    

    <author>nospam@example.com (Diego Pettenò)</author>
    <content:encoded>
    &lt;p&gt;Of course, this entry will talk about xine-lib.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;First of all, a note about what I&amp;#8217;m trying to do with contributed code in xine-lib for 1.2 series. As I said already, my ffmpeg_integration branch, which is one of the two branches I merged to get the 1.2 branch itself, was born to allow using FFmpeg without changing its buildsystem, and putting it in a &lt;code&gt;contrib/&lt;/code&gt; subdirectory instead of mixing it with xine sources.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Well, as I&amp;#8217;ve now started working on providing also some Doxygen documentation, I&amp;#8217;ve seen that this is useful also for other projects that are imported in xine-lib, so that I don&amp;#8217;t have to blacklist one by one the directories and the files that are not to be parsed for Doxygen generation.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;In xine-lib-1.2 hg tip you can now find libmpcdec (that replaced libmusepack) in &lt;code&gt;contrib/libmpcdec/&lt;/code&gt; rather than having it together xine&amp;#8217;s actual code (the decoder plugin code) inside &lt;code&gt;src/libmusepack/&lt;/code&gt;. I also updated it to the last version available.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Similarly I hope to move other code, like libmad and of course libdvdnav, that was recently taken over by MPlayer developers because of the unresponsiveness of the original development project.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;It will take some time to complete all the moves, also because I&amp;#8217;ll try to contextually update the code with the last version available for every project beside libmpeg2. This should be a breath of fresh air for xine 1.2.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;Talking about FreeDesktop standards, as Darren already changed gxine to abide to &lt;a href=&quot;http://standards.freedesktop.org/basedir-spec/latest/index.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;XDG&lt;/span&gt; Base Directory Specification&lt;/a&gt;, he also added better FreeDesktop standard support in xine-lib for configuration and cache files. So right now I&amp;#8217;m working on making xine-lib use &lt;code&gt;XDG_CACHE_HOME&lt;/code&gt; to store the plugins cache instead of the hardcoded &lt;code&gt;~/.xine/catalog.cache&lt;/code&gt;, which also allows me to move more cache data out of my home directory &lt;img src=&quot;http://amarok.kde.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	&lt;p&gt;By the way, why one earth the description of the permissions to use while creating directory (that is actually a quite logic 0700) is written in the «Referencing this specification» section ?&lt;/p&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 13 Apr 2007 09:28:00 -0400</pubDate>
    <guid isPermaLink="false">http://amarok.kde.org/blog/archives/369-guid.html</guid>
    
</item>

</channel>
</rss>