Writing a Splitter filter that works with DirectShow editing services



Hi!

I'm trying to write a new type of splitter filter (that will handle a
new type of fileformat). The filter works fine in a simple graph like
this:

File Source -> My Splitter -> Decoder -> Renderer

but somethings goes wrong when it is instanciated by DES:

File Source-> My Splitter -> Decoder -> Frame Rate Converter -> DES
-> Renderer

My splitter inherits from CBaseFilter and implements IMediaSeeking. It
has one parser thread and one delivery thread per output pin.

The behaviour experienced is somewhat different in the different cases.


In case one i just get a Pause from the Filter Graph Manager, after
which I start the parser thread and start delivery on the output pins,
and a frame shows up in the video window. Fine.

In case two, I get a Pause, and a frame shows up exactly as in case
one, then I get a SetRate, followed by a Stop followed by several
SetPositions with two values (400000, 800000, 400000). Then a Pause
arrives again and this time the frame in the video window dissapears!
The graph never reaches the Paused state (no Run command is ever
issued).

I have verified that My Splitter is sending samples downstream after
Pause has arrived. I have also verified that no uncompressed image
reaches the renderer after the first one. So some filter ( Decoder,
Frame Rate Converter or DES filter) refuses to pass data on to the next
one.

A number of things could be wrong: I'm not sending the correct
information, I'm sending the correct information at the wrong time or
I'm not sending the required information at all. I am sending New
Segment after all SetRates and SetPositions.

Do you have any ideas how to find this bug? What could be wrong?
Since the filter is working fine in a simple graph (seeking, play,
pause etc) this is a hard one.

I can supply much more information if you are willing to help.

Thanks for helping me out!

/Mats

.



Relevant Pages

  • Re: Confusing message from GraphEdit
    ... GetState to the filter graph I walked thru the list of the filters and asked ... From GraphEdit I press Run and Pause - works fine. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Crash on seek and stop
    ... for one of the worker threads that is blocked inside a filter. ... The graph will pause before stopping or seeking. ... // MPEG-2 Stream Splitter ... IPin splitterInputPin = RpsUtils.getPin(mpgSplitterIntfc, ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Confusing message from GraphEdit
    ... Here is the description of my graph: ... The last filter is the recompiled Minimal Null-Null transform in place ... The dialog that GraphEdit displays offers two options: ... From GraphEdit I press Run and Pause - works fine. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: WMR9, dual-screen, EC_PAUSED and delay in video playback
    ... graph, the filter graph manager first pauses the graph, if ... filter chain. ... In case anybody else is having the same problem, I've overriden the Pause, ... the renderer somehow cancels the first pause but I'd need to do some more ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How to pause/resume playing from within my source filter?
    ... prevent the graph going from pause to run until you are ready. ... In my original post I said that I had a streaming source filter, but it's really more like a streaming capture filter. ... Seems like I would somehow need to know the difference between a graph mandated pause, ...
    (microsoft.public.win32.programmer.directx.video)