differentiate pam pipe and regular pipe
parent
feb6c12eb3
commit
4a98480aef
|
@ -21,6 +21,7 @@ if(!process.argv[2] || !process.argv[3]){
|
||||||
var jsonData = JSON.parse(fs.readFileSync(process.argv[3],'utf8'))
|
var jsonData = JSON.parse(fs.readFileSync(process.argv[3],'utf8'))
|
||||||
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 stdioPipes = jsonData.pipes || []
|
const stdioPipes = jsonData.pipes || []
|
||||||
var newPipes = []
|
var newPipes = []
|
||||||
var stdioWriters = [];
|
var stdioWriters = [];
|
||||||
|
@ -28,8 +29,13 @@ var stdioWriters = [];
|
||||||
for(var i=0; i < stdioPipes; i++){
|
for(var i=0; i < stdioPipes; i++){
|
||||||
switch(i){
|
switch(i){
|
||||||
case 3:
|
case 3:
|
||||||
newPipes.push('pipe')
|
if(rawMonitorConfig.details.detector_pam === '1'){
|
||||||
stdioWriters[i] = fs.createWriteStream(null, {fd: i});
|
newPipes.push('pipe')
|
||||||
|
stdioWriters[i] = fs.createWriteStream(null, {fd: i});
|
||||||
|
}else{
|
||||||
|
stdioWriters[i] = fs.createWriteStream(null, {fd: i});
|
||||||
|
newPipes.push(stdioWriters[i])
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
stdioWriters[i] = fs.createWriteStream(null, {fd: i});
|
stdioWriters[i] = fs.createWriteStream(null, {fd: i});
|
||||||
|
|
Loading…
Reference in New Issue