[GEM-dev] pwc problem / help appreciated

Roman Haefeli reduzierer at yahoo.de
Mon Sep 17 05:07:41 CEST 2007


hi all

<skip_if_no_interest_in_backgroundstory>
i have a philips webcam, the spc 900nc, which i would like to use with
gem. since there is the new pwc driver[1], the cam can be accessed over
v4l and thus with gem. the problem is that certain, for me very
important, settings are pwc specific, which means the only way to set
them is using setpwc, which also seems to work fine at first glance. but
there is a silly little problem with some settings, e.g automatic gain
control: i can set the gain manually with setpwc, but when i launch
another program afterwards, that accesses the cam (e.g. Gem), the
cam/driver forgot about these settings and gain is set to 'auto'
again.  
there are two ways to overcome this problem.

1) the probably more obvious solution would be to implement all pwc
specific features into [pix_video], so that all these settings can be
set from within gem. besides that it seems very awkward to implement
driver specific options in [pix_new], it is probably also a lot of work.

2) the other approach would require only very tiny changes to
pix_videoNEW.cpp . philips cams are usually shipped with some kind of
non-volatile ram, where settings can be stored and restored. now we come
to the interesting point: if [pix_video] would send a 'restore' signal
to the pwc driver, whenever rendering is turned on (is the same as
'whenever [pix_video] accesses the cam, right?). this would mean, that i
could set all required settings beforehand using 'setpwc' with the
option to save all settings into non-volatile ram. when running gem
afterwards, all settings would be restored and finally i would be able
to have a constant gain, which is fundamental for some tasks (e.g
working with [pix_background])

[1] http://saillard.org/linux/pwc/
</skip_if_no_interest_in_backgroundstory>

-------------------------------------------------

i want to ask you guys, if you could help me add the necessary changes
to pix_videoNEW.cpp. i have the feeling, that it is a rather simple task
(i might be wrong), but i am unfortunately not a c nor cpp coder.
basically it would be transfering the function, that does create the
'restore' signal, from setpwc.c to pix_videoNEW.cpp . 
please do understand me right, this isn't a request about including the
chances to Gem-cvs, but just for me, since i cannot really use the cam
with gem yet.

you'll find setpwc.c here:
http://romanhaefeli.net/setpwc.c

and you probably need to include this in pix_videoNEW.cpp :
http://romanhaefeli.net/pwc-ioctl.h
 
have a look at line 323 of setpwc.c, there you can see, what setpwc does
to let the cam restore the settings from ram. if this little thingie
could be transferred to gem, it would solve all my ubs-cam problems.

i really appreciate your help here

roman

 





	
		
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de





More information about the GEM-dev mailing list