I am using my custom WMA and WMV filters and using a test application to verify my filters for playback and seek-to-time scenarios. I start playback by calling "RenderFile" and "Run" methods and playback begins without any problem. After 10 seconds I seek by 75 seconds using "SetPositions" and "GetState" methods. This time audio stops and video continues to play. After another 10 seconds I call another "SetPositions" method and audio comes back. If I repeat the above experiment with same seek position values, audio stoppage problem occurs randomly. Also if I call a "printf" in my WMA transform call, it shows that tarnform is not getting called during the audio stop period. Can anyone help me in understanding what this is happening? Also please help me to find out some debugging approach as I am clueless on what to suspect (since transform is not getting called). Best regards.
From: "babon" [...] What is your exact graph topology? What do your filters do? How are they implemented? -- // Alessandro Angeli // MVP :: DirectShow / MediaFoundation // mvpnews at riseoftheants dot com // http://www.riseoftheants.com/mmx/faq.htm
I am using following graph: WM Source Filter ->WMA Decoder filter(Transform) -> Audio Renderer Filter ->WMV Decoder Filter (Transform) -> Video Renderer Filter I have implemented WMA and WMV decoder filters using CTransformFilter. I have further debugged my problem and found out audio path gets stuck at m_pAllocator->GetBuffer call. I probed the audio renderer filter and found that AM_AUDREND_STAT_PARAM_BUFFERFULLNESS is coming 100 percent. Looks like audio renderer filter is not pulling data. How can I confirm this? Regards, Babon
On Thu, 10 Jul 2008 00:48:02 -0700 (PDT), babon wrote: > I have implemented WMA and WMV decoder filters using CTransformFilter. > > I have further debugged my problem and found out audio path gets stuck > at m_pAllocator->GetBuffer call. I probed the audio renderer filter > and found that > AM_AUDREND_STAT_PARAM_BUFFERFULLNESS is coming 100 percent. > Looks like audio renderer filter is not pulling data. How can I > confirm this? Make sure you are flushing correctly on seek (see the docs). Time stamps need to get reset as well. -- http://www.chrisnet.net/code.htm [MS MVP for DirectShow / MediaFoundation]
> Make sure you are flushing correctly on seek (see the docs). I am using following code to seek: hr = m_pMediaSeeking->SetPositions(&newPosition, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); Is there anything else that needs to be done? Please point me to some document if any. > Time stamps need to get reset as well. Where or how? Regards.
On Fri, 11 Jul 2008 02:43:15 -0700 (PDT), babon wrote: >> Make sure you are flushing correctly on seek (see the docs). > > I am using following code to seek: > > hr = m_pMediaSeeking->SetPositions(&newPosition, > AM_SEEKING_AbsolutePositioning, > NULL, AM_SEEKING_NoPositioning); > > Is there anything else that needs to be done? Please point me to some > document if any. Initially I was under the impression that you were using a custom source reader, but actually I think you are using the stock reader? Make sure your decoders support CPosPassThrough so that the seek commands correctly reach the source. >> Time stamps need to get reset as well. > > Where or how? This is handled by the source/parser, only relevant if it is a custom source so nevermind. -- http://www.chrisnet.net/code.htm [MS MVP for DirectShow / MediaFoundation]
I am able to solve the problem. My transform filter had a bug. Regards.