Thursday, June 26, 2008

Ipod Collections Visible

As predicted would be done by today, Ipod collections are now visible in Amarok 2 if an iPod is plugged in at Amarok 2 loadtime. I'll add signal/slot stuff so that you can plug in later at a later time. Songs are playable, but track information edit attempts crash amarok, and it's hanging on exit probably due to some voodoo static_cast that I'm using. Instead of the 30-90 seconds of Amarok 1.4 freezing loading my ipod, this takes less than 1 second and freezes nothing. Anyway, screenshots:




As you can see, UTF8 support is there, although there's some funky business with Album grouping atm but I'll get to that. There's a long series of known bugs right now, so please don't bother me just yet with them as they're mostly obvious ones =p

This is a big milestone for me, as I can start to see that what I'm doing is quite possible. Still a long road ahead, but we're on our way.

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.

Sunday, June 8, 2008

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?

Tuesday, June 3, 2008

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

Monday, May 26, 2008

First 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).

Saturday, May 17, 2008

New Laptop






My cell phone camera doesn't take great shots, but this'll do. First is of the laptop itself, running Firefox on KDE 4. Second of the fingerprint scanner.

Stats:

Lenovo Thinkpad T61p
Kubuntu 8.04 Hardy Heron KDE 4 Remix
Intel Core 2 Duo 2.5 GHz 6144kb cache (each core) 800 MHz FSB
160 GB 7200 RPM Hard Drive
nVidia Quadro FX 570M 256MB
2 Gb PC-5700 667 MHz
Bluetooth/Wireless/Usual
Fingerprint Reader

Summary:

Despite Windows Vista's best attempts to stop me from shrinking the partition, I did it anyway, though I guess I'll have to "recover" Vista later, when I feel like a masochist and want to run Windows. That aside, Kubuntu works like a charm, so I'm pretty satisfied. Only regret is that I don't have enough time right now to do anything for Amarok, thanks again to school. Hope to have free time starting Tuesday.

Thursday, May 15, 2008

Media Device Support for Amarok 2 in Google's Summer of Code

It looks like I'll be the one bringing media devices back for the next major version of Amarok.


Looks awesome so far right?  Well there's still a lot missing, and media device support is part of that.  My job is going to be adding iPod, MTP, and generic device support.  Over the next many many weeks, I'm going to try to keep track of what I'm doing here, but I don't promise anything too exciting non-technically speaking =p

Status Report:

I've looked into the MediaDeviceCache stuff that interfaces with Solid, KDE 4's backend for hardware recognition, and it's amazingly simple.  Solid code is beautiful and easy to read, I like =).

I started looking into MediaDevicePluginManager but haven't gotten too deep into it yet.

One of the ultimate goals of this project is to implement a Collection class, tentatively called MediaDeviceCollection, which will let songs on a media device get all the advantages of any other Collection, and I believe a few more that are specific to media devices (e.g. sync'ing of music, artwork).  I haven't made progress there yet because I'm still working on the previous stuff, but it's on the backburner.  Hopefully I'll have a more concrete idea of how that'll work after some more discussion with other devs.

In other news, my laptop has arrived!  So I'll spend a good part of this weekend setting it up for development.