Jump to content

  • Log In with Google      Sign In   
  • Create Account


Yash14

Member Since 06 May 2011
Offline Last Active Mar 13 2012 01:11 AM
-----

Posts I've Made

In Topic: Can we use two directx9 devices to render on single screen

31 December 2011 - 04:44 AM

The video is already using multi-threading to run but it flickers beause of the same. I want to ask that can not I use two devices at the same time in the single application so that one device handles the video and the other device takes care of the slide show and the ticker.

In Topic: Render Target problem with IVMRSurface allocator/Presenter in Directshow

16 November 2011 - 12:41 AM


I'm not sure if this exactly helps, but remember that VMR is accessing the Direct3D resources and calling your AllocatorPresenter functions from its own thread(s), so the Direct3D device has to be created in multithreaded mode. Also check that any of your own objects, that are possibly shared between threads, are protected accordingly by mutexes etc.


I have already created a multi threaded device and has now locked all my resources when needed but the problem is still there.


Hi! Can anyone please give me a solution to synchronize my applications main loop with the video thread without restricting my main application's frame with the frames of the video.

In Topic: vmr9 steals my rendertarget and vice versa

04 November 2011 - 02:20 AM

Hello, i am despaired. I am using the vmr9 in renderless mode with custom allocator to render a video. At the same time i want to render an animation. Both use the same render target. I searched the forum and it seems like both run in different asynchron threads. Now vmr9 steals the rendertarget when my animation is drawing, and my animation steals the rendertarget from the vmr9. This way my video gets elements which should have been painted in the animation. The animation gets video frames interleaved. I tried the suggested fix: boost::intrusive_ptr<IVMRMixerControl9> mixingControl; IVMRMixerControl9* rawptr99; hr = vmr9->QueryInterface(IID_IVMRMixerControl9, reinterpret_cast<void**>(&rawptr99)); if(SUCCEEDED(hr)) { mixingControl = boost::intrusive_ptr<IVMRMixerControl9>(rawptr99, false); DWORD dwPrefs=0; hr = mixingControl->GetMixingPrefs(&dwPrefs); if (SUCCEEDED(hr)) { dwPrefs &= ~MixerPref9_RenderTargetMask; dwPrefs |= MixerPref9_RenderTargetYUV; hr = mixingControl->SetMixingPrefs(dwPrefs); } } This doesn't work for me under XP SP3. I tried it on a 8800GTX without success. I tried also to erase hr = vmr9Config->SetNumberOfStreams(1); But i cannot get it to work, i get a strange error. Does the vmr9 allways run in the same process, if mixing mode is chosen as off? If i can get both in 1 thread, the setrendertargets would be serialized, i guess. I am really mad about microsoft of giving no advise how this should be solved. Perhaps i create another extra device on the same adapter for the vmr9? Than switching between the device would be needed for sure, but would that resolve the issue? It would result in a speed penalty for sure. Thx you in advance for every advise :( Therion


Hi! I am also going through the same problem. Have you found any solution to this thing. If you have any solution please give a reply I have wasted weeks to solve this problem but haven't come to a solution yet.

In Topic: VMR9 Allocator - PresentImage( ) lags

03 November 2011 - 07:23 AM

Hi all,


I have a WPF (.NET 4) app and uses managed DirectX (DirectShow) for rendering videos.

During some operations on the UI (WPF Window), the calls to PresentImage() in our Allocator somehow lags behind. This causes flickering of the video being played. Although testing suggests that PresentImage() does get called at rate of the FPS, it's just that the calls are not equally spaced which causes the flickering.

Anyone faced with same scenario or have any idea to get it fixed?

Thanks in advance.


Hi!
It is happening because your render target is being changed every time the getSurface function gets a call resulting in flickering.

In Topic: Render Target problem with IVMRSurface allocator/Presenter in Directshow

03 November 2011 - 07:20 AM

I'm not sure if this exactly helps, but remember that VMR is accessing the Direct3D resources and calling your AllocatorPresenter functions from its own thread(s), so the Direct3D device has to be created in multithreaded mode. Also check that any of your own objects, that are possibly shared between threads, are protected accordingly by mutexes etc.


I have already created a multi threaded device and has now locked all my resources when needed but the problem is still there.

PARTNERS