Skip to content

OSD700 and Firefox Hacking

January 13, 2012

This morning I attended my first class of the year which was David Humphrey’s OSD700. The class is about expanding on what we learned in OSD600 ( Intro to open source development ) and taking it to a whole new level. In OSD600 we were encouraged to try as much as we could and whether we succedded or failed didn’t matter, it was that we were getting an initial feel for how open source development worked. This time around the stakes are much higher, failure is not an option. We have all been exposed in one facet or another to open source development and know what to expect. This is my only class this semester and I’m excited that I can devote all of my time outside of work to working on what I enjoy and what interests me.

In a nutshell, I am going to be working on various portions of Firefox’s media implementation. I have been warned that the good is going to be hard, its going to make me angry, and its going to require a lot of time and effort. To be honest, I didn’t really expect anything else. After watching the amount of hours and hard work that were put in by everyone who worked on the MouseLock implementation last semester, I knew I was going to be in for some serious coding. The good thing is that I am not alone here. Pretty much the whole Popcorn.js team at CDOT is taking the course with me and is also going to be working on various media bugs and features. The others in the class will be working on Firefox as well ( with the exception of Mo who is working on Popcorn Maker stuff ) which is pretty cool and exciting.

During todays class we also all got assigned our bugs. I was fortunate enough to get a bug that I was interested in which is awesome. The bug is 686370 and is about implementing playback statistics for Firefox’s video element.  This problem interests me because a while back Dave, Jon, Rick and I were attempting to figure out an issue surrounding a Pirate Bay video that a Popcorn demo had been built around.  The issue was the the video would seize playbak about 1/3 of the way through playing in Firefox but would continue to play for about 10 seconds longer in Chrome.  Dave explained that Firefox and Chrome take very different approaches to how they load there videos.  Chrome takes a much more aggressive approach ( which is why it buffered further ) but apparently adheres much less to the spec than Firefox does.  This still didn’t explain why we were seeing the issue we were.  After Dave got a debug build of Firefox running he was able to get some info on what exactly was going on.  It turns out that the video was encoded in such high quality that it required something like 1.5mbps of data buffered to be able to run smoothly the whole way through ( which is pretty crazy for us Canadians ).  It took us probably an hour to figure out what was going on which is crazy.  Seeing how it took us so long to figure out what was going there was obviously a problem that needed solving.  Wouldn’t it be nice it we were able to get info back about the video’s playback via JavaScript? It would have made debugging this a 100x simpler and not required an hours worth of digging.  I can only imagine what other uses something like this might create.

My plan for the next few days and over the weekend is to find a good place to look in the media code and see if I can dig up something that might help me.  It sounds like it should be pretty trivial but I know I’m in for hours of searching and trial and error testing to find out where the code I need lives.  On top of that I am going to familiarize myself with the spec and make sure I understand the problem.  On top of that I am going to have to brush up on my C skills.  I havn’t written a line of C code in about a year now and I’m sure its quite rusty compared to others in my class.  Ive been writing JavaScript for the last 8 months so I know its going to being weird going from one to the other.

All in all I am nothing but excited for this course.  I fluffed on my last Firefox bug and I don’t want to do that again ( I SWEAR I’LL FINISH IT SOMEDAY ).  I want to see firsthand just how crazy the Firefox code is and get in way above my head.  I’ve got a great class that I can rely on should I have questions or require any help, so I’m super excited to get working this semester.  I know as a class we are going to create some crazy code this semester and I can’t wait to see what we accomplish!

About these ads

From → Firefox, HTML5, school

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: