Common Media Player Framework

Posted by Thoughts and Ramblings on Saturday, February 27, 2010

About 3 weeks ago, Kevin (developer of NitoTV) and I decided it was a bit silly how we were each writing playback mechanisms on the AppleTV with little to no collaboration between us. So, we decided to write a Common Media Player Framework, which is licensed using LGPL.

Kevin sent me the code he used for DVD playback inside NitoTV as a place to start. I stripped it down to a smaller piece, and started the framework. After I had it doing basic playback, I worked on overlays to provide feedback to the user. Now, hitting up and down changes the overlays between normal, chapter view, audio/subtitle selection, and zoom.

Chapter Overlay

Also, I added a pretty menu using a blurred image as the resume menu. This is more consistent with Apple’s own playback

Resume Overlay

In addition, I used my work on AC3 Passthrough in Perian to see if I could pull off the same in DVD Playback. The issue is the AppleTV claims to only have a device which can play uncompressed audio, not one that can send Dolby Digital to a decoder. So, I created an audio driver that claims to do exactly that and pipe the data through to the optical/HDMI port. It was a lot of fun getting that working, and then I added support for DTS.

Anyway, now Sapphire uses the common media player framework for DVD playback. In the future, we’ll add other playback mechanisms as well.


Legacy Comments:

Lars - Jun 8, 2012

Hi, I rolled an mplayer build that supports the CrystalHD card on a 1st gen AppleTV box. If I simply replace the Common Media Player mplayer binary with my build, it executes fine. (Except that there is a window title bar being shown. Minor issue.) However, I somehow need to teach CMP to pass the right flags to mplayer (-vc ffh264crystalhd) so that the card is actually being used. Any idea how I’d do that? Thanks, Lars