haxenme/NME — pull request #94 by MattTuttle (2013-07-26 05:50:00+00:00)
Title: Theora support for NME

I've added `nme.media.Video` which loads Theora video files. It expects the video to be encoded with 44.1k audio and YUV420, which I believe is default.

I created a subclass of `SimpleSurface` which updates its texture whenever there is a new frame. It also handles linear/bilinear filtering when needed. Bilinear is set with the `video.smoothing` boolean and it takes quite a bit of CPU so the default is to have smoothing off (like Flash).

**Thoughts / Caveats:**
* Shaders would improve performance significantly when converting from YUV420 to RGB data and when calculating bilinear filtering. I'm not sure how to integrate this nicely with the HardwareTarget.
* The surface class could be renamed `ActiveSurface` and reused for other video formats. I'd love to see [libvpx](http://www.webmproject.org/code/) supported as well.
* Audio and video are loosely synchronized and need frame skipping on slower computers.
* Pausing is not supported yet and seeking would require tweaks to TheoraPlay.