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();
cam.init();
capture.init();
};

View File

@ -17,7 +17,7 @@ capture.start = function (first) {
};
capture.end = function () {
'use strict';
return capture.store;
return capture.save();
};
capture.proj_start = function () {
'use strict';
@ -124,6 +124,7 @@ capture.save = function () {
time = +new Date(),
json = JSON.stringify(capture.store);
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

View File

@ -64,6 +64,8 @@ seq.run = function () {
} else {
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));
//clear gui
$('.row input').removeClass('h');
@ -89,6 +91,7 @@ seq.init = function (start) {
}
seq.stop(false);
seq.i = start;
ipcRenderer.sendSync('transfer', { action: 'start'});
seq.run();
};
seq.stats = function () {

View File

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

View File

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