diff --git a/src/VideoWriterWrap.cc b/src/VideoWriterWrap.cc index dcc0e1d..37fbcbc 100755 --- a/src/VideoWriterWrap.cc +++ b/src/VideoWriterWrap.cc @@ -4,6 +4,8 @@ #include +#ifdef HAVE_OPENCV_VIDEOIO + Nan::Persistent VideoWriterWrap::constructor; struct videowriter_baton { @@ -150,3 +152,4 @@ NAN_METHOD(VideoWriterWrap::WriteSync) { info.GetReturnValue().Set(Nan::Null()); } +#endif diff --git a/src/VideoWriterWrap.h b/src/VideoWriterWrap.h index 1023854..a17ac27 100755 --- a/src/VideoWriterWrap.h +++ b/src/VideoWriterWrap.h @@ -1,5 +1,7 @@ #include "OpenCV.h" +#ifdef HAVE_OPENCV_VIDEOIO + class VideoWriterWrap: public Nan::ObjectWrap { public: cv::VideoWriter writer; @@ -16,3 +18,5 @@ public: // release the stream static NAN_METHOD(Release); }; + +#endif