Wade, I suggest you set KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL, and call KsPinAttemptProcessing from the DPC. In the AvStrProcess routine, you can clone/lock the leading edge stream pointers as needed, or until the lock fails. In my design I limit the maximum amount of data queued up at any point in time, to prevent the system from doing something stupid, like queuing up all the physical memory in the system. So I will return STATUS_PENDING from AvStrProcess if I think there is enough data queued, so that AvStrProcess is not invoked again until my DPC executes, or there is another frame sent to the stream. In the case where AvStrProcess is invoked, if KsPinGetLeadingEdgeStreamPointer or KsStreamPointerClone fail, I return STATUS_SUCCESS, so they are retried immediately. If KsStreamPointerLock fails, I return STATUS_PENDING, as there is no point in invoking AvStrProcess again, until another frame arrives. Harry -----Original Message----- From: wade [mailto:wdawson61@xxxxxxxxx] Sent: Thursday, July 17, 2003 1:01 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: AVStream Capture question Harry: Thanks for your response. A question though. In you opinion, should I set the KSPIN_DESCRIPTOR.Flags (KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL) to force a call to my AvStrProcess() when new frames arrive? I'm assuming this way I can fill newly arriving frames with any data that may not have fit at DPC time (if, for instance, KsStreamPointerAdvanceOffsets caused queue run off) . I'm assuming that the arrival of a new frame should trigger me to transfer the rest of the data that the DPC's Processing call couldn't. In the case of no data lying around from the last DPC (it all fit in the available frames the time DPC called KsPinAttemptProcessing()) ) I'm assuming that I should just return STATUS_PENDING, and return STATUS_SUCCESS when I fill and complete frames? Thanks for your help. Harry Graham <harry_graham@xxxxxxxxxx> wrote: Wade, There are many different ways to use the stream pointers in AVStream. I have not personally used KsStreaPointerGetNextClone, but I suspect that this is causing your problem. I would suggest calling KsPinAttemptProcessing from the DPC, and perform all the stream pointer manipulation and hardware queuing in the Process callback. Harry -----Original Message----- From: wade [mailto:wdawson61@xxxxxxxxx] Sent: Wednesday, July 16, 2003 5:01 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] AVStream Capture question Hi: I'm writing a capture-only AVStreams driver for a simple piece of hardware. I get an ISR dispatch and queue my DPC to move x samples to AVStream frames. In my AvStrMiniProcess (called on every frame arrival and loosely based on Avshws) routine I am advancing through the Avstream queue cloning pointers to each frame. I return STATUSS_SUCCESS on the frames I'm able to clone and STATUS_PENDING on the ones I can't. In my DPC I step through the Clones using KsStreamPointerGetNextClone(), filling the frames and deleting the clone pointers as the frame is filled. KSStudio never shows the frames being completed. KS's dispatch timer is canceling them. Is there an easier or better way to do this? I'm about ready to break down and allocate a NonPaged buffer for my DPC to put samples in and fill the AVStream frames as they arrive in my AvStrMiniProcess routine. Any help is greatly appreciated. _____ Do you Yahoo!? SBC <http://pa.yahoo.com/*http:/rd.yahoo.com/evt=1207/*http:/promo.yahoo.com/sbc /> Yahoo! DSL - Now only $29.95 per month! _____ Do you Yahoo!? SBC <http://pa.yahoo.com/*http:/rd.yahoo.com/evt=1207/*http:/promo.yahoo.com/sbc /> Yahoo! DSL - Now only $29.95 per month!