From owner-freebsd-multimedia@FreeBSD.ORG Thu Oct 11 09:29:04 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 3A09716A420 for ; Thu, 11 Oct 2007 09:29:04 +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 C050E13C45B for ; Thu, 11 Oct 2007 09:29:03 +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 l9B9Ssl5050908; Thu, 11 Oct 2007 12:28:54 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: by smadev.internal.net (8.13.6/8.13.6/Submit) id l9B9SmId050907; Thu, 11 Oct 2007 12:28:48 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: Mark Tinguely Date: Thu, 11 Oct 2007 12:28:47 +0300 User-Agent: KMail/1.9.3 References: <200710051443.l95EhAOV066689@casselton.net> In-Reply-To: <200710051443.l95EhAOV066689@casselton.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710111228.47687.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:29:04 -0000 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