initial code from CHAMP4 - not OMX compatible...yet