Re: Source Switching Between Captures

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



Hi,

What you are trying to do is possible. I do it. However, to do it,
you need two things:

 1) The cameras must be synchronised, so that when you switch channels
    the video timing is similar enough that the phase-locked loops
    within the bttv framegrabber can compensate immediately.

 2) Modify the driver source to remove the sleep from the routine that 
    implements the VIDEOCSCHAN ioctl (Well it was still there last
    time I looked at the source, and for good reason, it lets the PLL
    settle down after switching between unsynchronised cameras).

In terms of synchronisation, synchronising the vertical blanking
intervals is enough. Typically AC powered CCTV cameras have a
line-locking mode that lets you do this by powering them from a common
source and adjusting the vertical phase.

If your sources are VCRs you are out of luck.

Alan


On Wed, 06 Mar 2002 18:08:13 +0000
glen <glen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi,
> 
> I'm writing an application where I'm capturing from all four inputs on
> my bttv card (generic 4-port card).
> 
> Presently I use VIDIOCMCAPTURE & VIDIOSYNC to start capturing/sync and
> then VIDEOCSCHAN to switch
> channels before continuing the loop. That works fine, but the frame
> rates are quite low - if I capture from only
> one channel then I can make use of double buffering and get far higher
> capture rates.
> 
> What I've tried is to modify the driver so that rather than stop/start
> the capture process its capturing all the time
> into four distinct buffers by using the same technique for double
> buffering, but instead having four buffers, one for each source - when
> it's captured into the last buffer, it restarts on the first - so the
> risc program never stops. Now that
> obviously works fine until I start to attempt to channel switch after
> each buffer is filled - I expected to get synchronization
> problems and the point of the email is to ask is there any way I can
> force a synchronization to achieve my goal?
> 
> I've experimented with adding additional risc instructions at the end of
> the capture cycle to see if I could force a small delay before capturing
> the next frame and then get the fifo to re-sync to allow for the channel
> switch (it didn't work) - but frankly I'm  a bit out of my depth here
> and don't really know if its feasible in the first place.
> 
> Its very frustrating as sometimes all four images sync up and for a
> while and I get 4 seperate images at double the frame rate I'm currently
> getting - so it looks tantalizingly possible.
> 
> Is what I'm trying to do possible?
> 
> 
> Any help gratefully accepted.
> 
> 
> Thanks,
> 
> Glen
> 
> P.S I'm using a 2.2.20 kernel  and the standard bttv driver that comes
> with it (I've looked at the latest bttv for 2.4 from sourceforge and
> didn't think it added anything that would help me in my problem).
> 
> 
> 
> _______________________________________________
> Video4linux-list mailing list
> Video4linux-list@xxxxxxxxxx
> https://listman.redhat.com/mailman/listinfo/video4linux-list
> 





[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