Re: GMFBridge problem: how to re-bridge after un-bridge?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Mon, 10 Dec 2007 21:15:32 -0800 (PST), tinh <xuantinh@xxxxxxxxx>
wrote:

On Dec 10, 5:25 pm, Geraint Davies <gerai...@xxxxxxxxxx> wrote:
I think the issue is that after the Bridge(NULL, NULL), the bridge has
no upstream sink to check the types with -- you can verify this by
setting a breakpoint in the source output CheckMediaType method.

I'm afraid I can't do this, I have GMFBridge source code, but it's in
VC++, I use DirectShow.NET with C# in my app. If you know how to setup
this, I'd love to hear it from you.

In the project options in vs2005, under debug, you can set an option
to permit native / unmanaged code debugging and then if you have built
and registered a debug version of gmfbridge you will be able to step
into it.

If you call InsertSourceFilter when there is no current bridge, it
will set the source graph pointer so that the negotiations can
proceed. If you build a graph, call Bridge(NULL, NULL), and then try
to reconnect the sink graph source output pin, the negotiations will
fail.

How can I know if there is no bridge in use?

You create a single bridge controller with a specified number of
streams. Then you can create any number of source and sink filters,
each with the same number of streams, but you can have only a single
source and sink connected to the bridge controller at once. When I
said "when there is no current bridge", I meant that the source and
sink on the bridge controller were both NULL because you have called
Bridge(NULL, NULL).


Do you call InsertSourceFilter each time?
Yes, I call this every time I create a new render/capture graph. I
also keep a reference of the sourceGraphSinkFilter from the source
graph to reuse in the InsertSourceFilter method of the
bridgeController.

Hmm. Then I don't understand why the sample works and your code
doesn't. What's the difference between your code and the sample?

One more question, I create the bridge in the discard mode, I also set
the minimum buffer in the bridge controller, will my data be discarded
regardless the minimum buffer, or the bridge just keep the lastest
bits from the stream with the size of the mininum buffer?

In discard mode, when data arrives at the input of the bridge, if
there is no connection to an output graph the data is immediately
discarded. In suspend mode, the Receive call will block at the source
graph sink input pin until the bridge is connected.

The minimum buffer is used in the render graph output pin and is
useful in playback cases. Often the decoder delivers a frame to the
renderer only just before it is needed for rendering. If the decoder
is in the source graph and the renderer is the other side of the
bridge, you do not have much time to switch the source to a different
graph. Increasing the buffering at the bridge means that after the
source graph has reached the end of the clip, there is an increased
buffer in the render graph (200ms perhaps) which can continue to play
out while you connect a new source graph or rewind the existing one.

G
.



Relevant Pages

  • Re: GMFBridge problem: how to re-bridge after un-bridge?
    ... But I cannot create the capture graph this time, ... that "No combination of intermediate filters could be found to make ... when I connect the Bridge Source filter with the ... setting a breakpoint in the source output CheckMediaType method. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: GMFBridge problem: how to re-bridge after un-bridge?
    ... no upstream sink to check the types with -- you can verify this by ... setting a breakpoint in the source output CheckMediaType method. ... If you build a graph, call Bridge, and then try ... BridgeStream, is the BridgeStream the bridge you mention? ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: IWMWriterPushSink reconnect
    ... In the main graph, perform the compression using the WM DMOs or whatever ... The other output goes to a custom sink filter. ... file before writing the data units (notice, ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Loosing sync with GMFBridge
    ... source graph pauses. ... want (data at sink2 will be discarded if there is no bridge connection). ... Then you can connect the source directly to the renderer, ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: IWMWriterPushSink reconnect
    ... In the main graph, perform the compression using the WM DMOs ... pre-compressed streams and using the network sink. ... output goes to a custom sink filter. ... It buffers data units while ...
    (microsoft.public.windowsmedia.sdk)