Imported newer code from omxplayer, added new patch for recent firmwares, tested on Qt 5.3.0 beta and fixed to use with 2014 linaro toolchain.