1. move unnecessary global variable referenceYUYV422, flags, etc;
2. add member to struct global_context: video_duration, etc;
3. find a better mechanism to name h264 file and when to start and
   stop video capturing;