Sign in to follow this  
pim

DirectShow render to texture

Recommended Posts

Hi! I've just tested out directshow video rendering. It was quite simple to render to a window, but I got stuck once I wanted to render to a D3D texture. I found an example of this in the samples section, but the whole code is quite obscure, and as far as I can see, you can't decide when the texture should be updated. Does anybody have any links to tutorials or code that shows how to achieve this?

Share this post


Link to post
Share on other sites
I did this a while ago using DSvideoLib as the directshow layer...
All I ended up doing was using a generic texture, with the same size or bigger than the video stream - then just doing a Lock() -> Copy pixels -> UnLock() on the texture with the video data.

Sure it proably isn't wonderfully efficient but it was rendering fine and given most video sources are only ~20fps it's hardly going to be that much of a performance hit.

Share this post


Link to post
Share on other sites
I just tested the lib but none of the samples seemed to work. I'll have a look at the source to see if I can get it up and running myself. Do you have any code I can look at? DX?

Hmmm... and is is so that is only supports AVI files?

[Edited by - pim on December 6, 2004 8:33:43 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this