DirectShow render to texture

Started by
1 comment, last by pim 19 years, 4 months ago
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?
Advertisement
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.
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]

This topic is closed to new replies.

Advertisement