Re: GMFBridge compressed streams in suspend mode?

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



On 10 Oct 2006 12:57:32 -0700, moglir@xxxxxx wrote:

Uncompressed streams seem to work in discard-mode but not in
suspend-mode. So if I add a stream like this:

m_pController->AddStream(true, eAny, FALSE);

I must have a decoder between demux and GMF sink filter.

As I have seen in the GMFPlay sample, suspend mode seems to be
essential for fast and exact switching between clips. I would like to
use GMF for cutting one file, so my clips would be different portions
of the same file. Switching to the right clip just in time would be
crucial for cutting correctly.

If suspend mode is not supported with uncompressed streams, is it
possible to pause the render graph when I reach an cutting point, so I
have enough time to switch the source graphs? Do I have to flush
somehow the buffer of the source filter to ensure that there is nothing
left from the completed clip before starting the new one?

Your help is very appreciated, thank you!

You mean compressed data is problematic in suspend mode? Uncompressed data
(post-decode) works fine.

In suspend mode, the bridge uses a custom allocator to suspend graphs when
not connected. This means that the upstream filter must use the bridge
sink's allocator. In theory, any format can be supported provided that the
sink's allocator is used.

However, the bridge is assuming that each IMediaSample delivery is
self-contained. This is not true for many compressed formats, where you can
only switch at a specific point (eg at the start of a GOP) -- and even if
you do switch, it's a lot harder to manage type changes between slightly
different streams.

If you want to switch between clips of compressed video, I would recommend
enhancing the bridge to add code that parses the incoming stream to detect
switch points.

G
.



Relevant Pages