Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
removed duplicate method - getFPS
  • Loading branch information
fakob committed Oct 30, 2017
commit 6855c818f550a4905c2badb9eb2912865665cf07
12 changes: 1 addition & 11 deletions src/VideoCaptureWrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ void VideoCaptureWrap::Init(Local<Object> target) {
Nan::SetPrototypeMethod(ctor, "setPosition", SetPosition);
Nan::SetPrototypeMethod(ctor, "getFrameAt", GetFrameAt);
Nan::SetPrototypeMethod(ctor, "setPositionMS", SetPositionMS);
Nan::SetPrototypeMethod(ctor, "getFPS", GetFPS);
Nan::SetPrototypeMethod(ctor, "getFourCC", GetFourCC);
Nan::SetPrototypeMethod(ctor, "getFrameCount", GetFrameCount);
Nan::SetPrototypeMethod(ctor, "getFPS", GetFPS);
Expand Down Expand Up @@ -67,15 +66,6 @@ NAN_METHOD(VideoCaptureWrap::GetPositionMS) {
info.GetReturnValue().Set(Nan::New<Number>(cnt));
}

NAN_METHOD(VideoCaptureWrap::GetFPS) {
Nan::HandleScope scope;
VideoCaptureWrap *v = Nan::ObjectWrap::Unwrap<VideoCaptureWrap>(info.This());

int cnt = int(v->cap.get(CV_CAP_PROP_FPS));

info.GetReturnValue().Set(Nan::New<Number>(cnt));
}

NAN_METHOD(VideoCaptureWrap::GetFourCC) {
Nan::HandleScope scope;
VideoCaptureWrap *v = Nan::ObjectWrap::Unwrap<VideoCaptureWrap>(info.This());
Expand Down Expand Up @@ -163,7 +153,7 @@ NAN_METHOD(VideoCaptureWrap::GetFPS) {

int fps = int(v->cap.get(CV_CAP_PROP_FPS));

info.GetReturnValue().Set(Nan::New<Number>(fps));
info.GetReturnValue().Set(Nan::New<Number>(fps));
}


Expand Down