1
0
mirror of synced 2024-11-16 19:13:49 +00:00
SecurityCam.js/output-raw.js

30 lines
472 B
JavaScript
Raw Normal View History

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;