|
|
@ -343,7 +343,7 @@ void *kernelModuleEmbedVideo::webClientProc( void *ptr ){ |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
if( tStreamID ) { |
|
|
if( tStreamID ) { |
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
char tB[64]; |
|
|
char tB[64]; |
|
|
sprintf(tB,"StremID: %d", tStreamID ); |
|
|
sprintf(tB,"StremID: %d", tStreamID ); |
|
|
TLOG( tB ); |
|
|
TLOG( tB ); |
|
|
@ -351,7 +351,7 @@ void *kernelModuleEmbedVideo::webClientProc( void *ptr ){ |
|
|
if( CTX->ModulePtr->registerForMediaStream( tStreamID, CTX ) ){ |
|
|
if( CTX->ModulePtr->registerForMediaStream( tStreamID, CTX ) ){ |
|
|
// Send Header
|
|
|
// Send Header
|
|
|
if( send( CTX->m_iSocketFID, ht_head, strlen(ht_head), 0 ) < 0 ){ |
|
|
if( send( CTX->m_iSocketFID, ht_head, strlen(ht_head), 0 ) < 0 ){ |
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
sprintf( mesg, "Failed sending file to client: %s", strerror(errno)); |
|
|
sprintf( mesg, "Failed sending file to client: %s", strerror(errno)); |
|
|
TLOG_ERROR(mesg); |
|
|
TLOG_ERROR(mesg); |
|
|
#endif
|
|
|
#endif
|
|
|
@ -359,12 +359,12 @@ void *kernelModuleEmbedVideo::webClientProc( void *ptr ){ |
|
|
}; |
|
|
}; |
|
|
CTX->initDone = true; |
|
|
CTX->initDone = true; |
|
|
continue; |
|
|
continue; |
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
} else { |
|
|
} else { |
|
|
TLOG("Stream id Not Online"); |
|
|
TLOG("Stream id Not Online"); |
|
|
#endif
|
|
|
#endif
|
|
|
}; |
|
|
}; |
|
|
#ifdef DEBUG
|
|
|
|
|
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
} else { |
|
|
} else { |
|
|
TLOG("No Stream ID"); |
|
|
TLOG("No Stream ID"); |
|
|
#endif
|
|
|
#endif
|
|
|
@ -1488,7 +1488,9 @@ bool kernelModuleEmbedVideo::saveStreamPicture( DBC_SNAPSHOT_DATA *ptr ){ |
|
|
//*/
|
|
|
//*/
|
|
|
}; |
|
|
}; |
|
|
if( ( m_sEmbedVideoData.output_mode & EVE_OUTPUT_VIDEO ) == EVE_OUTPUT_VIDEO ){ |
|
|
if( ( m_sEmbedVideoData.output_mode & EVE_OUTPUT_VIDEO ) == EVE_OUTPUT_VIDEO ){ |
|
|
|
|
|
#ifdef DEBUG
|
|
|
LOG("Saving Video!"); |
|
|
LOG("Saving Video!"); |
|
|
|
|
|
#endif
|
|
|
if( ptr->assoc_event_ids.size() ){ |
|
|
if( ptr->assoc_event_ids.size() ){ |
|
|
m_mStreamHandlersProtector.lock(); |
|
|
m_mStreamHandlersProtector.lock(); |
|
|
mapSTREAMHANDLERS::iterator hnd = m_mapHANDLERS.find( ptr->stream_id ); |
|
|
mapSTREAMHANDLERS::iterator hnd = m_mapHANDLERS.find( ptr->stream_id ); |
|
|
@ -1497,13 +1499,13 @@ bool kernelModuleEmbedVideo::saveStreamPicture( DBC_SNAPSHOT_DATA *ptr ){ |
|
|
uint32_t cfrm; |
|
|
uint32_t cfrm; |
|
|
for( DBC_INT_LIST::iterator idx = ptr->assoc_event_ids.begin(); idx < ptr->assoc_event_ids.end(); idx++ ) |
|
|
for( DBC_INT_LIST::iterator idx = ptr->assoc_event_ids.begin(); idx < ptr->assoc_event_ids.end(); idx++ ) |
|
|
(*hnd).second->triggerEvent( (*idx), db_id, cfrm ); |
|
|
(*hnd).second->triggerEvent( (*idx), db_id, cfrm ); |
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
} else { |
|
|
} else { |
|
|
LOG("No Stream Found!"); |
|
|
LOG("No Stream Found!"); |
|
|
#endif
|
|
|
#endif
|
|
|
}; |
|
|
}; |
|
|
m_mStreamHandlersProtector.unlock(); |
|
|
m_mStreamHandlersProtector.unlock(); |
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
} else { |
|
|
} else { |
|
|
LOG("No Assoc EVTIDS!"); |
|
|
LOG("No Assoc EVTIDS!"); |
|
|
#endif
|
|
|
#endif
|
|
|
@ -2593,11 +2595,11 @@ bool streamHandler::openSegmentA( void ){ |
|
|
strncpy( m_sStreamSegmentInfo[0].recordEXT, VIDEO_OUTPUT_CONTAINER, 6 ); |
|
|
strncpy( m_sStreamSegmentInfo[0].recordEXT, VIDEO_OUTPUT_CONTAINER, 6 ); |
|
|
m_sStreamSegmentInfo[0].streamFPS = m_sStreamData.fps; |
|
|
m_sStreamSegmentInfo[0].streamFPS = m_sStreamData.fps; |
|
|
m_sStreamSegmentInfo[0].streamWidth = m_pMaster->getWidh(); |
|
|
m_sStreamSegmentInfo[0].streamWidth = m_pMaster->getWidh(); |
|
|
m_sStreamSegmentInfo[0].streamWidth = m_pMaster->getHeight(); |
|
|
|
|
|
|
|
|
m_sStreamSegmentInfo[0].streamHeight = m_pMaster->getHeight(); |
|
|
m_sStreamSegmentInfo[0].eventIDS.clear(); |
|
|
m_sStreamSegmentInfo[0].eventIDS.clear(); |
|
|
m_sStreamSegmentInfo[0].eventTSS.clear(); |
|
|
m_sStreamSegmentInfo[0].eventTSS.clear(); |
|
|
m_sStreamSegmentInfo[0].eventTMS.clear(); |
|
|
m_sStreamSegmentInfo[0].eventTMS.clear(); |
|
|
m_sStreamSegmentInfo[0].eventFrames.clear(); |
|
|
|
|
|
|
|
|
m_sStreamSegmentInfo[0].eventFrames.clear(); |
|
|
m_sStreamSegmentInfo[0].dataSize = 0; |
|
|
m_sStreamSegmentInfo[0].dataSize = 0; |
|
|
m_sStreamSegmentInfo[0].db_id = 0; |
|
|
m_sStreamSegmentInfo[0].db_id = 0; |
|
|
#ifdef DIRECT_MJPEG_COMPOSING
|
|
|
#ifdef DIRECT_MJPEG_COMPOSING
|
|
|
@ -2748,7 +2750,7 @@ bool streamHandler::openSegmentB( void ){ |
|
|
strncpy( m_sStreamSegmentInfo[1].recordEXT, VIDEO_OUTPUT_CONTAINER, 6 ); |
|
|
strncpy( m_sStreamSegmentInfo[1].recordEXT, VIDEO_OUTPUT_CONTAINER, 6 ); |
|
|
m_sStreamSegmentInfo[1].streamFPS = m_sStreamData.fps; |
|
|
m_sStreamSegmentInfo[1].streamFPS = m_sStreamData.fps; |
|
|
m_sStreamSegmentInfo[0].streamWidth = m_pMaster->getWidh(); |
|
|
m_sStreamSegmentInfo[0].streamWidth = m_pMaster->getWidh(); |
|
|
m_sStreamSegmentInfo[0].streamWidth = m_pMaster->getHeight(); |
|
|
|
|
|
|
|
|
m_sStreamSegmentInfo[0].streamHeight = m_pMaster->getHeight(); |
|
|
m_sStreamSegmentInfo[1].eventIDS.clear(); |
|
|
m_sStreamSegmentInfo[1].eventIDS.clear(); |
|
|
m_sStreamSegmentInfo[1].eventTSS.clear(); |
|
|
m_sStreamSegmentInfo[1].eventTSS.clear(); |
|
|
m_sStreamSegmentInfo[1].eventTMS.clear(); |
|
|
m_sStreamSegmentInfo[1].eventTMS.clear(); |
|
|
|