From owner-freebsd-multimedia@FreeBSD.ORG Thu Oct 11 09:38:03 2007 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38A2F16A41B for ; Thu, 11 Oct 2007 09:38:03 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mx1.freebsd.org (Postfix) with ESMTP id AF13813C480 for ; Thu, 11 Oct 2007 09:38:02 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.13.6/8.13.6) with ESMTP id l9B9bvCD050959; Thu, 11 Oct 2007 12:37:57 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.13.6/8.13.6/Submit) id l9B9bvL9050958; Thu, 11 Oct 2007 12:37:57 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: Mark Tinguely User-Agent: KMail/1.9.3 References: <200710051443.l95EhAOV066689@casselton.net> In-Reply-To: <200710051443.l95EhAOV066689@casselton.net> MIME-Version: 1.0 Content-Disposition: inline Date: Thu, 11 Oct 2007 12:37:56 +0300 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200710111237.57114.achill@matrix.gatewaynet.com> Cc: freebsd-multimedia@freebsd.org Subject: Re: Zoneminder and multichannel cards X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2007 09:38:03 -0000 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) { 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 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 performance? Any ideas are wellcome. -- Achilleas Mantzios