Amarok MTP (Android) GSoC: week 5

Matěj Laitl · July 23, 2013 · 1 min read

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.