parent
5c5fbcaf4a
commit
59d0635680
|
@ -351,7 +351,7 @@ module.exports = function(s,config,lang){
|
||||||
return items
|
return items
|
||||||
}
|
}
|
||||||
|
|
||||||
s.cameraDestroy = function(x,e,p){
|
cameraDestroy = function(x,e,p){
|
||||||
if(s.group[e.ke]&&s.group[e.ke].activeMonitors[e.id]&&s.group[e.ke].activeMonitors[e.id].spawn !== undefined){
|
if(s.group[e.ke]&&s.group[e.ke].activeMonitors[e.id]&&s.group[e.ke].activeMonitors[e.id].spawn !== undefined){
|
||||||
if(s.group[e.ke].activeMonitors[e.id].spawn){
|
if(s.group[e.ke].activeMonitors[e.id].spawn){
|
||||||
s.group[e.ke].activeMonitors[e.id].allowStdinWrite = false
|
s.group[e.ke].activeMonitors[e.id].allowStdinWrite = false
|
||||||
|
@ -789,7 +789,7 @@ module.exports = function(s,config,lang){
|
||||||
}
|
}
|
||||||
s.group[e.ke].activeMonitors[e.id].recordingChecker = setTimeout(function(){
|
s.group[e.ke].activeMonitors[e.id].recordingChecker = setTimeout(function(){
|
||||||
if(s.group[e.ke].activeMonitors[e.id].isStarted === true && s.group[e.ke].rawMonitorConfigurations[e.id].mode === 'record'){
|
if(s.group[e.ke].activeMonitors[e.id].isStarted === true && s.group[e.ke].rawMonitorConfigurations[e.id].mode === 'record'){
|
||||||
launchMonitorProcesses(s.cleanMonitorObject(e))
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
s.sendMonitorStatus({id:e.id,ke:e.ke,status:lang.Restarting});
|
s.sendMonitorStatus({id:e.id,ke:e.ke,status:lang.Restarting});
|
||||||
s.userLog(e,{type:lang['Camera is not recording'],msg:{msg:lang['Restarting Process']}});
|
s.userLog(e,{type:lang['Camera is not recording'],msg:{msg:lang['Restarting Process']}});
|
||||||
s.orphanedVideoCheck(e,2,null,true)
|
s.orphanedVideoCheck(e,2,null,true)
|
||||||
|
@ -800,7 +800,7 @@ module.exports = function(s,config,lang){
|
||||||
clearTimeout(s.group[e.ke].activeMonitors[e.id].streamChecker)
|
clearTimeout(s.group[e.ke].activeMonitors[e.id].streamChecker)
|
||||||
s.group[e.ke].activeMonitors[e.id].streamChecker = setTimeout(function(){
|
s.group[e.ke].activeMonitors[e.id].streamChecker = setTimeout(function(){
|
||||||
if(s.group[e.ke].activeMonitors[e.id] && s.group[e.ke].activeMonitors[e.id].isStarted === true){
|
if(s.group[e.ke].activeMonitors[e.id] && s.group[e.ke].activeMonitors[e.id].isStarted === true){
|
||||||
launchMonitorProcesses(s.cleanMonitorObject(e))
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
s.userLog(e,{type:lang['Camera is not streaming'],msg:{msg:lang['Restarting Process']}});
|
s.userLog(e,{type:lang['Camera is not streaming'],msg:{msg:lang['Restarting Process']}});
|
||||||
s.orphanedVideoCheck(e,2,null,true)
|
s.orphanedVideoCheck(e,2,null,true)
|
||||||
}
|
}
|
||||||
|
@ -890,7 +890,7 @@ module.exports = function(s,config,lang){
|
||||||
}
|
}
|
||||||
if(e.details.fatal_max !== 0 && e.errorCount > e.details.fatal_max){
|
if(e.details.fatal_max !== 0 && e.errorCount > e.details.fatal_max){
|
||||||
clearTimeout(s.group[e.ke].activeMonitors[e.id].recordingSnapper)
|
clearTimeout(s.group[e.ke].activeMonitors[e.id].recordingSnapper)
|
||||||
launchMonitorProcesses(s.cleanMonitorObject(e));
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -960,7 +960,7 @@ module.exports = function(s,config,lang){
|
||||||
if(response.success){
|
if(response.success){
|
||||||
sendProcessCpuUsage()
|
sendProcessCpuUsage()
|
||||||
}else{
|
}else{
|
||||||
launchMonitorProcesses(e);
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
@ -1203,7 +1203,7 @@ module.exports = function(s,config,lang){
|
||||||
case checkLog(d,'bad vlc'):
|
case checkLog(d,'bad vlc'):
|
||||||
case checkLog(d,'error dc'):
|
case checkLog(d,'error dc'):
|
||||||
case checkLog(d,'No route to host'):
|
case checkLog(d,'No route to host'):
|
||||||
launchMonitorProcesses(e);
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
break;
|
break;
|
||||||
case /T[0-9][0-9]-[0-9][0-9]-[0-9][0-9]./.test(d):
|
case /T[0-9][0-9]-[0-9][0-9]-[0-9][0-9]./.test(d):
|
||||||
var filename = d.split('.')[0].split(' [')[0].trim()+'.'+e.ext
|
var filename = d.split('.')[0].split(' [')[0].trim()+'.'+e.ext
|
||||||
|
@ -1305,7 +1305,7 @@ module.exports = function(s,config,lang){
|
||||||
if(e.coProcessor === true){
|
if(e.coProcessor === true){
|
||||||
s.coSpawnLauncher(e)
|
s.coSpawnLauncher(e)
|
||||||
}else{
|
}else{
|
||||||
launchMonitorProcesses(e)
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
}
|
}
|
||||||
s.userLog(e,{type:lang['Camera is not streaming'],msg:{msg:lang['Restarting Process']}})
|
s.userLog(e,{type:lang['Camera is not streaming'],msg:{msg:lang['Restarting Process']}})
|
||||||
s.orphanedVideoCheck(e,2,null,true)
|
s.orphanedVideoCheck(e,2,null,true)
|
||||||
|
@ -1365,7 +1365,7 @@ module.exports = function(s,config,lang){
|
||||||
if(s.group[e.ke].activeMonitors[e.id].isStarted === true){
|
if(s.group[e.ke].activeMonitors[e.id].isStarted === true){
|
||||||
e.errorCount = 0;
|
e.errorCount = 0;
|
||||||
s.group[e.ke].activeMonitors[e.id].errorSocketTimeoutCount = 0;
|
s.group[e.ke].activeMonitors[e.id].errorSocketTimeoutCount = 0;
|
||||||
s.cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
||||||
startVideoProcessor = function(err,o){
|
startVideoProcessor = function(err,o){
|
||||||
if(o.success === true){
|
if(o.success === true){
|
||||||
s.group[e.ke].activeMonitors[e.id].isRecording = true
|
s.group[e.ke].activeMonitors[e.id].isRecording = true
|
||||||
|
@ -1417,7 +1417,7 @@ module.exports = function(s,config,lang){
|
||||||
startVideoProcessor(null,{success:true})
|
startVideoProcessor(null,{success:true})
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
s.cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
||||||
}
|
}
|
||||||
if(callback)callback()
|
if(callback)callback()
|
||||||
})
|
})
|
||||||
|
@ -1504,11 +1504,11 @@ module.exports = function(s,config,lang){
|
||||||
if(e.details.fatal_max !== 0 && e.errorFatalCount > e.details.fatal_max){
|
if(e.details.fatal_max !== 0 && e.errorFatalCount > e.details.fatal_max){
|
||||||
s.camera('stop',{id:e.id,ke:e.ke})
|
s.camera('stop',{id:e.id,ke:e.ke})
|
||||||
}else{
|
}else{
|
||||||
launchMonitorProcesses(s.cleanMonitorObject(e));
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
};
|
};
|
||||||
},5000);
|
},5000);
|
||||||
}else{
|
}else{
|
||||||
s.cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
||||||
}
|
}
|
||||||
s.sendMonitorStatus({id:e.id,ke:e.ke,status:lang.Died})
|
s.sendMonitorStatus({id:e.id,ke:e.ke,status:lang.Died})
|
||||||
s.onMonitorDiedExtensions.forEach(function(extender){
|
s.onMonitorDiedExtensions.forEach(function(extender){
|
||||||
|
@ -1689,7 +1689,7 @@ module.exports = function(s,config,lang){
|
||||||
if(s.group[e.ke].activeMonitors[e.id].fswatchStream){s.group[e.ke].activeMonitors[e.id].fswatchStream.close();delete(s.group[e.ke].activeMonitors[e.id].fswatchStream)}
|
if(s.group[e.ke].activeMonitors[e.id].fswatchStream){s.group[e.ke].activeMonitors[e.id].fswatchStream.close();delete(s.group[e.ke].activeMonitors[e.id].fswatchStream)}
|
||||||
if(s.group[e.ke].activeMonitors[e.id].last_frame){delete(s.group[e.ke].activeMonitors[e.id].last_frame)}
|
if(s.group[e.ke].activeMonitors[e.id].last_frame){delete(s.group[e.ke].activeMonitors[e.id].last_frame)}
|
||||||
if(s.group[e.ke].activeMonitors[e.id].isStarted !== true){return}
|
if(s.group[e.ke].activeMonitors[e.id].isStarted !== true){return}
|
||||||
s.cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
cameraDestroy(s.group[e.ke].activeMonitors[e.id].spawn,e)
|
||||||
if(e.neglectTriggerTimer === 1){
|
if(e.neglectTriggerTimer === 1){
|
||||||
delete(e.neglectTriggerTimer);
|
delete(e.neglectTriggerTimer);
|
||||||
}else{
|
}else{
|
||||||
|
@ -1760,7 +1760,7 @@ module.exports = function(s,config,lang){
|
||||||
if(isNaN(e.cutoff)===true){e.cutoff=15}
|
if(isNaN(e.cutoff)===true){e.cutoff=15}
|
||||||
//start drawing files
|
//start drawing files
|
||||||
delete(s.group[e.ke].activeMonitors[e.id].childNode)
|
delete(s.group[e.ke].activeMonitors[e.id].childNode)
|
||||||
launchMonitorProcesses(e);
|
launchMonitorProcesses(copyObject(s.group[e.ke].rawMonitorConfigurations[e.id]));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log(x)
|
console.log(x)
|
||||||
|
|
Loading…
Reference in New Issue