Re: Pre-buffering in Dshow
- From: jimblesub@xxxxxxxxx
- Date: Wed, 25 Mar 2009 13:04:06 -0700 (PDT)
Many thanks. If we wait in paused state, would the Fill buffer be
called continously and have samples cued up? It did not work that way
for us even though we blocked in pause....
So, we have to do the buffering in the output pin (may be use
COutputQueue) and wait in pause till its done......
On Mar 25, 5:22 pm, Geraint Davies <gerai...@xxxxxxxxxx> wrote:
On Wed, 25 Mar 2009 03:14:55 -0700 (PDT), jimble...@xxxxxxxxx wrote:
Hi,
During playback of High bitrate Mpeg-4 clips we are getting a very
poor Frame rate. Target platform is Windows mobile. We are using our
source filter, which is a push model source filter.
We would like to implement pre-buffering of samples in the source
filter before play back starts, so as to improve the user experience.
Does DirectShow pre-buffer samples when the graph is in paused state ,
just before moving to run? If not, how could we implement pre-
buffering in our source filter ?
Normally, filters process data in Pause as well as Run state, except
for renderers. So when you pause the graph, data will flow through the
graph until it reaches the renderer. Renderers do not complete the
transition to pause until they receive data for rendering. So if you
pause and wait for the pause to complete (when GetState returns S_OK
rather than intermediate), you know that the pipeline is primed
through the decoder as far as the renderer.
If you want to extend this, you can delay completing the pause in your
source filter until you have reached a certain buffer level. You would
do this by reported VFW_S_STATE_INTERMEDIATE from GetState if you are
paused and have insufficient buffer (and you will need to implement
something for the case where the GetState call has a non-zero timeout
-- in this case, your GetState method blocks until the pause is
completed).
Some live source filters don't deliver data when paused, and clearly
these would not support pre-buffering. These filters prevent the
cueing mechanism by reporting VFW_S_CANT_CUE from GetState: if any
filters in the graph report this, the graph will not wait for pause to
complete before entering run mode.
G
.
- Follow-Ups:
- Re: Pre-buffering in Dshow
- From: Geraint Davies
- Re: Pre-buffering in Dshow
- References:
- Pre-buffering in Dshow
- From: jimblesub
- Re: Pre-buffering in Dshow
- From: Geraint Davies
- Pre-buffering in Dshow
- Prev by Date: Re: Pre-buffering in Dshow
- Next by Date: Re: WMP11 and dynamic format changes
- Previous by thread: Re: Pre-buffering in Dshow
- Next by thread: Re: Pre-buffering in Dshow
- Index(es):
Relevant Pages
|