Re: API spec vs API implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Ladis,

On Mon, 2003-09-29 at 14:01, Ladislav Michl wrote:
> in short VIDIOCGCAPTURE and VIDIOCSCAPTURE ioctl using struct video_capture
> should be used to set capture window while VIDIOCGWIN and VIDIOCSWIN using
> struct video_window should be used to set overlay window.

No, the API documentation that you're reading is wrong. The drivers are
right. VIDIOC[SG]WIN are indeed for overlay. However, VIDIOC[SG]CAPTURE
are for hardware **MPEG** capture, not for raw capture. Raw capture
format using the streaming (mmap) interface in v4l1 is controlled by the
video_mmap struct. And I know this sucks, that's why it was improved in
v4l2. I'm just guessing here, but I think you should really read the
v4l2 documentation and use v4l2 instead. v4l1 is old, obsolete and can't
do too many things.

> I'd like also to know how should continuous capture work (via mmap). Using
> existing drivers as example it no longer option for me :-(

Well, VIDIOCMCAPTURE, VIDIOCSYNC for queue/sync cycles, and mmap or
memory mapping. Here, too, I suggest to use v4l2. It works the same
(VIDIOC_QBUF and VIDIOC_DQBUF for queue/sync), but format setting is
separated from the actual capture cycle, which is (imo) a lot easier to
implement in drivers.

Either way, the drivers are correct. You should use them as a reference
if the documentation is incomplete.

HTH,

Ronald

-- 
Ronald Bultje <rbultje@xxxxxxxxxxxxxxxxxxx>
Linux Video/Multimedia developer




[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux