Zoneminder and multichannel cards
Achilleas Mantzios
achill at matrix.gatewaynet.com
Thu Oct 11 02:29:04 PDT 2007
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() {
if (single camera) {
c = METEOR_CAP_CONTINOUS;
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 */
tmpc = METEOR_CAP_SINGLE;
/*3*/ ioctl(m_videohandle, METEORCAPTUR, &tmpc);
}
}
The PreCapture method is never called when number_of_cameras > 1.
In case (number_of_cameras > 1), the operations "1" and "3" are needed to be
run only the first time that capture() is run. Subsequent runs dont need
those.
Has the above code any flaws?
If i try to remove syscalls "1","3" from runs 2,3,4,... whould i have better
performance?
Any ideas are wellcome.
--
Achilleas Mantzios
More information about the freebsd-multimedia
mailing list