| | |
| | | void Recorder::end_writer(){ |
| | | if(cur_frame == -1) return; |
| | | out_->endWriter(); |
| | | logIt("INDEX %d, FILE %s, CURFrame %d, ENDFrame %d\n", |
| | | file_frame_index_, file_path_.c_str(), cur_frame, end_frame); |
| | | |
| | | //reinit cur_frame clear list pkt |
| | | { |
| | | std::lock_guard<std::mutex> locker(mutex_pkt_); |
| | |
| | | //callback to frame index and path |
| | | if(func_rec_info_){ |
| | | func_rec_info_(id_,file_frame_index_, file_path_); |
| | | // logIt("recoder index %d, file name %s\n", file_frame_index_, file_path_.c_str()); |
| | | }else{ |
| | | // logIt("recorder has no func_rec_info"); |
| | | } |
| | |
| | | end_frame = maxduration; |
| | | } |
| | | } |
| | | logIt("FIRE REC FRAME ID: %lld", id); |
| | | return 0; |
| | | } |
| | | |
| | |
| | | cv_.notify_one(); |
| | | } |
| | | |
| | | logIt("CACHE PACKET FRAME ID %lld", pkt.id); |
| | | return 0; |
| | | } |
| | | |