media recorder state diagram