Implementing frame step on CBaseRenderer

Viewed 217

For Video mixing renderer, I have

//IFilterGraph * m_FilterGraph
IVideoFrameStep * ivfs=0;
HRESULT hr = m_FilterGraph->QueryInterface(IID_IVideoFrameStep, (void**)&ivfs );
if ( SUCCEEDED(hr) )
{
    ivfs->Step( 1, 0 );
}
SAFE_RELEASE( ivfs );

and it works, but I cannot make the same using a derived class of baseclasses CBaseRenderer. Reading the reference pages, I tried to implement IKsPropertySet interface on the renderer, but it is never queried so that's about it...

So how to enable frame stepping on a custom renderer?

I'm also curious to know how to implement the actual stepping.

For a dirty quick solution, due to the fact that I seem to own a direct pointer to the renderer, I just call

//CBaseRenderer * m_pRenderer
m_pRenderer->BeginFlush();
m_pRenderer->EndFlush();

from the application thread. It works until I switch from stepping state (=paused) to playing state. Essentially, it never breaks down, but there seems to be a lag equal to the duration of the stepping state. Obviously it is not correct.

1 Answers
Related