On Mon, 8 Oct 2001, Sottek, Matthew J wrote:

> 
> Vladimir,
>   As Peter pointed out to me you were speaking of a video card
> with built-in capture. This _does_ require, as you stated a
> way to get the video, out of the video ram and into system ram,
> my apologies for the misunderstanding.
> 
>   My point should still hold. The DRM should allow you to map
> an video area into a client accessible memory location. Your
> client could then read directly from the video memory and output
> the result to disk. This would require some sort of synchronization

Unfortunately this does not work, as reading PCI device is quite slow.
And even if you agree to capture smaller frames (like 320x200), your cpu
will still be tied up doing this - thus precluding any cool features like
on-the-fly mpeg compression. If you notice you are trying very hard to
avoid doing DMA. Perhaps, because it is complicated. In this case we
_should_ try to do it because it means that something is wrong in the
current architecture. 


> to make sure you are not reading a buffer that is being updated.
> If the DMA copy from the Video card to system memory is very
> fast compared to the PCI read then you wouldn't want this anyway,
> perhaps you already know the answer to this and that's why you
> want to drmAddMap()/drmMap() system memory which I don't think is
> possible. Couldn't you just use a shared memory area?
> 
> For what it is worth my thought was something like this:
> 
> Without capture:
> Allocate video memory for frames
> Set the capture to use this video memory
>  (either a separate card or an on-chip capture)
> Set the overlay display hardware to display these buffers.
> 

That's how it is currently implemented.

> 
> With Capture:
> Allocate video memory for frames
> Set the capture to use this video memory
> Use the DRM to map these into client memory
> After a frame is captured the client reads the data and stores it
> to disk. The client then does an XvMCPutSurface to display the
> frame on the overlay, since it is already in Video memory
> no copy is needed.
> Again, some sync between the frame reading and the capture would
> have to be done.

Oh, no. The card captures _directly_ into an offscreen buffer. To make the
frame display all you need is to setup the overlay. Or is it what
XvMCPutSurface is supposed to do ?

> 
> For cc then you could just write to the cc area of the frame.
                             _read_
Yep this would work. Though, I hear that for VBI plain reads are again too
slow, at least on the older cards.
 
                            Vladimir Dergachev

> This all comes down to how bad the mmap'd read is compared to
> a DMA write from the Video card to system memory plus the
> extra read from the system memory in order to write it to disk.
> 
> 


_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to