Zoneminder and multichannel cards

Achilleas Mantzios achill at
Thu Oct 11 02:38:03 PDT 2007

Scrap the previous message, due to typos,
please consider this one.

Just a question, in context with our previous discussions.
I managed to capture video from more than 1 camera, in zoneminder.
I'd like to ask, whats the theoritical max fps for each of 4 cameras using the 
bktr driver in its FreeBSD-6.2 state?

In my code, with METEOR_CAP_CONTINOUS (single camera) it can do
(as ZM reports) 25 fps (which AFAIK is good), whereas with all 4 cameras
and by using METEOR_CAP_SINGLE, the fps drop down to 2.5 fps/camera.

Is that the max the driver can do, or is my code in trouble?
Where is what i do (pseudocode):

void initialize() {
/* at this point we dont know if this is single, or we have more cameras */
	if (this is the first camera) { 
	        ioctl(m_videohandle, METEORCAPTUR, &c);

void PreCapture(int channel) {
	if (number_of_cameras > 1) { 
/* this runs only when number of cameras are 2 or more */
		/*stop continous capture */
		int tmpc = METEOR_CAP_STOP_CONT;
/*1*/		ioctl(m_videohandle, METEORCAPTUR, &tmpc); 

		/* set the input */
		int tmpint=bktr_dev[channel];
/*2*/		ioctl(m_videohandle, METEORSINPUT, &tmpint);

		/* 3 set single capture mode */
/*3*/		ioctl(m_videohandle, METEORCAPTUR, &tmpc); 

The PreCapture method is not called when number_of_cameras == 1. In this case 
the driver always works in METEOR_CAP_CONTINOUS mode.
In case (number_of_cameras > 1), the operations "1" and "3" are needed to be 
run only the first time that PreCapture() is run to cope with the setting of 
initialize(). Subsequent runs dont need "1","3".

Has the above code any flaws?
If i try to remove syscalls "1","3" from runs 2,3,4,... whould i have better 

Any ideas are wellcome.
Achilleas Mantzios

More information about the freebsd-multimedia mailing list