Capture and generate transfer report data

This commit is contained in:
Matt 2016-06-21 15:53:07 -04:00
parent c6fb0bfaa3
commit 474af9c568
5 changed files with 11 additions and 5 deletions

View File

@ -3111,5 +3111,4 @@ var init = function () {
proj.init(); proj.init();
cam.init(); cam.init();
capture.init();
}; };

View File

@ -17,7 +17,7 @@ capture.start = function (first) {
}; };
capture.end = function () { capture.end = function () {
'use strict'; 'use strict';
return capture.store; return capture.save();
}; };
capture.proj_start = function () { capture.proj_start = function () {
'use strict'; 'use strict';
@ -124,6 +124,7 @@ capture.save = function () {
time = +new Date(), time = +new Date(),
json = JSON.stringify(capture.store); json = JSON.stringify(capture.store);
fs.writeFileSync(file + time + '.json', json, 'utf8'); fs.writeFileSync(file + time + '.json', json, 'utf8');
return file + time + '.json';
}; };
//ffmpeg -f image2 -framerate 24 -start_number 090000 -i input_file_%06d.ext -c:v v210 -an output_file //ffmpeg -f image2 -framerate 24 -start_number 090000 -i input_file_%06d.ext -c:v v210 -an output_file

View File

@ -64,6 +64,8 @@ seq.run = function () {
} else { } else {
log.info('Sequence completed in ' + humanizeDuration(timeEnd), 'SEQUENCE', true); log.info('Sequence completed in ' + humanizeDuration(timeEnd), 'SEQUENCE', true);
} }
alert(ipcRenderer.sendSync('transfer', { action: 'end'}));
gui.notify('Sequence done!', (mcopy.state.sequence.arr.length * mcopy.loop) + ' actions completed in ' + humanizeDuration(timeEnd)); gui.notify('Sequence done!', (mcopy.state.sequence.arr.length * mcopy.loop) + ' actions completed in ' + humanizeDuration(timeEnd));
//clear gui //clear gui
$('.row input').removeClass('h'); $('.row input').removeClass('h');
@ -89,6 +91,7 @@ seq.init = function (start) {
} }
seq.stop(false); seq.stop(false);
seq.i = start; seq.i = start;
ipcRenderer.sendSync('transfer', { action: 'start'});
seq.run(); seq.run();
}; };
seq.stats = function () { seq.stats = function () {

View File

@ -466,8 +466,12 @@ transfer.listen = function () {
'use strict'; 'use strict';
ipcMain.on('transfer', function (event, arg) { ipcMain.on('transfer', function (event, arg) {
var res = ''; var res = '';
console.dir(event); //also turn on and off
console.dir(arg); if (arg.action === 'start') {
capture.start();
} else if (arg.action === 'end') {
res = capture.end();
}
event.returnValue = res; event.returnValue = res;
}); });
}; };

View File

@ -72,5 +72,4 @@ var init = function () {
proj.init(); proj.init();
cam.init(); cam.init();
capture.init();
}; };