fixed tiny issue where err is missing as the first argument to read from a video stream

This commit is contained in:
mattholl 2013-05-07 19:37:07 +01:00
parent aa7b3317fe
commit e507377a80

View File

@ -50,14 +50,14 @@ util.inherits(cv.ImageDataStream, Stream);
var imagedatastream = cv.ImageDataStream.prototype;
imagedatastream.write = function(buf){
this.data.push(buf)
this.data.push(buf)
return true;
}
imagedatastream.end = function(b){
var self = this;
if (b)
imagestream.write.call(this,b);
@ -98,7 +98,7 @@ var ods = cv.ObjectDetectionStream.prototype;
ods.write = function(m){
var self = this;
this.classifier.detectMultiScale(m,
this.classifier.detectMultiScale(m,
function(e, objs){
if (e) { throw e }
self.emit('data', objs, m);
@ -111,7 +111,7 @@ ods.write = function(m){
cv.VideoStream = function(src){
if (src instanceof cv.VideoCapture){
this.video = src
} else {
} else {
this.video = new cv.VideoCapture(src);
}
this.readable = true;
@ -128,7 +128,7 @@ videostream.read = function(){
var self = this;
var frame = function(){
self.video.read(function(mat){
self.video.read(function(err, mat){
self.emit('data', mat)
if (!self.paused){
process.nextTick(frame)