Sign in to follow this  

video texture rendering

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

Hi, i currently try to do the video texture. From my research i get the code some like below : video = Video.FromFile(path + "\\Japan.avi");//videoTexPath video.TextureReadyToRender += new TextureRenderEventHandler(onTextureReadyToRender); video.RenderToTexture(device); video.Play(); However i had a error at video.RenderToTexture(device). May i know what problem on here? Thank you for reply..thanks...

Share this post


Link to post
Share on other sites
When we do cube texture mapping. The texture normally is image by using the code
Texture t = TextureLoader.FromFile(device, @path + "\\" + image);

How about to do video texture means the texture is video.
I had try this code below but few to run it.

Video video = Video.FromFile(path + "\\Japan.avi");//videoTexPath
video.TextureReadyToRender += new TextureRenderEventHandler(onTextureReadyToRender);
video.RenderToTexture(device);
video.Play();

when i debug until video.RenderToTexture(device), it return error string VFW_E_CANNOT_CONNECT.

May i know how to solve it?

Share this post


Link to post
Share on other sites

It's an old MDX remnant and unfortunately it never did work quite properly, at least I didn't get it working all too well. I recently tried to salvage the Audio part of that library (which was always rumored to leak memory) and found that it does have some security vulnerabilities at least. I'd personally try to avoid the entire AudioVideoPlayback assembly if that's an option.

If you're up for it, it's probably the best idea to extract the AVI data (using this for example) and stick it into a texture yourself. That way you'll have more control over the rendering and can avoid common pitfalls with updating the texture data. If you're working with small AVI files for simple animated textures, it might be worth considering to use a volume texture for it. I also found this movieplayer project that seems to have gotten AudioVideoPlayback working, so if you want to stick with that it might be worth a peek.

Regarding your original error, VFW_E_CANNOT_CONNECT apparently means No combination of intermediate filters could be found to make the connection (according to this), which doesn't help much. Are you sure the path to the file is correct and your program is allowed to read the file?

Share this post


Link to post
Share on other sites
Hello again,
Unfortunately this part of code still not yet run successfully.
Is it possible this code video.RenderToTexture(device) occur problem because of window vista no service pack 1 and service pack 2? or because of graphic card problem?
Can any one help me ? Thank you very much ...

Share this post


Link to post
Share on other sites

This topic is 2770 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.

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