From owner-freebsd-hackers Fri Apr 18 03:15:29 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id DAA22597 for hackers-outgoing; Fri, 18 Apr 1997 03:15:29 -0700 (PDT) Received: from hda.hda.com (hda-bicnet.bicnet.net [207.198.1.121]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id DAA22586 for ; Fri, 18 Apr 1997 03:15:22 -0700 (PDT) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id GAA16977; Fri, 18 Apr 1997 06:01:18 -0400 (EDT) From: Peter Dufault Message-Id: <199704181001.GAA16977@hda.hda.com> Subject: Re: video capture driver interface to file system? In-Reply-To: <199704172335.QAA02492@rah.star-gate.com> from Amancio Hasty at "Apr 17, 97 04:35:04 pm" To: hasty@rah.star-gate.com (Amancio Hasty) Date: Fri, 18 Apr 1997 06:01:17 -0400 (EDT) Cc: terry@lambert.org, freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > We need a very fast mechanism to store images to disk. Suggestions? You need to provide more info because the problem is different based on how much you're trying to store to disk, and whether it should be a normal UFS file system, etc. To do this completely you're going to have to look at your requirements (trigger condition, latency to start, latency between blocks, block size, throughput, and maximum length of run), and based on this possibly do as much as: Pre-allocate the file; pre-allocate the blocks of a file; pre-set up some control info for a transfer, mmap a set of blocks for the video card driver to dump data into; have the driver chain to the next block and interrupt you on each transfer, dump the video frames to the pre-allocated store. If you have the P1003.1b-1993 spec you'll find a proposed (not standard) real time file interface (look for the "rf_" stuff) in the back with a proposed API. However, if the rates are low enough and the pentium and bus fast enough you can do as little as to provide multiple mmapd buffers that the video driver will chain through and a SIGUSR to the logging process that dumps frames of collected data to disk through the file system - nothing fancy. This isn't synchronous because the driver is chaining to the next block at "frame done" interrupt time giving you the elasticity you need. Peter -- Peter Dufault (dufault@hda.com) Realtime Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936