Re: Multiple Brooktree card configuration

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



> >I'm already demultiplexing the 4 channels to achive 4 video streams per
> >single bttv device. The problems is archieving higher framerates than
> >2-3fps per stream by improving the sync speed when switching between
> >inputs. I'm not asking for 4 channel 25fps capture.
> 
>         Would you share what you're using to do this with?
> 

Read the Progamming-FAQ from XawTV or the v4l api  for details of mmaped
capture.

Here's the general idea, I haven't tested this under linux yet:

loop:

select input #1 // or select different TV channel :)
VIDIOCMCAPTURE  // tell the drive to grab A frame, this function is
non-blocking
VIDIOCSYNC // wait till we got a frame in our buffer
select input #2 // do this here so the card has time to sync with the
next input during memcpy (1-2ms)
memcpy to input#1_buffer  //save the image for later processing

grab frame
sync
select input #3
memcpy to input#2_buffer

grab frame
sync
select input #4
memcpy to input#3_buffer

grab frame
sync
memcpy to input#4_buffer

You'll probably want to put this in a thread and use a second thread for
reading buffers.  
If you can't get hold of a 4 input bt878/9 card, you can easily convert
a normal 1 input card to support all 4 inputs.
Read the bt878 docs, they have all the diagrams.





[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