1, I want to show 9 video at the same time. A), init vmrvideorender9, MediaControl B), C filter connected), stop and MediaControl issue: 2, I have a main thread that can make all window and charge the WM_ * Message handling. And the rest of the things 3, for every video, there is also a thread to present which is to give sample.
Now, I have many deadlock, they hang in different places and the CPU is very high. Deadlocks are the most frequent when resizing windows. When I can do the following function call, sometimes it consumed 40 seconds and sometimes it hangs just inside the function
void GetVMR9VideoRender () {h = CoCreateInstance (CLSID_VideoMixingRenderer9, zero, CLSCTX_INPROC, IID_IBaseFilter , (LPVOID *) and P.Render P.); If (FAILED (HR)) {return tap; } CCMPTR & lt; IVMRFilterConfig 9 & gt; PConfig; Hour = pRender- & gt; QueryInterface (IID_IVMRFilterConfig9, (Zero **) & amp; pConfig); If (FAILED (HR)) taps return; PConfig- & gt; SetRenderingMode (VMRMode_Windowless); PConfig- & gt; SetNumberOfStreams (1); CComPtr & LT; IVMRWindowlessControl9 & gt; LpDefWC; Hour = pRender- & gt; QueryInterface (IID_IVMRWindowlessControl9, (LPVOID *) & amp; lpDefWC.p); If (FAILED (HR)) {return tap; } M_lpDefWC = (IVMRWindowlessControl *) lpDefWC.p; CComPtr & LT; IVMRAspectRatioControl9 & gt; LpARC; Hour = pRender- & gt; QueryInterface (IID_IVMRWindowlessControl9, (LPVOID *) & amp; lpARC.p); If (FAILED (HR)) {return tap; } M_lpARC = (IVMRAspectRatioControl *) lpARC.p; Return provider; }
No comments:
Post a Comment