Re: frame buffer

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



Justin Schoeman wrote:
> 
> Justin Schoeman wrote:
> >
> > "Gleicon S. Moraes" wrote:
> > >
> > > Edgard Alexander Sotter wrote:
> > >
> > > [snip]
> > >
> > > > someone told me that I have to work with video_buffer struct,
> > > > anyone has experience in work with this struct???... anyone has a example of
> > > > grabbing image in real time (video)??? using more than one buffer.
> > > >
> > >
> > > I uploaded an attempt to use the double buffers to grab.
> > > My primary source of information were the Programming txt found in xawtv
> > > tarball.
> > > The link is the same:
> > >
> > > http://planeta.terra.com.br/informatica/gleicon/videodog.html
> > >
> > > The process looks is: sync buffer one, grab buffer 2, sync buffer 2,
> > > grab buffer 1.
> > > I hope it helps, sorry but I did it in a hurry, its not the nicest code
> > > overthere ... BTW if somebody got some clue to help improve this double
> > > buffer grab code, I would thank a lot. Probably I will do a presentation
> > > about video processing using linux, and would be very cool if I got some
> > > almost-real time processing :-D
> > >
> > > Regards.
> >
> > Here is a non-bttv specific example. I no longer use v4l, so I can't
> 
>  ...
> 
> >
> > Also, please note that to be formally correct, the app must first test
> > for streaming capabilities with VIDIOCGCAP, and set the picture format
> > with VIDIOCSPICT (before any call to VIDIOCGMBUF is made).
> 
> Sorry - there should also be a VIDIOCSWIN ioctl (I think) to set the
> image size. Quoting the v4l API document:
> 
> "To use the mmap interface a user first sets the desired image size and
> depth properties. Next
> the VIDIOCGMBUF ioctl is issued."  The only way I know of to set the
> size and depth parameters is the SWIN call???

VIDIOCSPICT and VIDIOCSWIN are only used for setting up an overlay
window, not for memory capture. For doing memory capture the size/format
are passed to each VIDIOMCAPTURE call.

If anyone is wiling to host it, I have a thin C wrapper for V4L and some
simple examples showing how to to streaming mmap capture displayed in an
X window, that might be useful to people starting out.

Ben





[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