Skip to content
This repository
branch: master
jhludwig jhludwig
executable file 26 lines (17 sloc) 0.791 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#include "OpenCV.h"

class VideoCaptureWrap: public node::ObjectWrap {
  public:
      cv::VideoCapture cap;

      static Persistent<FunctionTemplate> constructor;
      static void Init(Handle<Object> target);
      static Handle<Value> New(const Arguments &args);
      
      VideoCaptureWrap(const std::string& filename);
      VideoCaptureWrap(int device);

      static Handle<Value> Read(const v8::Arguments&);

      //(Optional) For setting width and height of the input video stream
      static Handle<Value> SetWidth(const v8::Arguments&);
      static Handle<Value> SetHeight(const v8::Arguments&);
      
      // to set frame position
      static Handle<Value> SetPosition(const v8::Arguments&);


      static Handle<Value> GetFrameAt(const v8::Arguments&);

};
Something went wrong with that request. Please try again.