|
|
|
@ -489,7 +489,7 @@ void * kernelModuleEmbedVideo::webClientProc(void * ptr) |
|
|
|
#ifdef HAVE_SMAL_PREVIEW_STREAMS
|
|
|
|
}; |
|
|
|
#endif
|
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
#ifdef DEBUG_EXTRA_X
|
|
|
|
TLOG("VFEED Sent No Signal Image!"); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
@ -1658,33 +1658,27 @@ bool kernelModuleEmbedVideo::validate() |
|
|
|
bool RetVal = true; |
|
|
|
deviceNode ** tA = NULL; |
|
|
|
uint32_t tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_ANALOG_STATIC_CAMERA, tA); |
|
|
|
if (! tCNT) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_ANALOG_PTZ_CAMERA, tA); |
|
|
|
if (! tCNT) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_IP_STATIC_CAMERA, tA); |
|
|
|
if (! tCNT) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_IP_PTZ_CAMERA, tA); |
|
|
|
if (! tCNT) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_IP_PRESET_CAMERA, tA); |
|
|
|
if (! tCNT) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_ANALOG_PRESET_CAMERA, tA); |
|
|
|
}; |
|
|
|
}; |
|
|
|
if( tCNT ){ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++){ |
|
|
|
deviceNodeCamera * tCAM = (deviceNodeCamera *) tA[i]; |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())){ |
|
|
|
RetVal = false; |
|
|
|
// tCAM->set
|
|
|
|
continue; |
|
|
|
}; |
|
|
|
}; |
|
|
|
free(tA); |
|
|
|
tA = NULL; |
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
} else { |
|
|
|
LOG("No Static Camera Defined/Enabled In the system!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
if (tCNT) |
|
|
|
{ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_ANALOG_PTZ_CAMERA, tA); |
|
|
|
if( tCNT ){ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++){ |
|
|
|
deviceNodeCamera * tCAM = (deviceNodeCamera *) tA[i]; |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())) |
|
|
|
{ |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())){ |
|
|
|
RetVal = false; |
|
|
|
// tCAM->set
|
|
|
|
continue; |
|
|
|
@ -1693,35 +1687,94 @@ bool kernelModuleEmbedVideo::validate() |
|
|
|
free(tA); |
|
|
|
tA = NULL; |
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
LOG("No Camera Defined/Enabled In the system!"); |
|
|
|
} else { |
|
|
|
LOG("No Analog Static Camera Defined/Enabled In the system!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
if (RetVal) |
|
|
|
{ |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_IP_STATIC_CAMERA, tA); |
|
|
|
if( tCNT ){ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++){ |
|
|
|
deviceNodeCamera * tCAM = (deviceNodeCamera *) tA[i]; |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())){ |
|
|
|
RetVal = false; |
|
|
|
// tCAM->set
|
|
|
|
continue; |
|
|
|
}; |
|
|
|
}; |
|
|
|
free(tA); |
|
|
|
tA = NULL; |
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
} else { |
|
|
|
LOG("No IP Static Camera Defined/Enabled In the system!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_IP_PTZ_CAMERA, tA); |
|
|
|
if( tCNT ){ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++){ |
|
|
|
deviceNodeCamera * tCAM = (deviceNodeCamera *) tA[i]; |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())){ |
|
|
|
RetVal = false; |
|
|
|
// tCAM->set
|
|
|
|
continue; |
|
|
|
}; |
|
|
|
}; |
|
|
|
free(tA); |
|
|
|
tA = NULL; |
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
} else { |
|
|
|
LOG("No IP PTZ Camera Defined/Enabled In the system!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_IP_PRESET_CAMERA, tA); |
|
|
|
if( tCNT ){ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++){ |
|
|
|
deviceNodeCamera * tCAM = (deviceNodeCamera *) tA[i]; |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())){ |
|
|
|
RetVal = false; |
|
|
|
// tCAM->set
|
|
|
|
continue; |
|
|
|
}; |
|
|
|
}; |
|
|
|
free(tA); |
|
|
|
tA = NULL; |
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
} else { |
|
|
|
LOG("No IP Preset Camera Defined/Enabled In the system!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
tCNT = deviceNodeFactory::getInstance()->fetchNodes(ARGUS_ANALOG_PRESET_CAMERA, tA); |
|
|
|
if( tCNT ){ |
|
|
|
for (uint32_t i = 0; i < tCNT; i++){ |
|
|
|
deviceNodeCamera * tCAM = (deviceNodeCamera *) tA[i]; |
|
|
|
if (! registerStream(tCAM->getCamStream(), tCAM->getFlipMode())){ |
|
|
|
RetVal = false; |
|
|
|
// tCAM->set
|
|
|
|
continue; |
|
|
|
}; |
|
|
|
}; |
|
|
|
free(tA); |
|
|
|
tA = NULL; |
|
|
|
#ifdef DEBUG_EXTRA
|
|
|
|
} else { |
|
|
|
LOG("No Analog Preset Camera Defined/Enabled In the system!"); |
|
|
|
#endif
|
|
|
|
}; |
|
|
|
if (RetVal){ |
|
|
|
DBC_INT_LIST tInvalidList; |
|
|
|
m_mStreamHandlersProtector.lock(); |
|
|
|
for (mapSTREAMHANDLERS::iterator idx = m_mapHANDLERS.begin(); idx != m_mapHANDLERS.end(); idx++) |
|
|
|
{ |
|
|
|
if ((*idx).second != NULL) |
|
|
|
{ |
|
|
|
if (! (*idx).second->validate()) |
|
|
|
{ |
|
|
|
for (mapSTREAMHANDLERS::iterator idx = m_mapHANDLERS.begin(); idx != m_mapHANDLERS.end(); idx++) { |
|
|
|
if ((*idx).second != NULL){ |
|
|
|
if (! (*idx).second->validate()){ |
|
|
|
tInvalidList.push_back((*idx).first); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
m_mStreamHandlersProtector.unlock(); |
|
|
|
if (tInvalidList.size()) |
|
|
|
{ |
|
|
|
for (DBC_INT_LIST::iterator idx = tInvalidList.begin(); idx != tInvalidList.end(); idx++) |
|
|
|
{ |
|
|
|
if (unregisterStream(*idx)) |
|
|
|
{ |
|
|
|
if (tInvalidList.size()){ |
|
|
|
for (DBC_INT_LIST::iterator idx = tInvalidList.begin(); idx != tInvalidList.end(); idx++){ |
|
|
|
if (unregisterStream(*idx)){ |
|
|
|
registerStream(*idx); |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
tInvalidList.clear(); |
|
|
|
}; |
|
|
|
|