[ymeng] Refactor to move screen capture function to individual file