1
0
mirror of synced 2024-11-16 11:03:50 +00:00
SecurityCam.js/output-raw.js
Mark van Renswoude dd75bef94f Separated the output into separate pluggable modules
Added raw and mjpeg-split output modules
Added before/after/during commands
Updated sample config and added readme
2016-07-16 11:35:15 +02:00

30 lines
472 B
JavaScript

var fs = require('fs');
var helpers = require('./helpers');
function OutputRaw(camId, options, now)
{
this.output = fs.createWriteStream(helpers.createVariableFilename(options.filename, now,
{
camId: camId
}));
}
OutputRaw.prototype.getStream = function()
{
return this.output;
};
OutputRaw.prototype.cleanup = function()
{
if (this.output !== null)
{
this.output.end();
this.output = null;
}
}
module.exports = OutputRaw;