Friday, April 13. 2007Hugin some panoramasIn the summer of 2003 I went to Europe and on several (17) occasions used this neat feature of my Canon camera that lets you line up images and create panoramas. Just load them on to your computer and stitch them together. Back then all the software that was usable was Windows based and I think somehow the few panoramas I did put together were lost. This week I got something called Hugin to work. In typical Ubuntu/Debian style* several runtime deps weren't included and autopanog.exe (its Mono) was renamed to autopanog and no one told Hugin. ...anyways I got it to work. And it works pretty well, better then I remember before. When they messed up it was because I was taking these without a tripod. Here are some of the neat ones: ![]() ![]() You can see the rest at my panorama photo set. Friday, April 13. 2007
Accepted to the Summer of Code! ... Posted by Ian Monroe
in eean at
04:45
Comment (1) Trackbacks (0) Accepted to the Summer of Code! playlist redesign, phonon-videolan?Just put up the announcement to amarok.kde.org regarding Summer of Code. Its really great to do it for another year. Last summer I did the Amarok DAAP integration, this summer I'll be overhauling the playlist in Amarok. Refactoring the playlist is a project thats long overdue (its been talked about for at least 2 years!) and redesigning the playlist layout is just simply necessary for our vision for Amarok 2.0. I was actually accepted for another project as well, a Phonon VideoLAN plugin. After learning more about VideoLAN, I was somewhat concerned that while it probably is a at-most three month job to do it, they may not be three consecutive months as it might require some tweaking of VideoLAN to preform all the functions it needs to. Phonon is an impresively complete API, which makes it a bit scary for backend developers. I still think a 'phonon-videolan' would be a great idea. VideoLAN is crossplatform, has an active development team and most importantly phonon-videolan would "live" in VideoLAN's repositories. At least in the long-run, it really makes sense to release phonon backends in sync with their respective multimedia library (as opposed to being in kdemultimedia, where they are now). And being part of their repo means the people who know VideoLAN the most would maintain it. Luckily Jean-Baptiste Kempf is planning on doing it perhaps in the KDE 4.1 timeframe. He has to finish the Qt replacement first (which is looking good BTW). So best of luck to him - I promised to at the least "compile along" and test phonon-videolan when he starts developing it. Thursday, April 12. 2007Discarica abusivaNon so che altro titolo dare a questo post, se non, appunto «Discarica Abusiva», perché di questo tratta. Mi è venuto in mente di scriverne dopo aver parlato l’altra sera con X-Drum su #gentoo-it su Freenode, visto che stavo informandomi su dove portare a far smaltire alcuni rottami che ho qui in casa (la vecchia lavastoviglie e un gruppo di continuità totalmente partito; alla fine domani chiamerò la società che si occupa dei servizi ambientali per questa zona, Vesta, per fissare un appuntamento per il ritiro, era così semplice, ma non è un fatto conosciuto che questo ritiro è pure gratuito). Beh, non si tratta di una novità; quando ancora ero in seconda media (quindi ormai circa 8 anni), sono iniziati i lavori necessari alla costruzione delle fognature comunali per la zona dove abito (Santa Lucia/Tarù, alla periferia di Zelarino, entroterra di Venezia, Mestre). Beh per qualche motivo dopo due o tre anni di lavoro, la prima impresa è stata mandata a casa, e il cantiere che avevano aperto a non tanti metri dalla rete del mio giardino, in mezzo ad un campo, è stato posto sotto sequestro. È arrivata un’altra ditta che ha aperto un altro cantiere di fianco, ed è andata avanti con i lavori fino a non molti anni fa. Beh, visto che il primo cantiere era sotto sequestro e intoccabile, e il secondo cantiere aveva gente che andava e veniva tutti i giorni, la sbarra di accesso al campo è rimasta aperta per molti mesi, e dove c’erano i container, rimasti per anni incustoditi e intoccati (solo poco prima che il secondo cantiere finisse sono stati spostati due camion ribaltabili che erano rimasti là, carichi di benzina pure, in mezzo ad un campo arso dal sole tutta l’estate), si è cominciata a formare una discarica abusiva. Le foto, cortesia di un mio amico, Alberto Chinellato, che ha collaborato in passato con il quotidiano La Nuova Venezia, e «caporedattore» di un giornalino di zona, sono tutte da vedere: Se andate su Flickr trovate anche le altre foto panoramiche. Ora, non è che sia difficile da vedere, visto che si vede dalla strada, non è difficile da sapere dove si trova, se un cantiere è sotto sequestro, ci si aspetta che le forze dell’ordine sappiano dove sia, e soprattuto è cosa nota almeno alla Polizia municipale (i vigili urbani) visto che sono stati contattati da me e da mia madre più volte, e sicuramente anche da altri abitanti della zona (anche se noi siamo effettivamente i più esposti essendo a occhio meno di 100 metri dal nostro giardino). Per circa due anni l’erba nel campo non è stata tagliata, e come potete vedere dalle foto, tutt’ora ci sono piante ed erbacce che crescono da quello che è rimasto, fornendo un ambiente ideale per pantegane e altri animali non propriamente salubri. In aggiunta, poiché fino a qualche mese fa la sbarra era ancora aperta, la «stradina» di accesso al campo era diventata una meta nota di auto che cercavano un posto per infrattarsi (e vi assicuro che la zona di romantico non ha assolutamente nulla quindi traetene voi le deduzioni). A tal proposito, Alberto ha anche scritto un articolo sul giornalino di cui sopra: ![]() La copertina del Quattrogatti (giornalino locale) con l’articolo di Alberto riguardo alla discarica. (in aggiunta potete trovare una scansione in DjVu ad alta qualità per la lettura direttamente sul mio server – sorry ma questo era l’unico formato che avesse una resa accettabile, visto che non ho il sorgente originale da convertire in PDF). Ora, dopo otto anni che non succede nulla, vediamo se la rete può aiutare ad avere una risposta fattiva nella soluzione di questo problema… specie perché ci sono già altre discariche abusive qua attorno di cui nessuno si occupa. Thursday, April 12. 2007
A little Summer of Code analysis Posted by Diego Pettenò
in Flameeyes at
08:42
Comments (0) Trackbacks (0) A little Summer of Code analysisSo today the allocated projects for the various organisations accepted in Google Summer of Code were released, and I decided to skim through them to see if there was something interesting; especially with xine-lib in mind. First, FFmpeg projects, as FFmpeg is for good or bad xine’s heart, and improvement in it is certainly going to do good to xine project too. There are four decoders proposed and accepted: RV40 (Real Video), E-AC3 (used in some kind of HD media if I remember correctly), Dirac and QCELP. I sincerely never heard of the last one, and of Diract) I heard only as an experiment from BBC; I prepared the ebuild for the Dirac library when I was trying to support it in VLC, but as there was not a simple way to test it I left it masked in the tree for a while; the package is still there, masked, but someone else probably took it over; with further experience, I should have put it in an overlay. While really interesting, RV40 and E-AC3 doesn’t sound that appealing for the target of xine users; first the Real demuxer needs an overdue overhaul, second E-AC3 only makes sense if we also start supporting HD media, which I don’t think we’d be doing soon enough. I was hoping for a Monkey’s Audio decoder, but that was not the case neither this year. Users interested in having Monkey’s audio support in Amarok and other xine-based players might consider the idea to start a Chinese wall reverse engineering for it from the macport library, also if some description is present already, and might be enough to start working on it; I’m not keen on going to do it myself though; beside having other things to do, I don’t really know where to start at the moment.. bribes might make me reconsider but remember that almost anything I do goes to help in some way… Now instead FreeBSD has interesting ideas, I’m quite interested in support for the Apple’s MacBooks (hoping that they will also consider MacBookPro), as I’m an user for it; the TCP/IP regressions testing might also help, as there has been a few TCP/IP problems in the past that might get solved once and forever with this, but what is really interesting is the bintools project to replace parts of binutils with BSD-licensed variants.. interesting not much for its usefulness, but just to see the mess when you add bintools’s commands to binutils’s and elfutils’s … reinventing the wheel, year after year. For what concerns KDE I think we’ll see the results only in a few months, but I’m happy to see that there are projects to improve Kopete’s MSN and Jabber protocols. I just hope that in KDE4 Kopete is going to get more maintenance and won’t be allowed to fall behind every year to an obsolete state (Jingle support was nice… but it was left incomplete and never update up to now!). And I don’t intend to forget Mike’s project on Kontact’s blogging support.. that will be neat for a blog-addicted like me! For X.org, the server-side XCB support is something that I’ve read about for a few months now in the xcb mailing list and seems like it’s going to be quite useful to reduce the possibility of a mistake in the X server code, which is something we all rely upon nowadays (by the way, since X.Org was founded, using X started to be less a pain that it was before, the no-configuration startup is nice, too bad xorg.conf still uses that obscure format When it comes to GCC instead, the projects are more technicalities, but there is at least a speedup project that all Gentoo users should welcome easily, and the SEH support (that by the way comes from a friend of mine, hey Hyp if you’re reading! And not directly related to xine, but coming from one of xine’s contributors in the last months, there’s a project for Wine to support Solaris.. I wish him good luck, as that might make wine’s code even better, as usually portability helps cleaning up after yourself. Okay now let’s hope these projects will all be completed during Summer of Code and maintained for a long time afterward! Wednesday, April 11. 2007libketama - a consistent hashing algo for memcache clients
We wrote ketama to replace how our memcached clients mapped keys to servers. Previously, clients mapped keys->servers like this:
server = serverlist[hash(key)%serverlist.length]; This meant that whenever we added or removed servers from the pool, everything hashed to different servers, which effectively wiped the entire cache. We add (and sometimes remove) servers from the memcached pool often enough to warrant writing this - if your memcached pool never changes, you can probably stop reading now Ketama is an implementation of a consistent hashing algorithm, meaning you can add or remove servers from the memcached pool without causing a complete remap of all keys. Here's how it works: - Take your list of servers (eg: 1.2.3.4:11211, 5.6.7.8:11211, 9.8.7.6:11211) - Hash each server string to several (100-200) unsigned ints - Conceptually, these numbers are placed on a circle called the continuum. (imagine a clock face that goes from 0 to 2^32) - Each number links to the server it was hashed from, so servers appear at several points on the continuum, by each of the numbers they hashed to. - To map a key->server, hash your key to a single unsigned int, and find the next biggest number on the continuum. The server linked to that number is the correct server for that key. - If you hash your key to a value near 2^32 and there are no points on the continuum greater than your hash, return the first server in the continuum. If you then add or remove a server from the list, only a small proportion of keys end up mapping to different servers. The majority of the code is a C library (libketama) and a PHP4 extension that wraps it. I've also included a class from our Java client. (Java Collections makes it rather easy). We use a single-server memcache client wrapped with a native php class to make it multi-server capable, so we just replaced the hashing method with a ketama_find_server call. (should be easy enough to plug this into libmemcache if need be) http://static.last.fm/ketama/ketama-0.1.1.tar.bz2 We've been using this in production for all our PHP installs and Java services at Last.fm for around 10 days now. We deployed it just in time to smooth over moving loads of webservers between datacenters. For further information, please refer to the README inside the tarball or these threads on the memcached mailing list: http://lists.danga.com/pipermail/memcached/2007-April/003853.html http://lists.danga.com/pipermail/memcached/2007-April/003834.html Wednesday, April 11. 2007Music overdose?Finally, yesterday I received the package from Amazon JP! Let’s ignore the fact that on a ?110 order I had to pay ?41 for custom duties (oh well, the cost of a single CD I ordered in a shop around here I asked before was way higher anyway), and I’ll also try not to repeat too often the ridiculousness that DHL Express was able to ship the package in three days from Narita to Marcon (Venice) and then it took three more days to ship from there to my home (because last Saturday they didn’t deliver, and the package was received there just Friday evening); all things considered, four working days is not a bad delivery time. Now as crazy as I am, I do like some Japanese music… I started loving L’Arc~en~Ciel music when I heard Driver’s High as opening for Great Teacher Onizuka anime. I was able to buy myself Awake some time ago, and yesterday I received ark in the special 15th anniversary edition, CD with DVD, so I was more than happy! Now this doesn’t mean I passed the whole day listening to music, eh.. I was actually working for part of the time on finishing the details of my (now expired) job, then I took a shopping tour to a bookshop in Mestre, looking for something from Dario Fo (with scarce results, I was able only to find a single book of him), but of course this without forgetting working on xine; as I said, mercurial is something useful. The 1.2 series, on which I’m focusing at the moment, is now spotting a cleaner support for packed attributes, and I’m working on adding Doxygen documentation to the code; currently I’m converting documentation in the buffer.h file, just because it’s the one I found most difficult to understand myself. Unfortunately, emacs support for Doxygen seems to be pretty much non-existant, and even the doxymacs extension does a lousy job, as it fails to highlight the Doxygen comments properly. Add to that that emacs insists on putting two spaces in front of every line after an Unfortunately, I’m not yet sure on how many of the improvements I hoped for I’ll be able to implement in 1.2 series, considering that I’d hope for 1.2 to be released more or less with KDE4 release (before if possible, if not possible not too much afterward), as the 10MB improvement in memory usage is a killer feature. I’m also trying now to handle a few things in a slightly different way, for instance I’ll be trying to move all of the contributed code in the contrib/ subdirectory, rather than having it scattered among xine proper sources. The problem is that having to deal with both build system and code changes makes quite more difficult to track down the changes, but this should not be a big problem on the long run. And for who’s curious, yes, I also have an Amazon JP wishlist but it’s mostly for my own use, as the customs duties are a problem. Tuesday, April 10. 2007KDE: Aussie ContingentMyself, Brad Hards and Clarence Dang met up in the city to play catch up. It was nice to finally meet Brad, who lives in Canberra and has been in Sydney the last few days. We met up in the heart of the Sydney CBD and walked over to the Rocks and grabbed some noodles and then ice cream for desert. Here are some photos of the three of us in front of some iconic Australian icons. Tuesday, April 10. 2007KDE: Aussie ContingentMyself, Brad Hards and Clarence Dang met up in the city to play catch up. It was nice to finally meet Brad, who lives in Canberra and has been in Sydney the last few days. We met up in the heart of the Sydney CBD and walked over to the Rocks and grabbed some noodles and then ice cream for desert. Here are some photos of the three of us in front of some iconic Australian icons. Tuesday, April 10. 2007
Friendly LAN-File Sharing. Does it ... Posted by Seb Ruiz
in sebr at
06:11
Comments (3) Trackbacks (0) Friendly LAN-File Sharing. Does it Exist?A few months back, I migrated my sister’s PC from Arch linux to Kubuntu. We were both a little fed up of the constant need for staying on bleeding edge, for fear of being left behind with the distribution. I was so impressed with Kubuntu I installed it on my machine too. I’m hoping that since I am now on a more “user friendly by default” distro, that I’ll be able to iron out a few things with my home network. The idea of zeroconf is great. Personally, I hate doing network based configurations over the command line, I find them very awkward. Similarly, I don’t like having potentially non-permanent configurations hardwired into the system, and especially not ones which are automatically loaded. I’m looking for a zeroconf compatible file sharing system (be it SSHFS, NFS or whatever) which can be loaded by a click of a button. I don’t want to have to specify mount points or anything else on the client machine, although I’d be willing to do a bit of setup on the file server if its a one time thing. Any help out there? Monday, April 9. 2007
The other big memory waste Posted by Diego Pettenò
in Flameeyes at
20:11
Comments (0) Trackbacks (0) The other big memory wasteTonight I finally started the true 1.2 series branch on xine-lib’s repository; this branch is the merge of the nopadding and the ffmpeg_integration branches, which means it starts with two big improvements: 10MB memory saving and a simpler to upgrade FFmpeg snapshot, with handling for disabling uncommon decoders, just like Miguel wanted. Now, if you looked well enough at the graphs you posted, you already know what I’m talking about, if you didn’t, well here there’s a new graph, created using the ![]() The yellow are you see it’s the memory created by Okay, so what the problem is here? First, as the code cannot tell if what is playing is audio only or contains video too beforehand, it has to initialise the video driver every time too; this is quite normal though, nothing to be a problem. The problem is that the video initialisation initialise automatically also a number of buffers, by default 500, of size 8KB.. even if they never gets used. It also allocates a single memory area for the buffers, 2KB-aligned, which is not exactly the cheapest way to allocate memory. Now, this in general should be okay, shouldn’t it? Most of the times you’re playing video with xine, and so it should be fine, but there are cases when using this method will just waste a lot of memory, especially if the user tried to be smart and increased the number of buffers to something that isn’t exactly sane… I’ll now be working on checking if it’s possible to just allocate the buffers when they are needed; in that case the graph will certainly appear different, as the memory will increase less steeply, and would just run down together at the end. Let’s return to work (although I should be finding a way to clean up the mess that is my home office here)… Monday, April 9. 2007Sunday, April 8. 2007
Spring cleaning in your $HOME: ... Posted by Diego Pettenò
in Flameeyes at
13:32
Comments (0) Trackbacks (0) Spring cleaning in your $HOME: spamassassin with SQL backendThis is going to be the first of a series of posts about «spring cleaning» of your home directory. We’re also in the right season, so I’m not that Off Topic for now Why do I care about having a clean home directory? Well, it vastly depends on my setup, but I think this is common enough to grant some discussion about it. I have my /home in a partition that is set up with DM to be replicated on my two harddrives, providing me a basic RAID1 setup for that single partition; this allows me to be relatively safe from a harddisk crash, for what concerns my important data, like SSH and GPG keys, configuration files, mail and so on. The problem with this is that everything that gets written to my home directory has to be written on two disks, and is often a performance drawback; for this reason, I tend to scatter the non-essential data (like repository checkouts and similar) in different partitions, as they also don’t require much backup most of the times. This also brings me to hate the software that uses my home directory to save cache data, because it ends up using RAID1 for disposable data that I wouldn’t want to have backed up together with really important data. So, this series of posts are going to explain how I try to keep my home directory clean from cache data, in part to help someone else that might want to do the same, in part for me to remember how and why I did something One of the first services that I thought of, using data in my home directory, was spamassassin; while the amount of spam mail I receive has now decreased a lot since I left Gentoo (as I’m not in 10 aliases), I still receive quite a bit, so I’m not yet ready to remove my local SpamAssassin filter; it’s probably a sane idea especially since for xine-lib I’m going to repeat my email address over and over at every commit SpamAssassin saves some data in Unfortunately, as it is the ebuild does not allow you to easily add postgres support, but this is probably going to be fixed in the future; I have a better ebuild in my overlay ( git://flameeyes.is-a-geek.org/overlay.git ) and I’ll see to send the changes to Perl team now; in the mean time, the things to change are not that much. The documentation on setting up SpamAssassin with SQL backend can be found on SpamAssassin Wiki, and it applies to PostgreSQL as well as MySQL, even if some things has to be changed around, nothing major though. First of all, stop SpamAssassin (if your mail system is not mission critical) and start backing up the bayesian database: This will create a After this, change the useflags for Now, it’s time to create the user and the database to store the data into. You could also use per-user preferences stored in SQL backend if you really need them; as I don’t need them, I instead edited Now it’s time to set up the database connection from SpamAssassin; although the ebuild suggests to use the At this point, SpamAssassin will only use PostgreSQL for its databases, so you can just remove your Now you could restart spamd and have your system back already, but there is one problem with the current ebuild (the one in my overlay does not need this change though): it does not depend on PostgreSQL. From one side it’s correct, you might not be using the localhost pgsql to store the data, so in that case you don’t have to care to start spamd after postgresql, but if you’re going to use a local configuration, you certainly don’t want spamd to start before the PostgreSQL database is up, so you have to edit the At this point you’re set, just restart your spamd, and it won’t use your homedirectory to store cache data anymore! Saturday, April 7. 2007
Integrating FFmpeg in xine-lib Posted by Diego Pettenò
in Flameeyes at
21:04
Comments (0) Trackbacks (0) Integrating FFmpeg in xine-libBeside the ABI breakage that is needed to reduce the structures’ size, that as I blogged yesterday helps quite a bit, another of my currently worked on branches is the FFmpeg integration. Now, xine-lib has used FFmpeg since ever, and it has an internal copy of it (although on Gentoo you use the external copy of it to reduce the size of the code, and avoid having double security problems), but that copy requires rewriting the build system from FFmpeg’s own makefiles to It also requires to clone in configure.ac the tests for the features that are tested in FFmpeg’s own configure script, which is a waste of time when using external FFmpeg most of the time, and needs to be maintained over the long run as they might be modified by FFmpeg developers, and we can’t just copy them 1:1 as they don’t use autoconf either. To solve this issue, I’ve been working before to implement a sort of Chinese Wall, so that FFmpeg’s build system could be called from xine’s automake build system without need to accommodate the Makefiles every time an upgrade is needed. It wasn’t that difficult to begin with, but there was an obstacle with the With this problem fixed, I was finally able to start working on getting distcheck working and thus trying to get a working branch out of it. The result is quite good, as I was able to get a distcheck running already, and I’m now working on actually implementing Miguel’s idea to disable the “uncommon” audio/video decoders present in FFmpeg; his work on the current 1.1 series is basically half-implemented, and probably never to be fixed, as it would require to change all the Makefile.am so that they take into consideration the huge amount of conditionals currently present in FFmpeg; I think once it’s completed I’ll just ask Miguel to give up on having it working in 1.1 series, as it’s unlikely to ever work decently… well, it might even work, but refreshing FFmpeg would require a huge amount of work, and we are understaffed already. And by working on this branch, and on this idea, I already discovered two bugs in FFmpeg that I’ve locally patched.. the patches are now waiting (as usual) in ffmpeg-devel to be applied. Hopefully, this will also be integrated in 1.2 series, that should then start being interesting… Friday, April 6. 2007
The first improvement in xine with ... Posted by Diego Pettenò
in Flameeyes at
22:01
Comment (1) Trackbacks (0) The first improvement in xine with MercurialSo, after xine finally moved to Mercurial for xine-lib management, I’ve decided to start working on those things that required me to branch out, at least on some of them that is; the first one I was able to tackle down was ffmpeg_integration, that now works fine beside the dist target. And then I moved working on the structures, applying pahole to all the structures in libxine, even those comprising the public ABI of the library, as I could just break the ABI when needed, rather than limiting to the local structures of the plugins. Some of these changes applied to structures that are not part of the public ABI, so I ended up merging them to the main repository already, and will be present in 1.1.5, even if they are mostly bytes-size changes, that nobody beside me should care about. But then tonight I gone looking for the 32 buttons that are/were present as an inline array in one of the video overlay structures; I was going to change the inline array with a dynamic array or with an array of pointers, so that the memory was going to be used only when actually used.. It was a sour surprise to find out that the array was never used at all in the code, and it wasn’t used on frontends either, and by removing it, the size of the structure in which it was dropped from 86KB to 40 bytes.. and then the (before the change, about 1.1.4 release) ![]() (after the change, on my nopadding branch) ![]() For starters, this does seem quite good, don’t you think? Tuesday, April 3. 2007
Conversion to Mercurial done Posted by Diego Pettenò
in Flameeyes at
10:28
Comments (0) Trackbacks (0) Conversion to Mercurial doneSo, as of yesterday, thanks to Darren Salt and Reinhard Tartler, xine finally moved out of CVS dark age, and came into Mercurial’s territory. As you can see on Debian’s Mercurial repositories page we have quite a few xine repositories: together with xine-lib, Darren also moved his gxine repositories so they are all together. I’ve already started doing some little work, which shown a little bug on CIA.vc yesterday that was ignoring my commits; fortunately Micah corrected the problem right away.. thanks Micah! One of the tasks I was able to take care of today was the update of the FFmpeg integration branch, that now is up to date with main xine-lib-1.1 branch. Unfortunately Binutils seems to have broken FFmpeg so I’m unable to finish building and thus checking if it actually works as intended. Anyway, soon I’ll see to post more updates about it. |
Amarok LinksCalendarQuicksearchArchivesCategoriesSyndicate This BlogBlog Administration |

