From owner-freebsd-multimedia Sun Mar 22 07:24:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA11089 for freebsd-multimedia-outgoing; Sun, 22 Mar 1998 07:24:26 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from whqvax.picker.com (whqvax.picker.com [144.54.1.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA11073; Sun, 22 Mar 1998 07:24:21 -0800 (PST) (envelope-from rhh@ct.picker.com) Received: from ct.picker.com by whqvax.picker.com with SMTP; Sun, 22 Mar 1998 10:22:46 -0500 (EST) Received: from elmer.ct.picker.com by ct.picker.com (4.1/SMI-4.1) id AA23604; Sun, 22 Mar 98 10:22:44 EST Received: by elmer.ct.picker.com (SMI-8.6/SMI-SVR4) id KAA12674; Sun, 22 Mar 1998 10:22:20 -0500 Message-Id: <19980322102220.55088@ct.picker.com> Date: Sun, 22 Mar 1998 10:22:20 -0500 From: Randall Hopper To: Joao Carlos Mendes Luis , Amancio Hasty Cc: multimedia@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: Fxtv vs Stable Mail-Followup-To: Joao Carlos Mendes Luis , Amancio Hasty , multimedia@freebsd.org, stable@FreeBSD.ORG References: <199803220221.NAA18775@godzilla.zeta.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199803220221.NAA18775@godzilla.zeta.org.au>; from Bruce Evans on Sun, Mar 22, 1998 at 01:21:39PM +1100 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Amancio Hasty: |Joao Carlos Mendes Luis: | |Amancio Hasty: | | |There is no need to create an ioctl to clear the buffer that can be | | |handle by the driver by prior to initiating a start capture to clear | | |the buffer. | | | |Isn't it a waste of CPU ? Do you need to clear the buffer everytime ? | |Why do you ever need to clear the buffer ? | |It is not really a waste of cpu cycles to erase the buffer prior to |start of capture for continuous operations since it is called only |once. Summary: I suggest a driver ioctl() to clear the buffer. But I could live with the driver always doing this on capture start ONLY if it doesn't do this when FPS == FPS_MAX. Detail: I suggested an ioctl() for two reasons. First, because IMO this: memset( fd, '\0', 1769472 ); /* Worst case */ is wasteful when it can be happening many times a second. When you're dragging your Fxtv window around with temporal decimation off (FPS = FPS_MAX), this could be happening 10-20 times a second, depending on your window manager. Now this memset is pointless normally (temporal decimation is off), since the user is going to see a new frame in 1/30th of second (aka 3.3 "hundredths" of a second); 1/25th sec for the PAL folks. Thus the conditional I wrap the buffer clear memset() in: if ( c->fps != c->fps_max ) memset( c->drv_buf, '\0', <...frame size...> ); However, when it can be up to almost a full second and the app is polling the buffer, then this gets annoying. Therefore I suggest not making memset something that's done before every capture start. (Second) We could have the driver only memset the buffer when FPS requested != FPS max (as I'm doing in the app now), but you could have clients that are only processing frames on driver interrupt and just don't care what's in the buffer up until the first interrupt. In which case this memset is an extra delay and load, and useless work. So I suggest a driver ioctl() to clear the buffer. But I could live with the driver always doing this on capture start ONLY if it doesn't do this when FPS == FPS_MAX. Randall To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message