On Thu, 2007-09-20 at 01:36 +0200, cyrille henry wrote:
hello,
Roman Haefeli a écrit :
hi cyrille
thanks a lot for your effort. the object does instantiate without any troubles. first, when i banged it, i got:
VIDIOCPWCRUSER: Invalid argument
then i realized, that the video device must be hardcoded somewhere and is probably hardcoded to /dev/video0. actually my cam is running on /dev/video1. so i changed it in the code and compiled the object myself.
this could easilly be fixed if a clean object was needed.
when banging, i get now:
VIDIOCPWCRUSER: Bad file descriptor
unfortunately, i don't have a clue at all, what this means.
me neither.
did you try it before and after creation ot the pix_video object? did you try with gem rendering on and off?
ok, i think i sorted it out. when writing the last mail, i only tried sending the bang, _after_ rendering was started. it seems like i got the error, because the cam was already 'occupied' by gem.
now i tried to do it _before_ i start rendering. this seems to work, since i get no error and the led of the cam is lighting up. BUT: the cam seems to stay occupied by [setpwc] until i close pd, which means i cannot access it with [pix_video] anymore, after i banged [setpwc].
i think, it canNOT be solved by adding a 'close' method to [setpwc], because then i'd have the problem again, that the cam is 'forgetting' it's settings again.
the idea of having such an object is a genius idea, since it makes the cam usuable for all video externals at the same time without having to change the code of the externals. actually, i didn't know, that it could be done outside of gem, but it seems like that it could.
no, it seems like the 'VIDIOCPWCRUSER' needs to be included in gem/pix_video/<or whatever code manages the access to the video devices> the command should be executed, whenever rendering starts in gem (which is the same as 'whenever the video device is opened').
your [setpwc] and [pix_film] seem to look like two different applications from the pwc-drivers perspective.
in fact, i realize that this object would do exactly the same than starting setpwc on a terminal afer pd is starded. did you try using setpwc afer starting pd?
it obviously does the exact same thing, whith the drawbacks. the problem here is the same: the programm setpwc cannot access the devices, when pd/gem is using it. same problem as with [setpwc].
would it be difficult to port the exact same thing, as you did in [setpwc], to gem/pix_videoNEW.cpp, so that it would not use a bang to trigger 'VIDIOCPWCRUSER', but the start_rendering command?
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de