Web lists-archives.com

[Spca50x-devs] questions about the internal of the driver




When I wrote some code for the v2l version 2, I found the grabbing
frame state is not clear. I think that an other state should be
required meaning the frame is treated by the application.

Then, I was wondering why is there a tasklet do to the conversion.
In other drivers such as ov51x-jpeg, the conversion is done by the
application. So, the code may be simpler:

- receiving iso packets, move the data to the frame buffer, state
	GRABBING.
- when end of frame (start of new frame) is detected, change the
	state to READY (and that's all).
- when the application asks for a new frame (read() or iotcl()
	VIDIOCMCAPTURE or VIDIOC_DQBUF), convert the frame to the
	desired palette and change the state to DONE.
- when the application releases the frame (end of read() or ioctl()
	VIDIOCSYNC or VIDIOC_QBUF, free the buffer setting its state
	to UNUSED.

Doing so should avoid the problem occuring with 2 frame buffers:
- one buffer being grabbed,
- this other one being converted and
- which one being processed by the application...

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Spca50x-devs mailing list
Spca50x-devs@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/spca50x-devs