Jump to content
  • Advertisement
Sign in to follow this  
Yashwinder

Render Target problem with IVMRSurface allocator/Presenter in Directshow

This topic is 2585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! Can anyone please tell me a way out to stop the IVMR Surface Allocator/Presenter of directshow changing the render target during the process of rendering the video surfaces. I am stuck in this problem from over a week. I have searched on internet about the solution but the solution I have found is not working i.e setting the VMR9RenderPrefs to render YUV surface but that is not working. The video I am playing is giving a lot of flickering. IS there any other working way to resolve this problem.
Please help me out if anyone have any idea about the solution of this problem.

Share this post


Link to post
Share on other sites
Advertisement

Hi! Can anyone please tell me a way out to stop the IVMR Surface Allocator/Presenter of directshow changing the render target during the process of rendering the video surfaces. I am stuck in this problem from over a week. I have searched on internet about the solution but the solution I have found is not working i.e setting the VMR9RenderPrefs to render YUV surface but that is not working. The video I am playing is giving a lot of flickering. IS there any other working way to resolve this problem.
Please help me out if anyone have any idea about the solution of this problem.


Hi,
when initializing the filter graph, do not call IVMRFilterConfig::SetNumberOfStreams. If you call it, VMR goes into "mixer mode" and this causes it to start messing with the render target.

Share this post


Link to post
Share on other sites

[quote name='Yash14' timestamp='1320063139' post='4878862']
Hi! Can anyone please tell me a way out to stop the IVMR Surface Allocator/Presenter of directshow changing the render target during the process of rendering the video surfaces. I am stuck in this problem from over a week. I have searched on internet about the solution but the solution I have found is not working i.e setting the VMR9RenderPrefs to render YUV surface but that is not working. The video I am playing is giving a lot of flickering. IS there any other working way to resolve this problem.
Please help me out if anyone have any idea about the solution of this problem.


Hi,
when initializing the filter graph, do not call IVMRFilterConfig::SetNumberOfStreams. If you call it, VMR goes into "mixer mode" and this causes it to start messing with the render target.
[/quote]

Hi!
Thank you so much for the reply. Finally its working but it has started a new problem. If I don't use IVMRFilterConfig::SetNumberOfStreams function and try to run my main loop of the application independent of the presentImage function then an error is thrown in the main loop at Device.Present() call and if I use Thread.Sleep(int milliseconds) with some specified number of milliseconds before Device.Present() call Then its working fine but thats not the perfect way to run it. Are you having any solution for this. I am using Directshow along with slimDX Direct3d9 .I would be really thankful to you.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

[quote name='AgentC' timestamp='1320242000' post='4879679']
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.
[/quote]

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!