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.
Render Target problem with IVMRSurface allocator/Presenter in Directshow
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 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.
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'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 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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement