Skip to main content

Posts

Showing posts from 2008

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

It has been over a month since part 1, so let me start off quickly and finish this part. I will try to explain how I got the 19 bpp working in mplayer. It was very straight forward really. I had to edit the following files from the mplayer-cvs (you can download the code from http://code.google.com/p/j2me-ctunes/ ): libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/vf_scale.c libvo/osd.c libvo/osd.h libvo/vo_fbdev.c mplayer.c postproc/yuv2rgb.c postproc/swscale.c In libmpcodecs/img_format.c, libmpcodecs/img_format.c and libmpcodecs/vf_scale.c I added a few lines to return something to say 19-bpp is supported in RGB and BGR formats. libvo/osd.c is interesting. I added a method called vo_draw_alpha_rgb19() which draws the alpha for 19-bpp. In libvo/vo_fbdev.c, I disabled some code that was causing problems in ROKR and disabled clipping because it was done elsewhere. In addtion added code to initialize variables for 19-bpp format (i.e. r, g, b offsets and lengths. Each color is

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 aski

VirtualBox 1.6 is out

The most usable (for me anyway) VirtualBox release for mac is out. I just downloaded 1.6.0 from VirtualBox.org . I was finally able to load the virtualbox additions. Check out my previous blog to read about the issues I faced. Here is a quick recap of the issues: I could not use my full screen real estate which was 1440x900. The max resolution I could get was 1152x864. Unable to mount my shared folder. Cannot ssh from master OS (mac OS). First I am glad that VBox for mac has finally come out of beta. Just the fact that there is a release lifts the spirits a bit. Coming to my first issue, I am now able to make full use of my screen. It did not work out of the box, but the tweaks I had to do were small enough to not make me grumpy. I installed 1.6.0 on my macbook pro. Started my Gentoo guest OS. Loaded the virtualbox additions iso to the virtual cdrom by doing Devices > Install Guest Additions... Mounted the cdrom from Gentoo by doing mount /mnt/cdrom as root. Executed /mnt/cdrom

Yet Another GTD now open sourced

I was finally able to clean up the code and add some comments to my pet project YAGTD which stands for Yet another getting things done. See my previous blog for more details. The code is available here if anyone is interested to modify for their specific needs. To try out the application go to http://yagtd.appspot.com/

Elisa problems marshalling MediaUri

The short version If you are having problems with elisa not playing your local media files (see https://code.fluendo.com/elisa/trac/ticket/957 and https://code.fluendo.com/elisa/trac/ticket/961 ) then you can fix it by editing ~/.elisa/elisa.conf and changing gstreamer:gst_metadata_client to gstreamer:gst_metadata . That is all and it works! The long version Ever since I heard about elisa , I have been trying to get it to work as my media center. It was well designed and the vector graphics are awesome. It plays music, videos and displays pictures, and has several plug-ins to play online music and youtube videos etc. You can even get cover arts from amazon from with in the software. But there is just one problem. It could never play my local media. Neither movies, nor music and not even photos. I gave v0.3.3 of elisa a try. It did not play my personal media. I thought, well it is still in development, so why not wait for the next release. I did not even take a look at the logs. Then

Mac vs PC (Vista)

Why is it so funny. Let's go over it one more time. Who do you think is better, the mac or PC (with windows vista)? Let the games begin, but before we start I am neither a mac fan nor a windows fan, I am all for linux ;) Mac: 1 PC: 0 Well mac does not need to get all excited. Seems like mac was having problems showing the above video on a mac. You might want to stop the video after a while, otherwise you might want to kill someone Mac:1 PC:1 Moving along, we have a series of pro-mac videos Mac: 2 PC:1 Mac:3 PC:1 Mac:4 PC:1 Mac:5 PC:1 Mac:6 PC:1 Let's even out the odds a little bit. This is hilarious and I have to minus 5 for mac for the following video and cannot raise anything for PC since nothing good has been said about it. Mac:1 PC:1 Finally the winner is Mac:0 PC:0 Neither...

Google App Engine to rescue my "Getting Things Done" project!

I was finally able to complete the project that I described in my previous blog :). Having been back from vacation for a couple of weeks now, I used up every single minute I had available to finish it up. It is hosted at http://chandan7.myhosting247.com/yagtd/ChandanGtd.html as usual. Now you can see that as you add tasks for projects that has a specific tag and as you complete each task, you can observe the progress at both project level and tag level. All is well so far, but the only problem is that you cannot save what you enter into the application. As I previously mentioned, I had plans on running my own local server and being able to save all my tasks on my personal computer. But that did not make any sense to me. I wrote this neat application and am I the only one to be able to use it? Google App Engine to the rescue Just my luck, that Google App Engine was released while on my vacation. It is still in alpha stage, but it quite usable as it is. It has built-in data store where

Google Web Tookit is awesome!

So I have used a few "Getting Things Done" (see my previous blog ) softwares / applications / services or what ever you want to call them. They are generally pretty good at what they are supposed to do. I liked some of them for their simple design and ease of use and liked a few others for their control. But overall none of the ones I tested met my specific needs. Basically I want an extremely simple tasks > projects > tags hierarchy. The tags are like the big pieces of the pie. I have a few tags like "Personal", "Work" and "Fun". So all my work related projects should have the "work" tag, similarly all personal projects like buy groceries or clean house or free up space on hard drives should go into the "personal" bin, and so on for other tags. Well you get the picture. Then projects are high level tasks. You know you have to do several smaller tasks to get it done. But overall you just want to track projects. How much

Testing Video Ads

So what more can I do with my adsense account? How about video ads? Why not. What are they? How do they work? Here is my first experiment with video ads. The setup was pretty simple. You click on Google AdSense Video units link and you are connected to your youtube account. Once you log in to youtube and verify your information you can start off with creating a player with the contect you want to show based on keywords or channels or category. Simple :-). The videos can also be generated based on the performance and characteristics of the website they are placed in. You get a piece of code that you embedded in your blog/webpage. Here is the piece of code that I got for keywords "phone". Watch the latest videos on YouTube.com Update 1: Hmm for some reason that did not work. I will give it a try again later. Update 2: I found out the problem. It seems for some reason when I copy paste the code somehow double quotes get added at the wrong places. And so the link did not work.

Testing AdSense and Getting Things Done

Working in Google and not having an AdSense account is not cool. So I created an account and added the AdSense page element. Looks good. Although I did not like the layout. May be I should move to a new template that will have 3 columns. One on the left with profile, one on the right with ads and middle with the blog. May be I will write one. Anyway with the ads in place I can track how many page impressions I got on my blog ;-). Actually I should find out how to track traffic to my blog. Let me add that to my list of To Dos. Talking of To Dos I was also researching for some "Getting Things Done" (GTD) applications that will make me more organized. Lucky for me an article got published in Toms Hardware about the very topic . In it the author writes his views on various Getting Things Done With Software . After reading through the article quickly I found HiveMinder to be the most useful for me. I tried Personal Tracks too, but I guess HiveMinder is easier to work with. It ha

My worst enemy - Time

I have a rather busy schedule like most people and from time to time I wish I had more time. Well I lied. I don't wish from time to time, I actually always wish there was more time. There is always something more to be done. Yet here we are constrained only by time. The list of things to do is ever growing. 1. I have to finish reading several of my magazines that appear at my doorstep every month. I subscribe to Dr. Dobbs, Wired and Electronics for you. But I did not have time in 2007 to complete any of the magazines in 2007. So now I am reading all the old backlogs. I have to come up to speed to open my new Feb 2008 issues. I am now at March 2007 issue. I have exactly 1 year's worth of 3 magazines, bringing the total to a hefty 36 magazines. 2. Then I have to work on that media player using Freevo or Pigment or what ever I decide. And then there is the matter of figuring out which one to use. Huh, will I ever be able to decide and start getting my hands dirty? 3. I still have

May be not Kaa.Canvas, May be Pigment

After thinking about the pros and cons of using kaa.canvas I am just now thinking may be I should simply go with pigment. The reason is I am looking for a way to scale a screen of information (graphically) and I guess kaa.canvas may not be able to do that. I did not yet discover all the available features in it, but that is what my initial impressions are. I will go over the kaa code base and see if I can scale screens with images and text on the fly (as in animation). If not then perhaps pigment has some tricks in the bag.

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 :-)

VirtualBox additions

I got everything working from with in virtual box, except for the additions. I was able to run VBoxLinuxAdditions.run (from the Guest additions iso) and it ran to completion without producing any errors. It compiled some modules and modified my xorg.conf file. But there were several problems with the additions. First the script changed the video device driver from vesa to vboxvideo which gets me a maximum resolution of 1024x768. All other higher resolutions complained about "vrefresh out of range" or "hsync out of range". I do not understand how that can be given that I gave a wide range of hsync and vrefresh for my monitor. Finding little help from /var/log/Xorg.0.log, I decided to go back to my old vesa driver which at least gives be a slightly higher resolution of 1152x864. I was wishing the vbox driver could give me 1440x900 but that did not happen. Setting modelines also did not help so I gave up pretty quickly. My next issue is that I am not able to mount my s

Gentoo on VirtualBox on Mac

In one of my previous posts I expressed my excitement about VirtualBox beta 3 working well on Leopard. I benchmarked VirtualBox and found out that the guest OS runs almost at the native speed. This is very exciting. It simply means I can install Gentoo instead of Ubuntu or knoppix. It is not like I have anything against those distros. They are really good and get things done pretty fast. But I got used to Gentoo and learned so much about it that I know where to look for when something fails or if I wanted to install a package or hack something up quickly. I did not want to learn another distro from the basics. Anyway I created a new VM for Gentoo mounted the minimal install cd and launched the VM. Everything worked perfectly. I just followed the regular gentoo install procedure and I have a system up and running in about the same time as it would take for me to install on a native platform. I later installed kde and firefox. To start off working on my Freevo 2.0 project I downloaded th

Gaming Media Center PC

My gaming PC which also doubles as a media center is now completed. Well actually I finished working on it last weekend. I also started playing all the games I love playing. Unfortunately I became sick after the weekend and I could not blog about it. However I will try to blog the complete details this weekend (time permitting). There is one interesting twist to my plan. My PC uses linux for media center tasks and uses windows XP for playing games. Yeah I know I said I will linux for both but it so happens that wine seems to have some problems with the games I play. The games usually launch but with some tweaks. Even then I am not able to get the maximum performance from my GPU. For the $240 I would like to see all settings high and at least 30 FPS at 1280x720. More on how and why I had to switch in my next blog. I am still kind of sick and getting well. Hopefully this weekend finds me in a better state.

VirtualBox beta 3 works on Mac OS X Leopard!!!

So finally, finally, finally I am so excited that VirtualBox works on my macbook pro. I felt really frustrated with the speed of Q today. I was trying to install some packages while compiling evas in kubuntu inside Q but it was so very slow. I can hardly switch apps. I don't know why but I just felt may be there is a new version of VirtualBox that will run on mac. Don't know why, I just had the feelings and lo and behold, there it is -- a new announcement on VirtualBox webpage about a new Beta 3 release for mac. Am I excited! I knew it would work on my Mac Leopard because why else would they release it? I started downloading the new package even before reading the news on the site. While the app was downloading I went ahead and read the complete details and I could feel the happiness inside when I read this sentence from the news "The new version sports seamless guest support and live dock tiles as well as numerous improvements and bug fixes. It goes without saying that it

Freevo 2.0 and Evas

I decided to start working on Freevo 2.0. I compiled and installed evas in a local space with the following commands: ./configure --enable-gl-x11 --prefix=~/workspace/usr/local make make install Now I had to export the lib path using LD_LIBRARY_PATH. I prefer to run everything in a subshell with the proper environment variables set. So I write this small script called setup-subshell (modified it from project pigment's subshell): #!/bin/bash -i # # Set up environment. # PROJECT='newvo' LD_LIBRARY_PATH=/home/chandanp/workspace/usr/local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} export LD_LIBRARY_PATH # Common env vars export PKG_CONFIG_PATH=/home/chandanp/workspace/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH export PYTHONPATH=/home/chandanp/workspace/python/kaa-lib/lib/python2.5/site-packages/:$PYTHONPATH # If we got a command, run it and exit if test ! -z "$1"; then $@ exit $? fi # Set up a prompt helping us remember we're in a subshell tmp=`mktemp -t bashrc.XXXXXX

Q on Mac: Part III

I got everything ready. Kubuntu is running well in Q on my macbook pro. However it does not mean anything. The real test is to see if it is really usable. My plan is to start working on Freevo2 on the virtual kubuntu PC. But even before I start working on it the first question is I am not sure if I should be working on writing Freevo 2 from ground up to fit to my needs. Or should I simply use elisa (fluendo) and write a freevo plugin so that I can access all my movies and music that have been prepared for freevo (fxd file et al). I tried elisa. It is really cool I mean the UI and smooth graphics and such. But I was not able to use it to play any content. The problem seems to be with some code in elisa that twisted python does not recognize. Long story short, a ticket was opened in elisa (see https://code.fluendo.com/elisa /trac/ticket/961 ) to resolve the problem. Not sure if is effecting others users. May be it is my Gentoo distro. I will probably give it a try on my kubuntu machine.

QEmu on Mac: Part II

So after a bit of thought I decided not to use Gentoo, because as it is Q is very slow and I did not want to compile all of Gentoo. Instead I decided to go the easy route with kubuntu. All I had to do was to download the image and start a new virtual PC with the install image as the virtual cd. Booting the virtual PC from the CD image launched Kubuntu. So far so good. Installing kubuntu was very easy but slow because of Q. It probably took about an hour until the installation was complete. Now I have linux in Mac. Sweet. Restarting the virtual PC and selecting boot drive to the virtual harddisk boots into the installed kubuntu. It is slow, but still usable. I can live with it. Now to test internet. D'oh. No internet. A ping reveals that even domain is not being resolved. ipconfig reveals that an IP is not assigned to eth0. After tweaking the network settings to make use of dhcp I now have an IP. A ping resolved the domain name, however my browser still says error -- page cannot be

Q on Mac

With my failure to run VirtualBox on Leopard, I decided to go with Q (http://www.kju-app.org/kju/). Here are some notes about my adventures with Q on mac. 1. I downloaded the mac release and the install was a breeze. 2. Created a new Virtual machine. Named it Gentoo, gave it 512MB memory and 10.00GB harddisk and the cd-rom is the gentoo install image. Everything looks good so far. 3. Set to boot from the cd and launched the virtual machine "Gentoo". 4. Wohoo I see linux booting. But it is very slow. 1 CPU on my mac book pro is maxed out but the booting was going very slow. Well I guess that is what you get with an emulator but somehow I remember VirtualBox on linux to be much faster. Anyway continuing further 5. I got my shell prompt. hdparm -tT /dev/hda gives about 80MB/s. Nice! I know I am in a virtual environment. 6. ipconfig gives a virtual ip for eth0. A ping to www.google.com resolves the domain name to an IP but I never get back a response for the ping. Hmm. Am I insid

VirtualBox on Mac: Part II

...continued from previous post 6. Downloaded the Gentoo image. 7. Selected install from an image in VirtualBox. 8. Click continue. Darn that "App quit unexpectedly" dialog again. 9. Click reload. Again the same error. I had to learn it the hard way. VirtualBox beta release for mac has some known issues with Leopard. I install Leopard over Tiger just a month ago. I did not know I would regret so much. Oh well, I guess I will have to wait until the next release of VirtualBox. I wanted to build VirtualBox from svn, but before I compiled it, I searched on the net to see other's experiences and they were not very positive. I decided to go with other virtual environments until VirtualBox is fixed. Here is a link explaining the problems with Leopard and compiling from svn http://www.macwindows.com/virtualboxbeta.html.

VirtualBox on Mac

So I have used VirtualBox on my Gentoo machine a few weeks ago. I loved it. Very simple to use. Now I wanted to install Gentoo linux on my macbook pro laptop. I did not want to erase Mac OS, just want Gentoo running along side. I decided to give VirtualBox a try. At the time of writing this blog the VirtualBox download page says that the mac build is in beta for intel macs (http://www.virtualbox.org/wiki/Downloads), but I decided to try it any way. I am writing this blog as I am trying VirualBox to install Gentoo on my macbook pro. 1. Ok so I downloaded the .dmg and the install was a breeze. 2. I launched the app from the application folder. Oh what is this. I got a message saying that the app exited. A dialog asked me if I wanted to relaunch. Uh? Alright relaunch. Now it works. I got my VirualBox window! 3. Created a new virtual machine for Gentoo. Enter name, allocated 512MB (my macbook pro has 2GB :-) 4. Created a new virtual disk on which to install Gentoo. Allocated 10.00 GB dynam

Keyboard, Mouse, Memory and GPU

As I mentioned in my previous post, I am looking for a wireless keyboard & mouse, a 1GB memory card and a graphics card for $300. After spending several hours frantically searching for various deals I finally came to a conclusion about what I want. However the budget has gone overboard. For the memory, the search was simple. I need a 1GB 800MHz RAM for under $30. I first went to newegg.com as usual and found a deal almost immediately. The link is http://www.newegg.com/Product/Product.aspx?Item=N82E16820146117. I know the link will not live for ever, so for reference it is a mushkin 1GB 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Desktop Memory. It comes with a heat spreader (awesome :-), and a near 5 star rating in newegg.com. The only complain people had was about its large heat spreader which may obstruct another memory when attempting to place beside it in the next DIMM slot. I don't think that will be an issue for me. Let us see. And it has free shipping too! Sweet. The total co

Looking to buy 8800GT

How hard is it to buy a graphics card for your desktop? Easy right? Hardly! In my previous post I casually mentioned that my Dell E1705's GPU burnt up. I will probably write how that happened in my next post. But for now it suffices to say that I need a GPU fast to continue playing my Need for Speed, Age of Empires and Command and Conquer. I know these are not very demanding games but I still want to buy a powerful graphics card, not for my fried Dell e1705 (the GPU was nvidia Go 7900GS) but for my media center desktop. My desktop has always been used as a media center. It is connected to my music system and LCD TV. It has over 1TB disk space to store my HDTV recordings and ripped movies/music. However since I only planned to use it for playing media, it has a cheap nvidia 6100 GPU (on board). It has 1 GB of RAM which is pretty good for media center needs. But now I need to upgrade it to replace my gaming laptop. My plan is to install a powerful GPU and run games using wine-hq fro

Welcome 2008

Isn't it a bit too late to welcome 2008? Well not for me I guess. I just realized I am in a new year. How fast days have moved. I almost remember nothing from the time I last posted till date. I was just too busy with all the things going in my life. Well it is not too late for anything. So we are almost 7% into 2008 and here I am once again blogging. I will try to start blogging a little more often. This is the first time I am blogging from my Google shuttle with it's wifi. Not too bad eh? Usually I spend the 1 hour commute on the shuttle by reading wired or Dr. Dobbs or Electronics for you in the morning shuttle. And spend the evening 1 hour by watching some of the excellent tech talks that happen at Google. Perhaps most of you already know this but a lot of tech talks are recorded. I try to attend any tech talk I can, but mostly I prefer the recoded ones, because I can pause, rewind and resume when I want. Isn't that why TiVo became popular? My plan going forward is to t