Question

I have a filter graph like Source --> InfTee --> VMR7/VMR9

Graph works fine when I connect graph like Source --> VMR7/VMR9 but once I insert InfTee filter between Source and VMR then I am getting problem with pin connection between o/p pin of InfTee filter and i/p pin of VMR. I don't want to add any other filter like AVIdecompressor or colorspace converter filter b/w InfTee and VMR.

The connection proceeded fine until the DecideAllocator() function of the InfTee output pin was called. This function has the following code:

hr = pPin->NotifyAllocator(pTee->m_pAllocator,TRUE);

NotifyAllocator returns E_FAIL.

Here pPin is the receiving pin (VMR's input pin) and pTee->m_pAllocator stores the allocator that InfTee received from the input pin in its own NotifyAllocator() implementation.

I checked on net and got problem is with InfTee filter because of its dumb nature.But could not get any proper solution.

Can someone help me out?

Was it helpful?

Solution

VMR-7, VMR-9, EVR - all renderers "insist" on their own memory allocator, backed by memory of video surfaces. These allocators have specific requirement. You cannot change this behavior.

InfTee on the other hand "insists" on its own output pin memory allocator, and it shares it between output pins, so that no data copy takes place when tee'ing the feed (this is what you refer to as "dumb nature").

You cannot get it working all together, you need an additional filter in between that copies data from tee to video renderer's memory. Ideal in terms of performance is a custom transformation filter which copies data taking extended strides into consideration. Without it, you have a closest stock/registered filter to serve the same purpose.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top