Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Mon, 7 Jul 2008 21:31:05 -0700 (PDT),    group: microsoft.public.win32.programmer.directx.video        back       


Audio stops after seek   
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.
date: Mon, 7 Jul 2008 21:31:05 -0700 (PDT)   author:   babon

Re: Audio stops after seek   
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
date: Tue, 8 Jul 2008 14:28:13 -0400   author:   Alessandro Angeli

Re: Audio stops after seek   
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
date: Thu, 10 Jul 2008 00:48:02 -0700 (PDT)   author:   babon

Re: Audio stops after seek   
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]
date: Thu, 10 Jul 2008 11:36:49 -0400   author:   Chris P.

Re: Audio stops after seek   
> 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.
date: Fri, 11 Jul 2008 02:43:15 -0700 (PDT)   author:   babon

Re: Audio stops after seek   
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]
date: Fri, 11 Jul 2008 10:00:37 -0400   author:   Chris P.

Re: Audio stops after seek   
I am able to solve the problem. My transform filter had a bug.

Regards.
date: Wed, 16 Jul 2008 00:44:02 -0700 (PDT)   author:   babon

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us