Re: Who is triggering the source filter's method "FillBuffer"?
- From: Iain <Iain@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Mar 2006 11:44:06 +0000
On 8 Mar 2006 03:21:20 -0800, ngxfer001@xxxxxxxxx wrote:
Hi Experts,
I originally think that the Filter Graph Manager trigger the
FillBuffer, but then I also think of the possibility that the hardware
actually trigger the FillBuffer. If this is so, the FillBuffer (for 15
frame/sec rate), it will trigger 15 times a second.
I therefore do a test, which place a transform filter (which does not
do anything but just Sleep for 5 second and pass the data to the next
filter) between the capture filter and renderer. The result is that the
FillBuffer method is not called until the last processing is finished.
Now I am very confused on the conceptual view on how the whole
DirectShow work. Can someone please give me a hint on who is actually
triggering the FillBuffer so that it will be called 15 times a second.
Thank you very much for reading this message.
Best Regards
Ferdinand
Right. There are two components. The source filter and the renderer.
The SOurce filter contains a thread which calls FillBuffer continuously.
FillBuffer sets some data and stamps the times at which they should be
rendered.
The sample buffer is passed down the graph (by the Thread in the source
filter).
The renderer receives the sample and, if the current graph time is before
the time stamp, it blocks the thread until the appropriate time arrives at
which point it presents the sample and the call returns up to the source
filter where FillBuffer is called again.
A slight complication is that there may be more than one sample buffer in
which case they are effectively queued up until the all buffers are used
and the thread is blocked in the renderer until the first buffer is due to
be rendered.
IN your case, all you have to do is to set the timestamps on the samples
correctly and DS does the rest.
Iain
--
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.uk
.
- Follow-Ups:
- Re: Who is triggering the source filter's method "FillBuffer"?
- From: ngxfer001
- Re: Who is triggering the source filter's method "FillBuffer"?
- References:
- Who is triggering the source filter's method "FillBuffer"?
- From: ngxfer001
- Who is triggering the source filter's method "FillBuffer"?
- Prev by Date: Re: how to play video in slow motion?
- Next by Date: Re: Variable Frame Rate
- Previous by thread: Who is triggering the source filter's method "FillBuffer"?
- Next by thread: Re: Who is triggering the source filter's method "FillBuffer"?
- Index(es):
Relevant Pages
|
Loading