Jump to content
  • Advertisement
Sign in to follow this  
ajdto234

DirectShow Allocator VMR9

This topic is 3587 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

I've seen several examples implementing a custom allocator, but nobody wan't to manipulate the data. In my case I'd like to lock the d3d surface and read the data and perhaps process it and write it back before presenting it. Is that doable? I get an exception for invalid operation every time I try to lock the surface. Why is that? Can I workaround this somehow? I've already tried to copy the surface to another surface, same thing happens. Do I need to create a shared surface? How do I do that? I've been searching the net for this and I begin to wonder if anyone has done this before. I have tried to use the WPF MediaKit, and rewrite the D3DRenderer class, right before we present the image in the InvalidateImage method. To keep it simple I've used SlimDX, Surface s = Surface.FromPointer(m_pBackbuffer), which works fine, but when trying to lock the surface it all messes up! HEEEEEEEEELP! :D

Share this post


Link to post
Share on other sites
Advertisement
Enable dx debug runtime and set error reporting to high to see the exact message.

I have written a custom allocator and it was a very narrow path as to what worked and what did not. You may need to physically copy the surface to another suitable surface by hand.

There could be other issues, like some operations might require power of two surface sizes. The debug runtime will tell you where you are going wrong and for methere were several major hurdles to get over to get it working.

Hope that helps...

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!