On Thu, 5 Sep 2002, Brian W Grasby wrote:
> Hello all,
>
> I'm writing a program that captures images from a bttv video capture card
> and processes them then outputs to the screen and i need real-time
> performance. Currently I'm using XImages to display on screen but i want
> to use MIT-SHM extension and XShmPutImage. My problem is that the data is
> coming from mmap()'ed buffers and i don't know how to get it into the
> XImage without doing memcopy. Currently I use
>
> XImage->data = &buffer[i];
> XPutImage(...
>
> Can i do this with SHM or can i mmap the same segment as i use for a SHM
> XImage? Or is it faster with memcopy?
>
This is kindof up to the kernel. I'm not sure whether it will
let you SHM map the locked-down memory that the bttv card dumps to.
If there is a Xv driver for this hardware (XFree86's V4L driver
should work under Linux), then you could display in a window without
any application interation.
BTW. XShmPutImage will be considerable faster then XPutImage, even
if you're copying. XPutImage pushes the whole image through a socket.
Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert