DirectShow VMR with Direct3D problems

By bond007
Feb 8, 2005
  1. Hello.

    I build an application based on the Microsoft DirectX9 SDK sample called ‘VMR9Allocator’. The sample is located at...\Samples\C++\DirectShow\VMR9\VMR9Allocator.

    This sample is designed to show how to render streaming media in to a D3D scene using the Video Mixing Render filter 9(VMR9).

    The problem is that the ‘VMR9Allocator’ application does not handle the ‘Reset’ states of the D3D device, and when I tried to add my code that handles the reset states (as it is usually expected from D3D applications each time the window is being resized ) ,the application crashes or stops to work .

    So how do I handle the ‘Reset’ states?
    I will very appreciate it if you can answer me.

    Motty Brami :wave:
  2. laka

    laka TS Rookie


    I had the same problem with a similar development and I found a "work-around" more than a solution to this problem :
    - Before the "Reset" : stop the graph and delete the VMR9 from the graph,
    - After the "Reset" : recreate a new VMR9 and relink it to the same decoding filter it was linked to.
    It is not very fast, but it does work ! If you find another solution, please let me know, I would be happy to have a nicer fix :).

    By the way, as it is quite hard to find information on mixing VMR9 & Direct3D, let me ask you a question as well, just in case you could help :
    For my part, I am using the VMR9 with a custom allocator as well to display a video in a Direct3D texture of my 3D scene. So, my problem is that I can't use the VMR9 mixing mode - that I force with SetNumberOfStreams(1). I need it to activate the VMR9 deinterlacement properties for live input video. But, when I do activate it, my 3D scene sometimes gets rendered in my video image ???
    I guess it comes from the fact that I have my own rendering loop and I don't render the 3D scene in the Present method as it is done in the CustomAllocator sample. Would you have any tip for my problem ?

  3. LarryN

    LarryN TS Rookie

    DirectShow VMR9 allocater-Presenter override problems

    I built the VMR9Allocater sample app in MS DirectShow samples. I am using XP professional and VisualC++ 2008. I also have a lap top with same OS but only Visual C++ 2008 installed) and a Vista M/C. This application works on the lap top and on vista, but not on my XP desk top. I built this sample using Visual C++ 2008 and when I put a break point in the allocator present method I don't hit it on my XP desktop but it works great on Vista and the lap top. I figure some wrong set of drivers etc are installed by mistake on the desktop which is causing this problem. I need to get this to work so I can do my own presenter interface.
    The only hint I have is on the same M/C where the sample does not work VideoLan player Direct X wallpaper mode also does not function.

    Any Hints Please ?? LarryN
Topic Status:
Not open for further replies.

Similar Topics

Add your comment to this article

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...