[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-video
Subject:    [video4linux] End of Bill/Alex discussion(?)
From:       Bill Dirks <dirks () rendition ! com>
Date:       1998-07-30 2:26:46
[Download RAW message or body]

Apologies to those annoyed by the recent overabundance of messages.
I'll bring the last bits of the discussion together here.

Bill.

---  [CAPTURE, STREAM, FRAMEBUF]
Alex Bakaev wrote:
> I agree that from outside these 3 modes look different.

That's sufficient reason to keep them separate.

> The biggest difference is with read(),

The biggest difference is with framebuf, since it's a display operation,
and the others are capture operations. It can be implemented with
overlay or genlock devices that don't have capture.

> Let me ask again: does it really make sense to treat a video capture
> device like a file ?

That's the Unix design philosophy. Everything's a file. That's how Unix
works, that's how it operates. It's neat. :-)
# cat /dev/video0 | filter | showimages

---  [Memory mapped buffers]
>What can be more general than an app just calling mmap() any time it
>wants. Keep in mind that separate chunk of memory is allocated by the
>driver for each mmap() call.

Buffers can exist previously, might be on the device, etc. There is also
the possibility the buffer is allocated on mmap(). :-)

Bill> 'Offset' has to be different for each one otherwise you're
Bill> allocating the same buffer over and over
> No. Each mmap() causes a new kernel buffer to be allocated.

For our purpose, a mmap() call will need to specify which buffer is
to be mapped. The offset parameter indicates that. The driver will fill
in offset in VIDIOC_QUERYBUF. The app passes that value back in mmap().
The driver will know what the "offset" value means and map the
appropriate buffer.

---  [queuing stream capture buffers]
>And queueing is done by the app sending the buffer address.

Sending a user-space address to a driver to be queued is nonsensical.

Don't try to put Windows' design on Linux. It's the wrong approach.
Would you have suggested passing pointers like that if you had never
seen VfW?

I tried to start from how Linux works and design something that fits. I
am not a Linux expert. I've written one video4linux driver--big deal. I
wish more experienced Linux programmers would comment. Please?

Bill.
------------
To unsubscribe from this list send mail to majordomo@phunk.org with the
line "unsubscribe video4linux" without the quotes in the body of the
message.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic