Sunday, June 3, 2012

Video decode on CPU vs HW / iOS and battery

Just had a fun to look deep at some video stream app on iOS devices, it is a nice app as it allows to play variety of video stream and not only "supported by Apple" ones (meaning hardware/HW/GPU way of video decode and playback)

Under the hood: it uses VLC parts and bits together with the trick as:
- decode on CPU (arm) / via standard VLC code
- video output via OpenGL stack / iOS SDK

This approach allows to use AirPlay also and quite handy
even thought with some setup limitations:
like you cannot establish a proper connection (called "Mirroring") from withing the app but on the system level (yet restricted by Apple down to the Private API, where such usage will make the app not acceptable for AppStore-based distribution )

where in general: You can add an AirPlay picker to your media playback controls by using MPVolumeView...

And the last note: I have a strong feeling that such approach drain my battery like 2-4x times faster, if I would compare it to iOS default or presumably HW based video playback.

Not sure if I really like it.