1. divide main progress into 2 thread to store picture and video
   separately, using signal notification mechanism;
2. fixed some bugs about init_default_global;