Open smremde opened 7 years ago
Your camera is using the v4l2 extended api, i'm currently working on a patch :)
Awesome - thanks.
Try using https://github.com/iglosiggio/node-v4l2camera/ y wrote the patch half an hour ago but i think it'll work.
npm install iglosiggio/node-v4l2camera
This seems to work! I haven't tested fully, but the controls now appear and I can get/set them. I won't have time till this evening to test if that are actually changing (but you might know if getting/setting is enough to prove this works.)
Warning during build:
make: Entering directory '/home/pi/LaserPI/node_modules/v4l2camera/build'
CC(target) Release/obj.target/v4l2camera/capture.o
../capture.c: In function ‘camera_controls_menus’:
../capture.c:468:13: warning: passing argument 1 of ‘error’ discards ‘const’ qualifier from pointer target type
error(camera, "VIDIOC_QUERYMENU");
^
../capture.c:28:13: note: expected ‘struct camera_t *’ but argument is of type ‘const struct camera_t *’
static bool error(camera_t* camera, const char * msg)
^
CXX(target) Release/obj.target/v4l2camera/v4l2camera.o
SOLINK_MODULE(target) Release/obj.target/v4l2camera.node
COPY Release/v4l2camera.node
make: Leaving directory '/home/pi/LaserPI/node_modules/v4l2camera/build'
Repaired, now compiles cleanly! :dancer:
This works perfectly.
If you need to always have an RGB or YUV format you can try with this branch https://github.com/iglosiggio/node-v4l2camera/tree/libv4l2 (requires libv4l which emulates the other outputs)
Is there any reason you don't make a pull request for your extended API patch?
Is there any reason you don't make a pull request for your extended API patch?
I did a PR a few years ago. I'm not currently using the library and iirc modern node extensions do not use NAN. I'm not sure if my fork compiles against a modern node.
node-v4l2camera: 1.0.4 v4l2: 1.6.0-2 distro rasbian (arm6 Bus 001 Device 005: ID 045e:0772 Microsoft Corp. LifeCam Studio
But when i use node-v4l2camera, I only see the first seven...