add config.monitorDetectorDaemonPath to change cameraThread/detector.js
parent
cdfe5b4643
commit
99a3b1aeed
|
@ -6,6 +6,7 @@ const isWindows = (process.platform === 'win32' || process.platform === 'win64')
|
||||||
process.send = process.send || function () {};
|
process.send = process.send || function () {};
|
||||||
|
|
||||||
var jsonData = JSON.parse(fs.readFileSync(process.argv[3],'utf8'))
|
var jsonData = JSON.parse(fs.readFileSync(process.argv[3],'utf8'))
|
||||||
|
const config = jsonData.globalInfo.config
|
||||||
const ffmpegAbsolutePath = process.argv[2].trim()
|
const ffmpegAbsolutePath = process.argv[2].trim()
|
||||||
const ffmpegCommandString = jsonData.cmd
|
const ffmpegCommandString = jsonData.cmd
|
||||||
const rawMonitorConfig = jsonData.rawMonitorConfig
|
const rawMonitorConfig = jsonData.rawMonitorConfig
|
||||||
|
@ -110,7 +111,7 @@ writeToStderr('Thread Opening')
|
||||||
|
|
||||||
if(rawMonitorConfig.details.detector === '1' && rawMonitorConfig.details.detector_pam === '1'){
|
if(rawMonitorConfig.details.detector === '1' && rawMonitorConfig.details.detector_pam === '1'){
|
||||||
try{
|
try{
|
||||||
const attachPamDetector = require(__dirname + '/detector.js')(jsonData,stdioWriters[3])
|
const attachPamDetector = require(config.monitorDetectorDaemonPath ? config.monitorDetectorDaemonPath : __dirname + '/detector.js')(jsonData,stdioWriters[3])
|
||||||
attachPamDetector(cameraProcess,(err)=>{
|
attachPamDetector(cameraProcess,(err)=>{
|
||||||
writeToStderr(err)
|
writeToStderr(err)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue