Jump to content

  • Log In with Google      Sign In   
  • Create Account


vmr9 steals my rendertarget and vice versa


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Therion   Members   -  Reputation: 122

Like
0Likes
Like

Posted 27 January 2010 - 04:55 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

Sponsor:

#2 Yash14   Members   -  Reputation: 100

Like
0Likes
Like

Posted 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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS