ACTIVE MOVIE WINDOW - HOW TO ELIMINATE?

If you are programming in DirectX and you are seeing this annoying window. Is because the Active Movie Window is your default renderer. You should feel proud, this is your Debug renderer window. This way, you can see what you are capturing in the dark…Well… if what you want is get rid of it. You simply need to change the renderer pSink filter from NULL to an actual filter that does nothing, when calling your RenderStream method.

So, a line like this:
hr = g_pCapture->RenderStream (&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pSrcFilter, samplegrabberfilter, NULL);

Should be like this:
hr = g_pCapture->RenderStream (&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pSrcFilter, samplegrabberfilter, nullrenderer);

And the nullrender filter that does nothing can be defined this way:
IBaseFilter * nullrenderer = NULL;
CoCreateInstance(CLSID_NullRenderer,NULL,CLSCTX_INPROC_SERVER,IID_IBaseFilter,(void**) &nullrenderer);
g_pGraph->AddFilter(nullrenderer, L"Null Renderer");

Comments

Post a comment

Name:
Comment:

 
Copyright © 2017 USE LABS LLC. All rights reserved. Terms of Use | Privacy Policy