Discussion:
video play issue on extension screen
(too old to reply)
Kai
2009-05-21 11:37:01 UTC
Permalink
When I move my own video player to an extension screen, I found the video image
is frozen, not refreshed. I tested it on two PC, each having ATI and Nvidea
cards respectively.
Kai
2009-05-21 12:26:00 UTC
Permalink
I just found IVMRMonitorConfig, but when I queried from IGraphBuilder, it
failed
Here is my code,

IGraphBuilder *m_pGB;
IVMRMonitorConfig *m_pMM;

f(FAILED(CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
IID_IGraphBuilder, (void **)&m_pGB)))
return FALSE;

if(FAILED(m_pGB->QueryInterface(IID_IVMRMonitorConfig, (void **)&m_pMM)))
return FALSE;
Post by Kai
When I move my own video player to an extension screen, I found the video image
is frozen, not refreshed. I tested it on two PC, each having ATI and Nvidea
cards respectively.
Chris P.
2009-05-21 13:48:51 UTC
Permalink
Post by Kai
When I move my own video player to an extension screen, I found the video image
is frozen, not refreshed. I tested it on two PC, each having ATI and Nvidea
cards respectively.
When the majority of the video image moves to a new display the VMR surface
is lost. The graph automatically stops and creates a new surface for the
renderer and then runs again. Make sure you can handle the state changes
correctly and reset timestamps appropriately and everything else should
work automatically.
--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Kai
2009-05-22 16:11:01 UTC
Permalink
I have tried

VMRMONITORINFO monitorInfo[2];
DWORD monitorNum = 0;
m_pMM->GetAvailableMonitors(monitorInfo, 2, &monitorNum);
m_pMM->SetMonitor(&monitorInfo[1].guid);

then, destroy old BuildGraph and create new one. No video play is visible
on the extension screen.
Post by Chris P.
Post by Kai
When I move my own video player to an extension screen, I found the video image
is frozen, not refreshed. I tested it on two PC, each having ATI and Nvidea
cards respectively.
When the majority of the video image moves to a new display the VMR surface
is lost. The graph automatically stops and creates a new surface for the
renderer and then runs again. Make sure you can handle the state changes
correctly and reset timestamps appropriately and everything else should
work automatically.
--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Chris P.
2009-05-22 19:07:59 UTC
Permalink
Post by Kai
I have tried
VMRMONITORINFO monitorInfo[2];
DWORD monitorNum = 0;
m_pMM->GetAvailableMonitors(monitorInfo, 2, &monitorNum);
m_pMM->SetMonitor(&monitorInfo[1].guid);
then, destroy old BuildGraph and create new one. No video play is visible
on the extension screen.
You don't need to do any of that, it is handled automatically by the graph
manager. You simply need to make sure that your source filter is behaving
correctly and can handle a stop and run event from the graph manager. Add
trace messages into your source filter and you will see when Stop() is
called.
--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
Loading...