implemented AVFoundation for video preview and stopped up all existing memory leaks