refine code, notice api when segment close
update dvr, extract flv segment