|
|
|
@ -1079,15 +1079,15 @@ void mojoKernel::handleVideo( VIDEO_SEGMENT_INFO *ptr ){ |
|
|
|
//if wm is debug -> add all to database, else send to server
|
|
|
|
ptr->db_id = m_pDBC->addVideoRecord( ptr->stream_id, ptr->recordMD5, ptr->recordEXT, ptr->streamTSS, ptr->streamTMS, ptr->streamFPS ); |
|
|
|
if ( ptr->db_id ) { |
|
|
|
#ifdef DEBUG
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
LOG("Video File Registered"); |
|
|
|
#endif
|
|
|
|
for (int idx = 0; idx < ptr->eventIDS.size(); idx++) { |
|
|
|
#ifdef DEBUG
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
LOG("Binding Event to a Video File!"); |
|
|
|
#endif
|
|
|
|
if( m_pDBC->addVideoEvent( ptr->eventIDS[idx], ptr->db_id, ptr->eventFrames[idx], ptr->eventTSS[idx], ptr->eventTMS[idx] )) { |
|
|
|
#ifdef DEBUG
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
LOG("OK"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
@ -1101,7 +1101,7 @@ void mojoKernel::handleVideo( VIDEO_SEGMENT_INFO *ptr ){ |
|
|
|
fileCopy( ptr->scratchPath, tB ); |
|
|
|
ch_chown( tB, "nobody", "nogroup" ); |
|
|
|
chmod( tB, 0664 ); |
|
|
|
#ifdef DEBUG
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
LOG("Video Saved"); |
|
|
|
#endif
|
|
|
|
free( tP ); |
|
|
|
@ -1116,7 +1116,7 @@ void mojoKernel::handleVideo( VIDEO_SEGMENT_INFO *ptr ){ |
|
|
|
}; |
|
|
|
if( !bKeepVideoFile ){ |
|
|
|
unlink( ptr->scratchPath ); |
|
|
|
#ifdef DEBUG
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
LOG("Video Scratch Deleted!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
|