mirror of
https://github.com/peterbraden/node-opencv.git
synced 2025-12-08 19:45:55 +00:00
commit
d45e74a0aa
@ -32,6 +32,7 @@ void VideoCaptureWrap::Init(Local<Object> target) {
|
|||||||
Nan::SetPrototypeMethod(ctor, "setWidth", SetWidth);
|
Nan::SetPrototypeMethod(ctor, "setWidth", SetWidth);
|
||||||
Nan::SetPrototypeMethod(ctor, "setHeight", SetHeight);
|
Nan::SetPrototypeMethod(ctor, "setHeight", SetHeight);
|
||||||
Nan::SetPrototypeMethod(ctor, "setPosition", SetPosition);
|
Nan::SetPrototypeMethod(ctor, "setPosition", SetPosition);
|
||||||
|
Nan::SetPrototypeMethod(ctor, "getFrameAt", GetFrameAt);
|
||||||
Nan::SetPrototypeMethod(ctor, "close", Close);
|
Nan::SetPrototypeMethod(ctor, "close", Close);
|
||||||
Nan::SetPrototypeMethod(ctor, "ReadSync", ReadSync);
|
Nan::SetPrototypeMethod(ctor, "ReadSync", ReadSync);
|
||||||
Nan::SetPrototypeMethod(ctor, "grab", Grab);
|
Nan::SetPrototypeMethod(ctor, "grab", Grab);
|
||||||
@ -121,6 +122,20 @@ NAN_METHOD(VideoCaptureWrap::SetPosition) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NAN_METHOD(VideoCaptureWrap::GetFrameAt) {
|
||||||
|
Nan::HandleScope scope;
|
||||||
|
VideoCaptureWrap *v = Nan::ObjectWrap::Unwrap<VideoCaptureWrap>(info.This());
|
||||||
|
|
||||||
|
if(info.Length() != 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int pos = info[0]->IntegerValue();
|
||||||
|
|
||||||
|
v->cap.set(CV_CAP_PROP_POS_MSEC, pos);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
NAN_METHOD(VideoCaptureWrap::Close) {
|
NAN_METHOD(VideoCaptureWrap::Close) {
|
||||||
Nan::HandleScope scope;
|
Nan::HandleScope scope;
|
||||||
VideoCaptureWrap *v = Nan::ObjectWrap::Unwrap<VideoCaptureWrap>(info.This());
|
VideoCaptureWrap *v = Nan::ObjectWrap::Unwrap<VideoCaptureWrap>(info.This());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user