Thursday, May 21. 2009
GSoC: Boston/Cambridge Dev Sprint Posted by Alejandro Wainzinger
in xevix at
08:22
Comment (1) Trackbacks (0) GSoC: Boston/Cambridge Dev SprintThe dev sprint was filled with conversation on all sorts of topics, open-source software and pop culture references, but above all, people got set up to go on their GSoC projects and got inspired by each others' enthusiasm. This being my second time doing GSoC for the same project, I was already set to go and know my way around development, but this gave me a chance to meet with a fellow Amarok developer Jeff Mitchell, and now I've met a good amount of the core Amarok team, which is awesome. In the end I didn't get a lot of actual coding done, but I took from the sprint enough inspiration to hurry up even more on the code I'm working on. Highlights: - MIT == We spent a good amount of time in one of MIT's buildings on our laptops (a photo on Marcus' blog). Spent time on getting people set up on svn, setting up distributed compiling with IceCream and a bit of hacking. Above all it set the pace for a lot of conversation which is really what the open source community is about: sharing ideas so that later on, you can work on making them real. - OpenSuSE's IceCream == Not satisfied with the slow compiles of core stuff like Qt and our own huge projects, we tried to set up IceCream distributed compiler to get more bang for our byte. Unfortunately we were doomed to failure (found out later) since some of us were 32-bit systems others 64-bit, and differeng GCC versions, and cross-compilers take too long to build. However, we did get it somewhat going in the hotel, which was nice. - JP Licks Ice Cream == In a word, amazing. Suffolk County's own local chain, which redefines what a "small" ice cream should be. I haven't seen so many unknown or strange flavors in a while, ranging from black raspberry, to peppered ice cream. You definitely get your money's worth, but I had trouble even finishing the small. - Indian Restaurant (don't recall the name) == More food than you could hope for, for the right price (the rest of Boston/Cambridge was quite pricy). Had Chicken Tikka Masala (obligatory), Garlic Naan (also obligatory) and a ton of rice. I should've gotten more spicy food but I wanted to play it safe. - Star Trek @ IMAX == Nevermind why Reading has an IMAX theater in a furniture store, the movie was quite a visual spectacle. The story/characters/acting was exactly what I expected, and I wasn't let down. I'm sure Star Trek fans enjoyed it more since there seemed to be a lot of hidden humor, but luckily the few bits I've seen helped me out.
- The Kendall Hotel == Nice hotel, right in front of MIT, right next to the T. Wireless was hassle-free, breakfast every morning. Overpriced food can't be helped, but I went it cheap. Nice beds and nice rooms, all that was needed for some late-night hacking. - The T == The big pitfall of living in California is that the concept of mass public transportation is, to put it politely, lacking. The Boston T, for about $2, will let you ride from one side of Boston to the other, and even to Cambridge and other outlying areas. Reasonably fast, reliable, and not too packed. Definitely one thing I would love to have here in car-driven California. - Dunkin Donuts == There are ~300 of these in Boston alone, which is mind-boggling. There's a DD underground in the T, there's one at Logan Airport, there's one in the MIT admin building! Such cheap, decently-flavored iced cofee you will not find elsewhere, and the monstrous size of the large was worth the price. Definitely went again and again... - Dunkin Donuts == .... and again - Dunkin Donuts == .... and again. I got a lot of coffee in Boston. I don't think I've ever had so much consecutive coffee drinking in my life. Definitely missed on the west coast. The People: Veteran Devs: Jeff Mitchell -- The guy who worked hard to make this all happen, and go well, and a fellow Amarok dev. Many many thanks for making this possible, and for not getting too frustrated with my lack of brainpower in navigating directions and so forth this last weekend. Marcus Hanwell -- Avogadro dev, soon to be working on our beloved build-system CMake. Really cool guy, loves photography, well-travelled. Chani Armitage -- Plasma dev, brought you screensaver plasmoids, now working on fancy popups using mouse buttons. Energetic and very involved. Constantin Berzan -- Working on a global outbox for Akonadi, to take away dependence on e-mail related things from KMail to free e.g. applets to do stuff with mail. Good at directions, shame he had to go back so soon in the sprint. Christopher Ing -- Bringing fluids to STEP. Good roommate, made sure I didn't miss breakfast the 2nd day =) The only mac user in the group, which shows the variety of people working on KDE-related things. Ramon Zarazúa -- Working on refactoring support for KDevelop 4. I really look forward to the results of this project, being an avid KDev 4 user. Cool guy, the only one with whom icecream was working. Adam Kidder -- Nepomuk search. Picked up the slack for my lack of common sense this last weekend ("you need an IP address to run a dhcp server?"). At Ann Arbour, my cousin went there. Marwan Hilmi -- Parsek. Didn't get much of a chance to talk to him about his project, but seemed cool. Note to self: round tables are only good if people aren't too far away from each other. Pierre-Alexandre St-Jean -- Abstracting Kopete chat window for use in other apps. Probably the only relaxed person of the bunch (most of the rest of us were doped up on caffeine). Conclusion: Completely worth the 3,000 mile trip. It looks like this GSoC, for KDE at least, will be filled with a lot of awesome people and work getting done. These kinds of get-togethers help to motivate us to do awesome things, and to open up channels of communication between different parts of KDE which is essential to making KDE cohesive as well as feature-filled. I don't think I'll be making it to Akademy this year unfortunately, so I'm happy I was able to make it to this. I would, at some point, like to set up a similar event in California, perhaps in San Francisco or San Diego, and I wonder who would be interested in it. At any rate, good luck to all GSoC'ers on your projects, and I'll see you on IRC/ML. Thursday, May 21. 2009
Amarok: A Better Media Device ... Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (3) Trackbacks (0) Amarok: A Better Media Device Experience, GSoC 2009So I have again the pleasure of being selected for Google's Summer of Code for Amarok to scratch some very serious itches concerning media device support in Amarok 2. Itches:
Playlist: Actually, iPods in Amarok already have their playlists read on connect, but at the time I wrote the code, the code in Amarok for any collection dealing with playlists wasn't at a satisfactory level yet, which I believe it to be now thanks to the work of a few people, in particular I know that Stecchino (Bart) has worked on it. GUI: The media devices applet seemed like a good idea at first, but it's terrible from a usability standpoint, and since the PUD (Popup Dropper) removes any possibility of dragging-and-dropping tracks onto it, for instance, it doesn't make much sense to have it. However, I understand there's plans in the works to redo some of Amarok's GUI, part of which will accomodate the previous functions of this applet, and I'll be taking advantage of that. UMS Support: Yes! I swear it this time. It turned out that building a new collection-based media devices infrastructure more-or-less from scratch took a lot longer than planned last summer, and I did not get to UMS. Another reason I've held back on it up until now is that media device support in general is going to get a massive refactoring before GSoC begins, to accomodate for simple adding of support not only of UMS devices, but in the future, other types as well. Ok, now that the explanations of GSoC are out of the way, I move on to something else. People with media devices, aside from the above, what is it you would like to see in Amarok for devices? I can list a few off the top of my head, please list more so that I can prioritize perhaps some time for this summer and beyond.
Thursday, May 21. 2009
OpenSolaris, Qt and Game Development Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) OpenSolaris, Qt and Game Development
Overview
A group of 3 other people and myself were charged with making a game for a class this trimester, which is essentially a Final Fantasy clone with a few quirks localized to our university. In thinking of a toolkit, I thought to myself "what event-driven toolkit provides a graphics system and paint system complete and robust enough to make this happen?" Naturally Qt came to mind. The professor suggested some Java toolkits, including SWT, but my experiences with SWT have not been at all good, so I decided to give Qt a shot. Another perk of Qt over SWT is how easy it is to learn and use, since my 3 team members are not familiar with it. After a few days of playing with Qt tutorials on the Graphics framework and studying KDE games code, I had a small but working prototype of one of the modes of our game, where the character explores the scene of a level. Things to notice that were easy to do: - Creating a graphics item from a graphic file - Moving it around - Having it change form - Collision detection with walls - Dragging of the view to see different parts of the scene Deployment Before proceeding I had to make sure that the program would run on the target platform of the school servers: SunOS 5.10 (Solaris). Now Qt is a cross-platform toolkit, and binary builds of it are provided for Linux, OS X, and Windows, but not for Solaris (that I could find here). Having recently installed VirtualBox after hearing lots of good things about it, I decided to give Solaris a spin as a virtual machine. There was a bit of confusion for me at the beginning with so many possible distros to choose from, but luckily since only 2 of them are supported by the KDE Solaris team, that narrowed it down. They prefer using SXCE, so I gave that a shot, but unfortunately some bug where X would show up but then freeze on the live dvd stopped me short (I figured it was an issue of running in a VM or something). Then I tried OpenSolaris 2008.11, which installed fine Then the problem became that the instructions on the wiki for compiling using OpenSolaris were a bit lacking, a problem I have since mended with some updates based on my experience. After much strife with getting the environment set up just right, compiling was not a big deal, thanks to the awesome efforts of the KDE OpenSolaris team. I ran into some issue with a Qt example not compiling, and hacked it up to fix it, since it didn't much matter, and voila, Qt was on the system, and my previous example in the youtube video worked. From here, I had a few options (as I saw it): - build Qt as static, deploy a static binary - build Qt as shared library, ask school admins to install Qt on servers - build QtJambi, port to Java, deploy as jar Since building Qt as static was not supported by the KDE Solaris team, I decided to give QtJambi a shot, and ported my example to Java. Unfortunately the QtJambi build specfile provided didn't work too well, and went into an infinite recursive make loop. When at last I had almost given up, I discovered that the shared library approach doesn't actually require the system to have Qt installed on it, just that the necessary .so shared object files be deployed with the program itself, and to use a script to launch the program (a script which simply adds current directory to linker path). A simple ldd resulted in this:
Wow, that's a lot of shared objects! According to the Qt deployment guide though, all of the X libraries could and should be avoided to be packaged. I did end up adding other ones though, one by one, as I saw necessary until the program finally ran without a linker error. The bad news is this blew the total package up to 30 MB or so. Oh well, so be it, it ran! And now...? And now the real development can begin. There's only a few weeks to work on it, but that should be plenty. It won't be a terribly fantastic game as a result, but it was an interesting adventure, and more importantly proves the point that Qt is an awesome toolkit, and that there are quite a few options open for deployment. Thanks to the KDE Solaris team for helping me with getting things building, I'd be nowhere without your help (in particular: szt, [ade], steleman, and trochej thanks a lot guys). Thursday, May 21. 2009Delete Multiple Files
Again, school keeps me busy and away from solving issues, but here's the most recent thing I've been working on.
![]() (Yes, the dialog isn't at all final, I just put it there as a placeholder)A few collections like the MP3Tunes service, and the local collection, are actually able to delete tracks already! They just... have no GUI to make it all happen. Devices like iPods and MTP devices can delete too, but only one track at a time (far from optimal). So I'm working to bring this ability to all collections alike. Actually getting this working isn't too hard, but making the code nice, understandable and maintainable is a bit of a trick. Luckily I've got a pretty good idea now of how I want it done. Beta 3 is out =D but still so much left to be done on my end: - fix MTP track playing, so that the next track properly loads/plays - add orphaned/stale track checking for iPods - enhance the Media Devices Applet, and add interface to root item of TreeView for connect/disconnect - fix cover-related things on iPods (and _possibly implement it for MTP devices, by popoular request) The list goes on, but that's already enough. More manpower for any of these jobs is MORE than welcome. Do apply =) Thursday, May 21. 2009
"Absence," Akademy and Devices Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) "Absence," Akademy and Devices
So I apparently haven't blogged in a month. Sorry about that, it's not that I have nothing to say, just that I'm usually busy doing that I don't really take the time to talk about it. That said, I'll still keep this short as I myself like to read short blurbs from people who aren't well-known.
Akademy. Awesome. Of course I got to meet a good amount of the Amarok people I often talk to, which was the highlight of the trip for me really. It's one thing to discuss over IRC, and quite another to have breakfast together, chat about things non-Amarok as well as Amarok in person, and in general hang out. I also got to meet a lot of other people, like Will Stephenson who donated an MTP device for development (who I met while waiting in the waffles line) [p.s. thank you so much again for it]. Most exciting stuff non-Amarok: Gallium3D... just wow, that's all I can say. Step was pretty awesome too, though my physics is really bad. Marble is exciting stuff, but in Openstreetmap there remains much to be mapped so it may be a while before it becomes truly amazing. There's more, but these are the ones that stuck out most in my mind right now. So, Media Device Status Report. As you can see, I haven't blogged so obviously nothing has happened. Lies. MTP playing off the device is now supported, a bunch of random bugs have been fixed, and an applet is under way to deal with configuration etc. of devices. Don't worry, this is only for connect/disconnect and options and whatnot, the configuration of devices will still be almost entirely automated. I'm trying to figure out a way to make it more obvious that for media devices you need only plug in your device essentially, for it to just work. I think that I'll try to push for the Media Devices applet to be one of the initial defaults loaded, and it'll show a text like "plug in media device to play from it" or something. Why have I been so slow at coding? The truth is I've been held in Guantanamo for the last couple of weeks. And.... again, lies. No, between random life, then Akademy in Belgium (which I spent most of my time bugfixing and socializing), and now I'm in Japan where it's hard to stay on the computer too long, I haven't been that able to. But I'll be back in the USA Sept. 2, so starting then things should pick up a bit more hopefully. On that note, cheers from Japan! Thursday, May 21. 2009
MTP File Management and iPod Covers Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) MTP File Management and iPod Covers
So MTP file management (copying/deleting) has gotten implemented, and works well on all 3 devices I tested on. Still a lot of polishing left to do as far as interface goes, and some threading to not stall Amarok at key points, and it should be good to go. One thing I'm having issues with is copying files directly from an MTP to an iPod and vice versa, but will investigate this later as this is a bit more advanced.
So, I had a bit of an epic struggle with a few things over the last day or so. See, libgpod can only retrieve covers in the form of GdkPixbuf structs, but so as to not force the GdkPixbuf dependency on people, they return it as a gpointer which you can then choose to cast if you want to use GdkPixbuf. Sounds great, right? No problem... ... except for having CMake pull in the dependency. So as it turns out, there's no built-in module for gdk-pixbuf library. So, I decided to create my own as I did with libgpod, except when I pulled it in, a certain function wasn't present. Odd... hm. Well as it turns out, this function is only present in the gdk-pixbuf library that resides in gtk. Great! There's a CMake module for GTK, all should be fine this time, yes? No. The GTK module in CMake pulls in GTK1, and gdk-pixbuf is in GTK2. So I end up modifying the gdk-pixbuf module I made before, learning lots about CMake along the way, and finally get it compiling. Long story short for the next part, the README in libgpod didn't really work for me for setting up SysInfo for my iPod, and I accidentally tripped on a feature from the old Amarok which set it up right, after I modified some permissions. Wonderful, yeah? Wrong! Turns out that iTunes and libgpod handle covers in two different ways, and so I have to cater to both of them. This turned out to be a bit of a pain, but at last, I finally got a size-distorted but correct solution: ![]() The m-flo cover was set by me using libgpod via Amarok, and the Maná cover was set by iTunes. I'm going to fine-tune the sizes later, and all should be peaches and cream. That's all for now. One note though about the interface, which right now is either non-existent or bad: likely going to be making an applet which does all the fun stuff that A1 did for media devices, including: connect/disconnect, % free space, possibly a queue, and if supported, even % battery level! That however, is a ways away from coming true, but do stay tuned. Thursday, May 21. 2009
MTP Incoming and Ipod File Deletion ... Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) MTP Incoming and Ipod File Deletion Support
First off, thanks to everyone who has responded to the request for devices so far, and those to come! Sorry if the replies to the e-mails take a bit, but I'm probably working on Amarok ironically enough. Some of the devices offered have already been sent, and soon we'll see the first signs of MTP support on Amarok 2 =D . To get this question out of the way, yes, of course we're going with libmtp 0.3, it just makes sense to. Look forward to this MTP users, and thanks again to all donors of devices!
Summary of Ipod News: - You can now delete files one at a time from the iPod - You can now "edit" tags, although changes won't save yet (implementing next) ![]() After fighting for a while with how to create a custom "remove" button, users now have access to deleting files on the ipod! ... one at a time, hah, looks like I have to do some more magic before you can do it with multiple files at once. Also, the icon for "remove" doesn't seem to make sense, and I'm fixing this soon too. Why there isn't a built-in capability to remove from a collection when there's built-in support for it in CollectionLocation? Probably nobody got around to it yet. If nobody does it after this summer, I'll implement it so that people don't have to go through this again, haha. Turns out that because pre-made actions are in the CollectionTreeView, they can do all sorts of magic like... know which items are selected, so that they can work with multiple things at once. I'll have to look into this next. Anyway, editing ipod tags will no longer crash your Amarok, and they'll even update in the view!... but not in the ipod's database, so a restart of Amarok will clear those changes, don't be fooled! It won't be too hard to port over tags support I'm sure. Er.. wait, I've said "it shouldn't be too hard to..." way too many times already, and I'm always surprised when it turns out to be a pita, haha. The rest of the stuff I mentioned in previous posts has not yet been dealt with. No need to ask about the progress, it'll get here fairly soon. I've tried to concentrate on core features (tag editing, file management) for now. Yes, album covers and podcasts are wonderful, and they're soon to be here. Thursday, May 21. 2009
Getting Close to Displaying Collection Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) Getting Close to Displaying Collection
Back! A week of finals and a week of vacation later, here I am.
Set back by that, and git-svn losing my code, I'm still on a fairly good track. I don't think anyone really gets how dense the legacy Ipod code is except for Max, but it's a beast. In the end I won't be needing most of it, but it's hard to tell before checking it all. I've gotten an itdb (itunes database struct) to read the ipod and parse the songlist just now, though I'm still at a loss for figuring out when to initialize or not, or even why we need initialize, but I'll get to that later. The bottom line is, that it's just a matter of using this info to fill in the Meta data and get a collection displaying! =D Nikolaj recommended that I set up a separate MediaBrowser KVBox-based singlecollectiontreeview thing for testing, which I'm not all too sure how to do, but I'll just rip some code out of the servicebrowser probably. For my own purposes, I'll keep it in the collection view for a bit longer. Hopefully my next blog will show a screenshot of an IpodCollection being displayed. Thursday, May 21. 2009
MediaDevice vs. MediaDeviceCollection Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) MediaDevice vs. MediaDeviceCollection
So I'm running into a wall at the moment. The code for recognizing a device, initializing it, and doing any kind of transaction with it, is already there in MediaDevice, its subclasses, and MediaBrowser.
The idea of creating a MediaDeviceCollection was to benefit from a unified way of fetching and displaying information about a given group of music files. The MediaBrowser does more than this, and deals with specific media device interactions (like connect, disconnect, device-specific actions). So why bother using a collection here at all? Thursday, May 21. 2009
A week later... not much done... Posted by Alejandro Wainzinger
in xevix at
08:22
Comments (0) Trackbacks (0) A week later... not much done...
A combination of school/life/compile issues have meant that I haven't done a lot. I added libgpod as an optional package to Amarok, and started to play around using the MediaDeviceCache in the MediaDeviceCollection but still haven't figured out how to get it to be run by Amarok automatically like Daap, so still a ways to go before I get something semi-functional.
I've decided I'm probably tossing out a lot of the old media device code, as it's being superceded by Meta and Collection stuff, and I have a feeling the ipod-specific code will be going away as well (that file is a nightmare =p ). The MediaBrowser was a good idea, but its code almost makes me want to cry, yet I'm still trying to figure out what to do on that. But all that needs to be done now is a simple collection showing songs so I have something real to begin with. After next week school ends, and more hacking can begin! =D Thursday, May 21. 2009First Day of Coding
Finally got my environment set up a few days ago, turns out Qt was compiled with some very strange flags and it was having a ripple effect on kdelibs. I was gone last weekend in Berkeley and had some school stuff to catch up on, but I did get a bit started at least.
I started looking into collections, and I ripped off the Daap directory, ripped out the Daap references and replaced it with MediaDevice and now I have a new toy to play with =). There's a lot of things that aren't commented on too much, like Observer in MetaBase, but I'm sure it'll make sense with a bit more time. Other than that, making a collection seems pretty straightforward (albeit involved). I'm trying to find a balance between studying the MediaDevice code and Collection code since I'll have to end up using both, but since I'm going to be using both in related ways there doesn't seem to be a way around this. Either way, I hope I get my first real commit sometime next week (this week is going to be a bit involved with schoolwork as well). Thursday, May 21. 2009KDE4 on Gentoo![]() After weeks of trying to get to setting up a KDE4 development environment for Amarok, success is finally at my door =D. First Kubuntu and kdesvn-build needing every dependency imaginable and building issues, then Gentoo and the broken qt-4.4 ebuilds, but a combination of kdesvn-build and manually building Amarok has finally granted me my dream. For a higher quality version, download from here(note: .ogv file) : http://www.filesend.net/download.php?f=03f4722730dfa9115d143701fd0d3db1 For an avi version (lesser quality a bit) : http://www.filesend.net/download.php?f=bdbe2dcd1626b6aa2f3ab5d78888bcae Monday, May 11. 2009
GSoC: Boston/Cambridge Dev Sprint Posted by Alejandro Wainzinger
in xevix at
21:42
Comments (0) Trackbacks (0) GSoC: Boston/Cambridge Dev SprintThe dev sprint was filled with conversation on all sorts of topics, open-source software and pop culture references, but above all, people got set up to go on their GSoC projects and got inspired by each others' enthusiasm. This being my second time doing GSoC for the same project, I was already set to go and know my way around development, but this gave me a chance to meet with a fellow Amarok developer Jeff Mitchell, and now I've met a good amount of the core Amarok team, which is awesome. In the end I didn't get a lot of actual coding done, but I took from the sprint enough inspiration to hurry up even more on the code I'm working on. Highlights: - MIT == We spent a good amount of time in one of MIT's buildings on our laptops (a photo on Marcus' blog). Spent time on getting people set up on svn, setting up distributed compiling with IceCream and a bit of hacking. Above all it set the pace for a lot of conversation which is really what the open source community is about: sharing ideas so that later on, you can work on making them real. - OpenSuSE's IceCream == Not satisfied with the slow compiles of core stuff like Qt and our own huge projects, we tried to set up IceCream distributed compiler to get more bang for our byte. Unfortunately we were doomed to failure (found out later) since some of us were 32-bit systems others 64-bit, and differeng GCC versions, and cross-compilers take too long to build. However, we did get it somewhat going in the hotel, which was nice. - JP Licks Ice Cream == In a word, amazing. Suffolk County's own local chain, which redefines what a "small" ice cream should be. I haven't seen so many unknown or strange flavors in a while, ranging from black raspberry, to peppered ice cream. You definitely get your money's worth, but I had trouble even finishing the small. - Indian Restaurant (don't recall the name) == More food than you could hope for, for the right price (the rest of Boston/Cambridge was quite pricy). Had Chicken Tikka Masala (obligatory), Garlic Naan (also obligatory) and a ton of rice. I should've gotten more spicy food but I wanted to play it safe. - Star Trek @ IMAX == Nevermind why Reading has an IMAX theater in a furniture store, the movie was quite a visual spectacle. The story/characters/acting was exactly what I expected, and I wasn't let down. I'm sure Star Trek fans enjoyed it more since there seemed to be a lot of hidden humor, but luckily the few bits I've seen helped me out.
- The Kendall Hotel == Nice hotel, right in front of MIT, right next to the T. Wireless was hassle-free, breakfast every morning. Overpriced food can't be helped, but I went it cheap. Nice beds and nice rooms, all that was needed for some late-night hacking. - The T == The big pitfall of living in California is that the concept of mass public transportation is, to put it politely, lacking. The Boston T, for about $2, will let you ride from one side of Boston to the other, and even to Cambridge and other outlying areas. Reasonably fast, reliable, and not too packed. Definitely one thing I would love to have here in car-driven California. - Dunkin Donuts == There are ~300 of these in Boston alone, which is mind-boggling. There's a DD underground in the T, there's one at Logan Airport, there's one in the MIT admin building! Such cheap, decently-flavored iced cofee you will not find elsewhere, and the monstrous size of the large was worth the price. Definitely went again and again... - Dunkin Donuts == .... and again - Dunkin Donuts == .... and again. I got a lot of coffee in Boston. I don't think I've ever had so much consecutive coffee drinking in my life. Definitely missed on the west coast. The People: Veteran Devs: Jeff Mitchell -- The guy who worked hard to make this all happen, and go well, and a fellow Amarok dev. Many many thanks for making this possible, and for not getting too frustrated with my lack of brainpower in navigating directions and so forth this last weekend. Marcus Hanwell -- Avogadro dev, soon to be working on our beloved build-system CMake. Really cool guy, loves photography, well-travelled. Chani Armitage -- Plasma dev, brought you screensaver plasmoids, now working on fancy popups using mouse buttons. Energetic and very involved. Constantin Berzan -- Working on a global outbox for Akonadi, to take away dependence on e-mail related things from KMail to free e.g. applets to do stuff with mail. Good at directions, shame he had to go back so soon in the sprint. Christopher Ing -- Bringing fluids to STEP. Good roommate, made sure I didn't miss breakfast the 2nd day =) The only mac user in the group, which shows the variety of people working on KDE-related things. Ramon Zarazúa -- Working on refactoring support for KDevelop 4. I really look forward to the results of this project, being an avid KDev 4 user. Cool guy, the only one with whom icecream was working. Adam Kidder -- Nepomuk search. Picked up the slack for my lack of common sense this last weekend ("you need an IP address to run a dhcp server?"). At Ann Arbour, my cousin went there. Marwan Hilmi -- Parsek. Didn't get much of a chance to talk to him about his project, but seemed cool. Note to self: round tables are only good if people aren't too far away from each other. Pierre-Alexandre St-Jean -- Abstracting Kopete chat window for use in other apps. Probably the only relaxed person of the bunch (most of the rest of us were doped up on caffeine). Conclusion: Completely worth the 3,000 mile trip. It looks like this GSoC, for KDE at least, will be filled with a lot of awesome people and work getting done. These kinds of get-togethers help to motivate us to do awesome things, and to open up channels of communication between different parts of KDE which is essential to making KDE cohesive as well as feature-filled. I don't think I'll be making it to Akademy this year unfortunately, so I'm happy I was able to make it to this. I would, at some point, like to set up a similar event in California, perhaps in San Francisco or San Diego, and I wonder who would be interested in it. At any rate, good luck to all GSoC'ers on your projects, and I'll see you on IRC/ML. Sunday, May 3. 2009
Amarok: Quick Status Report on ... Posted by Alejandro Wainzinger
in xevix at
11:02
Comments (0) Trackbacks (0) Amarok: Quick Status Report on Refactoring, Git Rocks
Between the business of school &c. I've been at work making Media Device code smaller and easier to write, as promised. Here is a preview of the difference in the amount of code required before, and in my git branch after. Let's just look at the MediaDeviceCollectionFactory subclass for Ipods, which keeps track of Ipods connected and talks to Solid.
Before: AMAROK_EXPORT_PLUGIN( IpodCollectionFactory ) IpodCollectionFactory::IpodCollectionFactory() : Amarok::CollectionFactory() { //nothing to do } IpodCollectionFactory::~IpodCollectionFactory() { DEBUG_BLOCK } void IpodCollectionFactory::init() { DEBUG_BLOCK // connect to the monitor // connect( this, SIGNAL( ipodDetected( const MediaDeviceInfo & ) ), // MediaDeviceMonitor::instance(), SIGNAL( deviceDetected( const MediaDeviceInfo & ) ) ); connect( MediaDeviceMonitor::instance(), SIGNAL( ipodReadyToConnect( const QString &, const QString & ) ), SLOT( ipodDetected( const QString &, const QString & ) ) ); // HACK: emitting old signal to avoid refactoring applet yet connect( this, SIGNAL( tellIpodDetected( const QString &, const QString & ) ), MediaDeviceMonitor::instance(), SIGNAL( ipodDetected( const QString &, const QString & ) ) ); connect( MediaDeviceMonitor::instance(), SIGNAL( ipodReadyToDisconnect( const QString & ) ), SLOT( deviceRemoved( const QString & ) ) ); connect( MediaDeviceMonitor::instance(), SIGNAL( deviceRemoved( const QString & ) ), SLOT( deviceRemoved( const QString & ) ) ); // HACK: Usability: Force auto-connection of device upon detection checkDevicesForIpod(); } void IpodCollectionFactory::ipodDetected( const QString &mountPoint, const QString &udi ) { DEBUG_BLOCK IpodCollection* coll = 0; if( !m_collectionMap.contains( udi ) ) { debug() << "New Ipod not seen before"; coll = new IpodCollection( mountPoint, udi ); if( coll ) { // TODO: connect to MediaDeviceMonitor signals connect( coll, SIGNAL( collectionDisconnected( const QString &) ), this, SLOT( slotCollectionDisconnected( const QString & ) ) ); m_collectionMap.insert( udi, coll ); emit newCollection( coll ); debug() << "emitting new ipod collection"; } } } void IpodCollectionFactory::deviceRemoved( const QString &udi ) { DEBUG_BLOCK if( m_collectionMap.contains( udi ) ) { IpodCollection* coll = m_collectionMap[ udi ]; if( coll ) { m_collectionMap.remove( udi ); // remove from map coll->deviceRemoved(); //collection will be deleted by collectionmanager } else warning() << "collection already null"; } else warning() << "removing non-existent device"; return; } void IpodCollectionFactory::slotCollectionDisconnected( const QString & udi) { m_collectionMap.remove( udi ); // remove from map } void IpodCollectionFactory::slotCollectionReady() { DEBUG_BLOCK IpodCollection collection = dynamic_cast if( collection ) { debug() << "emitting ipod collection newcollection"; emit newCollection( collection ); } } void IpodCollectionFactory::checkDevicesForIpod() { QStringList udiList = MediaDeviceMonitor::instance()->getDevices(); / foreach( const QString &udi, udiList ) { / if ipod device found, emit signal */ if( isIpod( udi ) ) { // HACK: Usability: Force auto-connection of device upon detection QString mountpoint = MediaDeviceCache::instance()->volumeMountPoint(udi); ipodDetected( mountpoint, udi ); //MediaDeviceInfo deviceinfo = new IpodDeviceInfo( mountpoint, udi ); //emit ipodDetected( deviceinfo ); // HACK: emit old signal to avoid refactor of applet yet emit tellIpodDetected( mountpoint, udi ); } } } bool IpodCollectionFactory::isIpod( const QString &udi ) const { DEBUG_BLOCK Solid::Device device; device = Solid::Device(udi); / going until we reach a vendor, e.g. Apple / while ( device.isValid() && device.vendor().isEmpty() ) { device = Solid::Device( device.parentUdi() ); } debug() << "Device udi: " << udi; debug() << "Device name: " <<>deviceName(udi); debug() << "Mount point: " <<>volumeMountPoint(udi); if ( device.isValid() ) { debug() << "vendor: " << device.vendor() << ", product: " << device.product(); } / if iPod found, return true */ return device.product() == "iPod"; } After: AMAROK_EXPORT_PLUGIN( IpodCollectionFactory ) IpodCollectionFactory::IpodCollectionFactory() : MediaDeviceCollectionFactory { //nothing to do } IpodCollectionFactory::~IpodCollectionFactory() { DEBUG_BLOCK } ---------------------------------------------------------------------------------------------- As you can see (excuse the bad formatting, blogger doesn't take kindly to source code), the amount of code required has been greatly reduced, and the other required classes are soon to follow. Also, things are going to be implemented more in the predictably correct classes now, and after refactoring is done and I've ported both Ipods and MTPs to it, I will write a small tutorial on how to go about implementing your own device. No, UMS will be done by me, heh, but it should be a piece of cake afterward to implement support for some of the other devices some of you miss from Amarok 1.4, so yay! Unfortunately I'm fairly busy with school too so this proceeds in big bumps every 4-7 days, might take a bit, but getting there. I'm going to Boston next weekend for the KDE GSoC meetup, which should be fun. If you're around, do say hello! Saturday, April 25. 2009
Amarok: A Better Media Device ... Posted by Alejandro Wainzinger
in xevix at
09:12
Comments (6) Trackbacks (0) Amarok: A Better Media Device Experience, GSoC 2009So I have again the pleasure of being selected for Google's Summer of Code for Amarok to scratch some very serious itches concerning media device support in Amarok 2. Itches:
Playlist: Actually, iPods in Amarok already have their playlists read on connect, but at the time I wrote the code, the code in Amarok for any collection dealing with playlists wasn't at a satisfactory level yet, which I believe it to be now thanks to the work of a few people, in particular I know that Stecchino (Bart) has worked on it. GUI: The media devices applet seemed like a good idea at first, but it's terrible from a usability standpoint, and since the PUD (Popup Dropper) removes any possibility of dragging-and-dropping tracks onto it, for instance, it doesn't make much sense to have it. However, I understand there's plans in the works to redo some of Amarok's GUI, part of which will accomodate the previous functions of this applet, and I'll be taking advantage of that. UMS Support: Yes! I swear it this time. It turned out that building a new collection-based media devices infrastructure more-or-less from scratch took a lot longer than planned last summer, and I did not get to UMS. Another reason I've held back on it up until now is that media device support in general is going to get a massive refactoring before GSoC begins, to accomodate for simple adding of support not only of UMS devices, but in the future, other types as well. Ok, now that the explanations of GSoC are out of the way, I move on to something else. People with media devices, aside from the above, what is it you would like to see in Amarok for devices? I can list a few off the top of my head, please list more so that I can prioritize perhaps some time for this summer and beyond.
|
Amarok LinksCalendar
QuicksearchCategoriesSyndicate This BlogBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||

