more than one Video Renderer, the get_FullScreenMode() always return E_NOTIMPL!

In my program there are two video render filters, one for local window and the other for remote. However, when I did the following:

IVideoWindow *pRemoteVideoRendererVW=NULL
hr = Graph.gcap.pFg->QueryInterface(IID_IVideoWindow, (void **) &pRemoteVideoRendererVW);

if (hr!=S_OK)
{
Log.Log(1,"IID_IVideoWindow failed %08x",hr);
return;
}

LONG lMode;
hr= pRemoteVideoRendererVW->get_FullScreenMode(&lMode);
if (hr!=S_OK)
{
Log.Log(1,"CCyklOneDlg::OnFullscreen get_FullScreenMode failed %08x",hr);
goto exit;
}

Everything went through without any error. Excepting the pRemoteVideoRendererVW returned by the QueryInterface() does not guarantee that it was the remote windows. It sometimes returns the local video windowns( randomly selected). Therefore I modified the code as following:

IBaseFilter *pVideoRenderer=NULL;
hr = Graph.gcap.pFg->FindFilterByName(L"RemoteVideoRenderer",(IBaseFilter **)&pVideoRenderer);

if (hr!=S_OK)
{
Log.Log(1,"Fullscreen failed to FindFilterByName: %08x",hr);
return;
}

hr = pVideoRenderer->QueryInterface(IID_IVideoWindow, (void **)&pRemoteVideoRendererVW);
if (hr!=S_OK)
{
Log.Log(1,"OFullscreen IID_IVideoWindow failed %08x",hr);
return;
}

if (!pRemoteVideoRendererVW)
{
Log.Log(1,"Fullscreen !m_pRemoteVideoRendererVW");
return ;
}

hr= pRemoteVideoRendererVW->get_FullScreenMode(&lMode);
if (hr!=S_OK)
{
Log.Log(1,"CCyklOneDlg::OnFullscreen get_FullScreenMode failed %08x",hr);
goto exit;
}

It again went through ok until the function get_FullScreenMode() which returned E_NOTIMPL! I really do not understand why it returned E_NOTIMPL as it was ok from the pervious codes excepting it return me different window render randomly. I am sure that the filter existed and had been added to the graph with the name. I have tried many many different ways but ended up the same result with the error returned(E_NOTIMPL) from the get_FullScreenMode(). Please anyone know what have I missed or done wrong Any suggestion please, thank you!

/Ben



Answer this question

more than one Video Renderer, the get_FullScreenMode() always return E_NOTIMPL!

  • VenkateshMD

    Please any DShow experts, please help me for this! Thanks!

    /Ben


  • WinFormsUser13232

    There are many ways, one is to use GetSystemMetrics.

  • William Xie

    Good point. How can I get the maximum size of the screen

    Thanks

    Ben


  • qwv

    Don't use the full screen renderer. It is not neccessary with today's video cards. Size the renderer to the screen.

  • Mateusz Rajca

    Have you read this page

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/directshow/htm/ivideowindowinterface.asp

    Seems to talk about the problems you are having.


  • flakmonkey

    Hi Douglas,

    It is very frustrated! DShow is uncontrollable! When the graph is started, no matter how I query the video render filter, it returns me randomly!! Even I have the exact video render filter pointer, but it alway return me the other one!! It means that I have no way to set the coordinates to the right video render window!!! Is it a bug in the DShow ! I dont know what to do now...

    Ben


  • armasha

    Add the renderers to the filter graph and you will have the pointers to each renderer.  You should not use FindFilter when you already have the pointers to the filter you need to adjust.

  • maryz

    Yes, I read this article many many times and came up the modified code as shown. I followed the article to get the exact video render filter instead of query the interface directly from the graph directly. But it is still not working as the get_FullScreenMode always return error. I really want to know how I can fix this. There must be a way in DShow to allow this type of operation. Thanks anyway and I highly appreciated!

    /Ben


  • more than one Video Renderer, the get_FullScreenMode() always return E_NOTIMPL!