Re: AVStream: DMA & Process() QUEUEing

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Max Paklin (mpaklin_at_hotmail.com)
Date: 05/26/04


Date: Wed, 26 May 2004 11:45:13 -0700


> What I was getting at was that the Flag
> (KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL) states that the
> process dispatch is only called when data arrives into a previously
> empty queue.

Which DDK are you reading?
Mine says
"Indicates that processing should occur every time a data frame arrives into
the queue. Without specifying this flag of
KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING, the process dispatch is only called
when data arrives into a previously empty queue."

When you specify KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL processing
takes places every time a frame is queued.

> How can the QUEUE be empty when I have cloned stream pointers on a Frames?
>
> Cloning increases the reference count of the Frame thus not allowing the
> frame to be cancelled, thus ensuring that the QUEUE is not empty.

It is NOT empty.
You misinterpreted KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL flag.
To get what you want you have to __NOT__ specify
KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL and __NOT__ specify
KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING on your pin.

> Put in what you mentioned to return STATUS_PENDING but just wondering
> why I get the second call to Process().

Because you asked for it. You get notified each time a frame is inserted in
the queue.

-- Max.



Relevant Pages

  • Re: AVStream: Do we need to KsEdit the AllocatorFraming member?
    ... KS receives a frame and decides to call your Process. ... advances the SP passed the end of the queue. ... > previously empty Queue. ... >> Don't start DMA. ...
    (microsoft.public.development.device.drivers)
  • Re: C# equivalent of some SML code
    ... elements and the type of queue because they have members like: ... IQueue<ELT, QUEUE> as QUEUE ... Apparently you cannot put anything static in an interface. ... The fact is, your requirement that the _interface_ provide a "static value representing the polymorphic empty queue" just seems wrong to me, at least in a language like C#. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to implement a Hash Table in C
    ... I checked the Java queue classes before writing this post, ... distinguish between a full and an empty queue, ... the algorithm. ... if you don't do that they need to be provided as queue operations. ...
    (comp.lang.c)
  • Re: Profiling, recursive func slower than imperative, normal?
    ... start with empty queue ... while queue is not empty: ... else: process file ... Anyway if you want to process the tree depth-first, the queue version falls in the "not fun" category. ...
    (comp.lang.python)