new API for record; add unittest
 enable unittest...
 support flip/mirror video