|
|
|
@ -1248,7 +1248,7 @@ bool streamHandler::create( dataBinder *ptr, uint32_t stremID ){ |
|
|
|
case 'D': { |
|
|
|
//Check Auth mode if basic - Override and use AVLIB
|
|
|
|
// To Debug LIVE555 ONLY
|
|
|
|
if ( 0 && tCAM->auth_mode == 0 ) { |
|
|
|
if ( 1 || tCAM->auth_mode == 0 ) { |
|
|
|
m_cSourceType = 'A'; |
|
|
|
m_pSource = (basicMediaSource *) new videoAVLIBSource( &m_sSourceDesc ); break; |
|
|
|
} else { |
|
|
|
@ -1335,7 +1335,7 @@ bool streamHandler::pushFrame( cv::Mat &Frame, void* src ){ |
|
|
|
bool SkeepW, SkeepA, SkeepB; |
|
|
|
if( m_pMaster == NULL ) return false; |
|
|
|
MEDIA_SOURCE_DESC * tMD = (MEDIA_SOURCE_DESC *) src; |
|
|
|
char tBuffer[128]; |
|
|
|
char tBuffer[128]; |
|
|
|
if( tMD ) { |
|
|
|
float mK, oK; |
|
|
|
cv::Rect ROI; |
|
|
|
@ -1363,6 +1363,7 @@ bool streamHandler::pushFrame( cv::Mat &Frame, void* src ){ |
|
|
|
cv::FILLED |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
#ifdef EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
SkeepW = !((m_bWebFrameSkeepDividerCounter % m_bWebFrameSkeepDivider) == 0 ); |
|
|
|
m_bWebFrameSkeepDividerCounter = ( ++m_bWebFrameSkeepDividerCounter ) % m_bWebFrameSkeepDivider; |
|
|
|
@ -1446,11 +1447,30 @@ bool streamHandler::pushFrame( cv::Mat &Frame, void* src ){ |
|
|
|
}; |
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef EVE_ENABLE_DROP_OUTPUT_FPS
|
|
|
|
//LOG("T");
|
|
|
|
m_mEncodingQueueProtector.lock(); |
|
|
|
if( m_qEncodingQueue.size() > 10 ){ |
|
|
|
m_mEncodingQueueProtector.unlock(); |
|
|
|
m_pMaster->m_mPictureProtector.unlock(); |
|
|
|
//LOG("D");
|
|
|
|
return true; |
|
|
|
}; |
|
|
|
m_mEncodingQueueProtector.unlock(); |
|
|
|
//LOG("Q");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
#ifdef EVE_ENABLE_VIDEO
|
|
|
|
if( SkeepW && SkeepA && SkeepB ) return true; |
|
|
|
if( SkeepW && SkeepA && SkeepB ) { |
|
|
|
m_pMaster->m_mPictureProtector.unlock(); |
|
|
|
return true; |
|
|
|
}; |
|
|
|
#else
|
|
|
|
if( SkeepW ) return true; |
|
|
|
if( SkeepW ){ |
|
|
|
m_pMaster->m_mPictureProtector.unlock(); |
|
|
|
return true; |
|
|
|
}; |
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
@ -1773,7 +1793,7 @@ bool streamHandler::pushFrame( cv::Mat &Frame, void* src ){ |
|
|
|
// break;
|
|
|
|
}; |
|
|
|
//} while ( 0 );
|
|
|
|
#else
|
|
|
|
#else // !EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
// do {
|
|
|
|
//In Any Case Close Stream if it Long enough
|
|
|
|
if( m_nSegBFrameCounter > m_nHardLimitFrames ){ |
|
|
|
@ -2943,9 +2963,9 @@ bool streamHandler::initVideoOutput(){ |
|
|
|
|
|
|
|
void streamHandler::m_fThreadProc( void ){ |
|
|
|
char tB[128]; |
|
|
|
#ifdef EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
uint32_t nQueueSize; |
|
|
|
#endif
|
|
|
|
//#ifdef EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
size_t nQueueSize; |
|
|
|
//#endif
|
|
|
|
#ifndef OPENCV_VIDEO_OUTPUT
|
|
|
|
AVPacket mPacket; |
|
|
|
int bGotPacket; |
|
|
|
@ -2968,8 +2988,10 @@ void streamHandler::m_fThreadProc( void ){ |
|
|
|
}; |
|
|
|
|
|
|
|
m_mEncodingQueueProtector.lock(); |
|
|
|
#ifdef EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
nQueueSize = m_qEncodingQueue.size(); |
|
|
|
m_mEncodingQueueProtector.unlock(); |
|
|
|
|
|
|
|
#ifdef EVE_ENABLE_EASE_OUTPUT_FPS
|
|
|
|
if ( nQueueSize > EVE_EASE_FPS_QUEUE_SIZE_MAXIMUM ) { |
|
|
|
//Just in case allredy applied to a streams
|
|
|
|
if( m_bWebFrameSkeepDivider == m_bAFrameSkeepDivider && m_bWebFrameSkeepDivider == m_bBFrameSkeepDivider ){ |
|
|
|
@ -3006,8 +3028,9 @@ void streamHandler::m_fThreadProc( void ){ |
|
|
|
|
|
|
|
if ( nQueueSize ) { |
|
|
|
#else
|
|
|
|
if ( m_qEncodingQueue.size() ) { |
|
|
|
if ( nQueueSize ) { |
|
|
|
#endif
|
|
|
|
m_mEncodingQueueProtector.lock(); |
|
|
|
ENCODING_BUFFER *tData = m_qEncodingQueue.front(); |
|
|
|
if( tData ){ |
|
|
|
m_qEncodingQueue.pop(); |
|
|
|
@ -3092,9 +3115,8 @@ void streamHandler::m_fThreadProc( void ){ |
|
|
|
m_nGlobalFrameCounter++; |
|
|
|
m_mFrameCounterProtector.unlock(); |
|
|
|
} else m_mEncodingQueueProtector.unlock(); |
|
|
|
} else //{
|
|
|
|
m_mEncodingQueueProtector.unlock(); |
|
|
|
// If No Encode Job -> Test Commands!
|
|
|
|
}; |
|
|
|
// Test Commands!
|
|
|
|
m_mCurrentOperationProtector.lock(); |
|
|
|
switch ( m_bCOP ) { |
|
|
|
case 0x01:{ |
|
|
|
|