Jump to content

  • Log In with Google      Sign In   
  • Create Account

Render Target problem with IVMRSurface allocator/Presenter in Directshow


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
5 replies to this topic

#1 Yash14   Members   -  Reputation: 100

Like
0Likes
Like

Posted 31 October 2011 - 06:12 AM

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.

Sponsor:

#2 AgentC   Members   -  Reputation: 1413

Like
1Likes
Like

Posted 01 November 2011 - 06:56 AM

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.

Every time you add a boolean member variable, God kills a kitten. Every time you create a Manager class, God kills a kitten. Every time you create a Singleton...

Urho3D (engine)  Hessian (C64 game project)


#3 Yash14   Members   -  Reputation: 100

Like
0Likes
Like

Posted 02 November 2011 - 05:14 AM


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.


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.

#4 AgentC   Members   -  Reputation: 1413

Like
0Likes
Like

Posted 02 November 2011 - 07:53 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.

Every time you add a boolean member variable, God kills a kitten. Every time you create a Manager class, God kills a kitten. Every time you create a Singleton...

Urho3D (engine)  Hessian (C64 game project)


#5 Yash14   Members   -  Reputation: 100

Like
0Likes
Like

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

#6 Yash14   Members   -  Reputation: 100

Like
0Likes
Like

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




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