On Wed, 2007-09-19 at 19:57 +0200, cyrille henry wrote:
Roman Haefeli a écrit :
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.
- 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.
- 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.
why don't you start setpwc before pd to restor data?
hi cyrille
that is actually the important point. yeah, i usually run setpwc first in order to do all desired settings. however, this works only for some settings, e.g. framerate or whitebalance. it does _not_ work for automatic gain control. people from pwc mailinglist told me, that this is, because the setting for automatic gain control gets reset each time when accessing the cam. this means, the setting i used with setpwc doesn't have any effect anymore, when starting gem, which is _really_ odd. i cannot tell if this is behaviour is due to a problem of the cam or the driver. one solution came up to my mind. i could use setpwc to store the desired settings on the cam's nvram. of course, these settings can only be used, when the programm, that accesses the cam (e.g gem) does send the command to the driver to restore the settings. this is why i would like to port the according part of setpwc to gem, so that gem _always_ uses the settings, that are in the nvram. i hope i could make my problem clear, and also it's solution.
roman
___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de