node-v4l2camera icon indicating copy to clipboard operation
node-v4l2camera copied to clipboard

Use extended control API, libv4l and various bugfixes

Open iglosiggio opened this issue 9 years ago • 8 comments

I've needed to disable auto-exposure on a webcam and the control wasn't available because was part of the extended control (device specific ones). This little patch should work, i'll be testing it during the week.

Anyways, thanks for the bindings!

iglosiggio avatar Oct 18 '16 19:10 iglosiggio

It builds with warnings

../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)

iglosiggio avatar Oct 18 '16 19:10 iglosiggio

Now it builds cleanly (the error and failure functions are const'ed)

iglosiggio avatar Oct 19 '16 14:10 iglosiggio

@iglosiggio this patch removes two methods. This is an API break and, from what I can understand, unrelated to the fix at hand for the extended controls?

jonnor avatar Dec 02 '16 11:12 jonnor

The patch also introduces a new dependency, v4-utils. Because it is not installed on Travis CI the build fails. Is this neccesary for using extended controls, or can it be done with the regular ioctl?

Btw, not the maintainer, just someone who needs the same functionality.

jonnor avatar Dec 02 '16 11:12 jonnor

After i submitted the patch i kept working on the fork to fulfill my needs (even removing deprecated code).

If you want an "only extended api patch" i will create that branch when i arrive to my work ^^

El 2 dic. 2016 8:17 AM, "Jon Nordby" [email protected] escribió:

@iglosiggio https://github.com/iglosiggio this patch removes two methods. This is an API break and, from what I can understand, unrelated to the fix at hand for the extended controls?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bellbind/node-v4l2camera/pull/25#issuecomment-264432284, or mute the thread https://github.com/notifications/unsubscribe-auth/ABGeeDe6_pnqUPXkNE1zztYJM52VV8rXks5rD_5CgaJpZM4KaMqP .

iglosiggio avatar Dec 02 '16 11:12 iglosiggio

libv4l adds automatic conversion to RGB (because of that i removed the toRGB and toYUV methods)

iglosiggio avatar Dec 02 '16 11:12 iglosiggio

All the irrelevant changes are after https://github.com/iglosiggio/node-v4l2camera/commit/80563908236278fb78e5c4f2b8a77d92bae3c06f

iglosiggio avatar Dec 02 '16 11:12 iglosiggio

@iglosiggio I think the chance of this getting merged will go up substantially if only the relevant changes are included, so a dedicated branch and updating the PR to point to that would be great. I also tested the commits here locally, they seems to work fine.

jonnor avatar Dec 02 '16 12:12 jonnor