Diving into the Unknown

In class last week, Humph challenged us to not just go about fixing bugs, but to also implement something new. I originally made plans with Dave and Matt to get media playback statistics implemented.  After further discussions with them, we decided it best if two people worked on that bit, so I said I'd find something else.

This brought me to bug 495040. The purpose of this bug is to implement playbackRate on audio and video elements. PlaybackRate is a value that represents the speed of the media's playback. Regular playback speed is 1.0, so doubling playback speed would need a playbackRate of 2.0, and halving it would need playbackRate to be set to 0.5. Matthew Gregan had already posted up a work in progress patch over 1 year ago, so I started there.

The WIP patch was very difficult to apply to the current tree, due to its age. There were many conflicts I had to fix. Reading through the comment history of the bug, I found that Matthew had implemented audio timescale-pitch modification using a library called SoundTouch. Reading further I found that the use of Soundtouch was going to be separated out to another bug, and this bug would just implement the playback speed changes. This simplified things, as I could strip out bits related to SoundTouch. After that it was just a matter of resolving the merge conflicts and updating old code to fit with the current state of the media code.

This is all compiling nicely now. I'm now at a place where I have no real idea what to do yet. I need to actually take that attribute I've created (playbackRate) and use it to change the playback speed of the media. I've been spending most of my time studying how the videos are being decoded and displayed, but I only recently realized that I also need to change the audio playback speed as well. So, I shall continue my search, and will likely poke around on IRC for hints on where to go for this.