Tuesday, 23 July 2013

Amarok MTP (Android) GSoC: week 5

Ahoj, this is my fifth weekly report about my work on a Google Summer of Code project to rewrite MTP (Android) support in Amarok from scratch. Last week was also affected by me attending Akademy, so I'll also talk about some of my Amarok-related work there. Fortunately I've still managed to fulfil my GSoC goal scheduled for week 5: playability.
Amarok playing Daft Punk's piece straight off my S III Mini
What I've done last week:
  • Fixed long-standing and severe track organizing bugs on Windows in cooperation with Patrick von Reth. Thanks, Patrick!
  • Sat down with Àlex Fiestas and debugged a solid bug that prevents Amarok from seeing your USB storage drives and iPods that are connected at the time Amarok starts.
  • Fixed a couple of bugs that I've introduced shortly before releasing 2.8 Beta, one of which was unfortunately severe.
  • Finally implemented playability of MTP tracks in my GSoC branch. Unfortunately not as asynchronously as I wanted, because phonon (at least phonon-gstreamer 4.6.3) cannot cope with tracks that are still being downloaded, so I do some "asynchronous with blocking waiting in the main thread with a timeout" instead.
  • Hmm, actually now I get an idea how we could fool Phonon. We know file size in advance, so perhaps we can pre-size the temporary file at the beginning of the transfer (which will also help fragmentation). Needs testing tough.
Problems I've faced:
  • As said above, Phonon needing the entire file before starting playback (or perhaps there's another trick?).
  • Amarok's Meta::Track API is not really being suited for tracks that want to asynchronously load themselves before playing.
What's next:
  • Editing track metadata and more overall polish.
You can view and test my code by checking out gsoc branch of my personal Amarok clone repository.

Wednesday, 17 July 2013

Amarok MTP (Android) GSoC: week 4; hello from Bilbao!

Kaixo, this is my fourth weekly report covering my Google Summer of Code project to rewrite MTP (Android) support in Amarok from scratch. Code-wise, I have done only a couple of small commits the last week, but this is fine because I've already done the work scheduled for week 4 during week 3. :-)
Photo from the GSoC, GCI, SOK & OPfW students & mentors BoF (which actually well exceeded my expectations). Can you spot me? :-)
I think you've already guessed why I've done a bit less than usual and published the weekly report late: I'm enjoying the great atmosphere of Akademy 2013 here in Bilbao, Spain.

The event rocks so hard (with all the talks, BoFs, chats, parties, concerts, trips and hacking going on) that it is impossible to describe in a blog post. More importantly for my GSoC project, I've met up with Philipp Schmidt, the kio-mtp author (Àlex Fiestas wants to tell you he did just the screencast), who knows all the quirks of using MTP devices in KDE and is happy to share them. We've also sat down and tweaked the proposed MTP Daemon D-Bus interface, with even more daring suggestions from me being in preparation.
Sunset over ocean near Bilbao taken during coast walk. Thanks go to Dani for organizing it!
What I've done last week:
  • Improved Solid <-> libmtp device matching by shamelessly copying a bit of Philipp's kio-mtp code. (okay, he actually pro-actively showed me the code, so it was not that shameless)
  • Removed extra device check that actually prevented Amarok from detecting a Sansa Clip device that Matija generously lent me to test it. Thanks, Matija! [note to self: need to discuss this with Phillip]
  • Had a serious look at the proposed MTP Daemon interface together with Philipp, sent out first 2 patches for it for review.
Problems I've faced:
  • Partying too hard, getting to bed past 4 AM, oversleeping and missing the morning BoFs.
What's next:
  • Implementing playability of the tracks. Should be easy with all the MTP knowledge right next to me in form of Philipp.
You can view and test my code by checking out gsoc branch of my personal Amarok clone repository.

Let's repeat it,
I'm here till Friday, ping strohel on #amarok or #akademy if you want to talk about anything Amarok-related with me in person.

Sunday, 7 July 2013

Amarok MTP (Android) GSoC: week 3; Amarok 2.8 Released

Hola, this is a third weekly report describing my work on my Google Summer of Code project to rewrite MTP (Android) support in Amarok from scratch. This week I've finished implementing reading the track list from MTP devices.
What I've done this week:
  • Finished the background job to read MTP tracks and their metadata. Includes a nice progress bar (everyone loves progress bars) and is abort-able too.
  • Implemented central MtpTrack class and associated MtpAlbum, MtpArtist, MtpComposer, MtpGenre and MtpYear classes that are used to represent the collection entities in the Collection Browser.
  • Thanks to the above, Collection Browser now shows the entity tree of your MTP device (first screen-shot), which is nice.
Problems I've faced:
  • First little bugs/API omissions with libmtp are showing up (inability to flush libmtp's object cache). Fortunately the upstream is very helpful, so I'm looking forward to discuss it with them.
What's next:
  • Given that I've basically done work of both week 3 & week 4 from my timeline, I'll do a bit of polishing and testing. I'll also look at week 5 schedule which contains playability of MTP tracks directly in Amarok.
You can view and test my code by checking out gsoc branch of my personal Amarok clone repository.

On a related note, we've released Amarok 2.8 Beta! Yay! It contains a galore of improvements and corrections that are slated to end up in Amarok 2.8 (final). I definitely think you can give it some testing, can you? :-)