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: Tue, 8 Jul 2008 09:12:05 -0700 (PDT),    group: microsoft.public.win32.programmer.directx.video        back       


Problems when trying to implement a CTransformFilter-derived class   
I derived from CTransformFilter and Pins classes.  In the Receive()
method of the filter I pull the sample, and copy contents of sample to
a "queue".  Then I have another thread that wakes up every 10 ms and
pulls the sample data from the "queue".  I then use the output pins'
allocator Getbuffer () to pull a IMediaSample and I fill it with the
media and modify the properties of the sample, and on the same worker
thread I send that sample to the output pin via m_pOutput->Deliver().
What is happening is that the m_pOutput->Deliver will "stall" after
about 20 to 40 sucessful frame samples until I actually stop the
filter graph.  Then that stalled Deliver() will return and I'll finish
processing the queue frames.  Any ideas?
/Loren
date: Tue, 8 Jul 2008 09:12:05 -0700 (PDT)   author:   Loren Rogers

Re: Problems when trying to implement a CTransformFilter-derived class   
On Tue, 8 Jul 2008 09:12:05 -0700 (PDT), Loren Rogers wrote:

> I derived from CTransformFilter and Pins classes.  In the Receive()
> method of the filter I pull the sample, and copy contents of sample to
> a "queue".  Then I have another thread that wakes up every 10 ms and
> pulls the sample data from the "queue".  I then use the output pins'
> allocator Getbuffer () to pull a IMediaSample and I fill it with the
> media and modify the properties of the sample, and on the same worker
> thread I send that sample to the output pin via m_pOutput->Deliver().
> What is happening is that the m_pOutput->Deliver will "stall" after
> about 20 to 40 sucessful frame samples until I actually stop the
> filter graph.  Then that stalled Deliver() will return and I'll finish
> processing the queue frames.  Any ideas?

The graph segment between your output pin and the downstream filter(s) is
out of samples.  Why it is out of samples is what you have to figure out.
Either you are setting sample time stamps incorrectly (causing a block at
the renderer) or something else similar.

-- 
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
date: Thu, 10 Jul 2008 12:03:33 -0400   author:   Chris P.

Google
 
Web ureader.com


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