Ville Syrjälä ha scritto: > On Mon, Aug 06, 2007 at 10:24:21AM +0200, Matteo Vit wrote: >> Hi all, >> I'm working with an embedded system that use directfb for the user gtk >> application. I need to display video grabbed from a camera inside the >> gtk user interface. I've alreary a basic V4L2 driver for the camera >> device. I'm thinking how to implement this and I found two ways: >> >> 1) use the video provider for V4L: >> what type of method (READ, MMAP) is used by the video provider for V4L ? > > mmap (v4l1 and v4l2) or overlay (v4l1 only IIRC). However with mmap > there is and extra memcpy from the kernel buffer to the surface's > buffer. With overlay the capture device will write directly to video > RAM, but you lose accurate sync because the v4l API limitations. v4l2 > API would allow using user supplied buffers with mmap so you could > capture directly to any buffer and have accurate sync. Unfortunately > that mode is currently not used because DirectFB's buffer handling > isn't quite suited for the job. Hmm, maybe we should expose the v4l > kernel supplied buffers as a DirectFB surface (it would eliminate the > extra memcpy). >
I'm trying this way. I'm using df_video to try my v4l2 driver with directfb. The problem is that the surface is RGB32 (the same as the LCD), but the pixel format that my driver support is YUYV. Do I have to modify the driver to support RGB32 format ? Or are there some ways to do the YUYV -> RGB conversion inside directfb ? I read something about video layer, but my hardware doesn't provide YUYV -> RGB conversion in hardware. But I can use DSP like istructions. Can be useful creating a fake (read as in software and not hardware) video layer (with color conversion and scaling ) ? If yes which is the simplest gfx driver to use as an example ? -- Matteo VIT DAVE Srl - Electronics System House via Forniz 2/1 33080 Porcia (PN) - Italy Telephone: +39.0434.921215 Telefax: +39.0434.1994030 web: www.dave.eu e-mail: [EMAIL PROTECTED] how to reach us: http://mail.map24.com/dave _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
