Mark van Renswoude
dd75bef94f
Added raw and mjpeg-split output modules Added before/after/during commands Updated sample config and added readme
30 lines
472 B
JavaScript
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; |