Skip to main content

How I hacked mplayer to work on Motorola ROKR - Part 1

Ever since I posted the cTunes video on youtube (http://youtube.com/watch?v=coV06ChYWJo), I have been getting a few requests for the app to download and the source code. I have blogged a little about it here and the download link for the app can be found here, here, here and probably a lot more places too. It is wonderful to see an application that I wrote over a few weekends get such wide audience. Forums are still active on this half baked media player.

But people have been asking for the source code and since I moved to a new job and had to shuffle my computers around, I don't remember where the code lives anymore. But the good news is I always have backups as my trusty little cronjob on my ever running PC takes care of backing up all the important files to a 1 TB drive every weekend so I never loose anything. Just hard to find that is all. Wish I had a google search on my .tar.bz2 files ;-). Anyway I took time today to search for the code because a student emailed me asking for the code for her school project where she is allowed to use open source code and modify it for her project. I decided to post the code on code.google.com for the benefit of others who would like to extend the functionality.

There are two parts to the cTunes application. First there is the cTunes j2me application that runs on any media enabled phone (with proper jsrs available of course), and there is a hacked up mplayer I specifically modded to work with rokr e2. I was working at Motorola at the time and knew a little bit of the internals of the phone so it was easy. But this information is nothing difficult to obtain from the net. There are a lot of forums completely dedicated to modding phones, flashing latest images or simply understanding the details.

This is the first of the several installments of how to make ctunes work the way I have shown in the youtube video. First I will start with the mplayer that I built. Please remember that I do not remember all the details of the hacks I did and also the code I used was a very old MPlayer-CVS code from April 2007 or so. First download the code from here and untar it. Now search for
grep -Ri "chandan pitta" *
in mplayer.rokr directory. Those are the hacks I had to do in that version. The hacks may not work with the latest mplayer code. The hack starts with this comment:
// [ modified by Chandan Pitta ]
and ends with this comment:
// [ end modification ]
The rokr e2 has a 32 bit ARM processor and mplayer can be cross-compiled for ARM. So that simplifies the problem a lot for us. However ROKR E2 has a couple of issues
1. The BPP of the phone is 19 and the version of mplayer that I used did not support 19 BPP. So we need a hack for that.
2. The audio driver is motorola proprietary and mplayer does not have a driver. We need a hack to channel audio data to the driver somehow.

I will write another blog explainging how I resolved the 2 issues.

Comments

Anonymous said…
Hi, I got your contact from the Freevo website. I couldn't find an email address to contact you in private, sorry. (you can delete this comment after reading if you wish).

We'd like to have your help to spread the word about a study on State of the Art in FLOSS Media Center projects that we are conducting.

I hope you could support it within Freevo's community and/or website.

thank you for your consideration,
Our standard announcement is here: http://www.telematicsfreedom.org/en/project/14/floss-media-center-state-art

The Telematics Freedom Foundation picked the 10 most prominent MC FLOSS projects out there and we're now collecting information about their features, functionality and support.

The 10 selected projects were: XBMC, MythTV, Boxee, Elisa, Neuros OSD, Freevo, My Media System, Entertainer, CenterStage+Plex and MediaPortal.

Thanks for your consideration,
Giovani Spagnolo

Popular posts from this blog

Attesting General Power of Attorney in SF

Recently I had to go through the motions of getting a General Power of Attorney (GPA) document attested in San Francisco. I am an Indian by birth. My parents were trying to buy a house back in India for me. Since I did not want to travel to India they needed a GPA so that they can act on my behalf to sign all the documents required to buy the house. The problem however is that they needed it urgently because the seller lives in UK and wants to get all the things done quickly so he can go back. My parents send me a GPA document that they obtained from a lawyer. This is a document that will give the power to my parents to buy the said property in the document on my behalf. The lawyer said that I will have to get the document attested at an Indian Consulate in USA. The closest one for me is in SF and I can drive there in about an hour from where I live. So I though it will be like a day's work to get all the things done. I looked up at their  website  for the procedure to att

XBMC / Boxee remote control android app

I have been writing a few android apps over weekends at home and during 20% time at Google. However I never actually released any of them in the android market mainly because they were quick and dirty apps that fit my needs but perhaps would not be appealing to the general public. One such app that I quickly wrote over a couple of weekends is a XBMC remote. The media center that I use at home is XBMC and I have always wanted to have more control and faster access to my media. Using my remote to navigate through the menus is not as fast. Especially when I wanted to queue a lot of music it is very slow. So I wrote this nice little app called "XBMC remote" for my android phone to control XBMC from anywhere :). Give it a try. Search for "xbmc" in android market and install it if you use XBMC as your media center. When you first launch the app you will start with this screen. You will have to setup your web server address, username and password (if required) by

gtkdocize not found

If you are ever configuring an app and see the message "gtkdocize not found" in Gentoo, then you need to emerge gtk-doc. I had some hard time figuring this out so I am writing it in my blog for the next time. When I saw that error message I did an "emerge -s gtkdocize". Usually it is that simple in Gentoo. But not this time. The emerge command returned no results at all. Then I searched for gtkdoc and still no luck. After searching in Google, I still did not have a solution. After thinking for a while I decided to try to search for gtk-doc. Bingo! That worked! Interestingly, this is my first post from my Virtual machine :-)