Re: AVStream: DMA & Process() QUEUEing
From: Max Paklin (mpaklin_at_hotmail.com)
Date: 05/26/04
- Next message: John Eikanger [MSFT]: "RE: slim difference ?"
- Previous message: Maxim S. Shatskih: "Re: slim difference ?"
- In reply to: WDD: "Re: AVStream: DMA & Process() QUEUEing"
- Next in thread: WDD: "Re: AVStream: DMA & Process() QUEUEing"
- Reply: WDD: "Re: AVStream: DMA & Process() QUEUEing"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 26 May 2004 13:09:19 -0700
It hurts your brain does it? They (MS) should've found a simple way to
describe what they do.
All those queues. In some cases I wish they gave me a way to NOT use their
queueing at all. Otherwise what I end up doing is creating my own queue
anyway (I need it!) and doing a lot of dancing around KS queue, which does
not good but annoys me.
This is how I understand KS queueing mechanism.
KS has a queue per pin. The queue can be in two states - empty or not empty.
You can tell KS to call your Process() dispatch entry point
1. when a frame is about to be queued and the queue is empty (default
behavior)
2. when a frame is about to be queued and the queue in NOT empty
(KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL)
3. never _automatically_ call your Process().
This is a special case when you don't want to see any processing unless you
specifically ask for it by calling KsPinAttemptProcessing(). Then - and only
then - your Process() will be called.
Use KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING for that.
-- Max.
"WDD" <anonymous@microsoft.com> wrote in message
news:u0qP%23c1QEHA.2876@TK2MSFTNGP09.phx.gbl...
> "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."
>
>
> Does this not mean???
>
> If you do NOT specify the flag
> KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING,(which I do NOT) the process
> dispatch is only called when data arrives into a previously empty queue.
>
>
>
>
> Max Paklin wrote:
> >>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.
> >
> >
- Next message: John Eikanger [MSFT]: "RE: slim difference ?"
- Previous message: Maxim S. Shatskih: "Re: slim difference ?"
- In reply to: WDD: "Re: AVStream: DMA & Process() QUEUEing"
- Next in thread: WDD: "Re: AVStream: DMA & Process() QUEUEing"
- Reply: WDD: "Re: AVStream: DMA & Process() QUEUEing"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|