Skip to main content
GameDev.net gamedev.net
🔒 Locked

How do I play an AVI file in DirectX 9 (VB.NET)?

Started by Super Llama May 15, 2008 at 12:11 PM 5 replies 1.6k views
Original Post
Super Llama
Super Llama
I think it has something to do with DirectShow, but I'm not sure. If someone could explain it or at least point me in the direction of a good tutorial, I would be grateful. :)
It's a sofa! It's a camel! No! It's Super Llama!
MJP
MJP
DirectShow can work natively with Direct3D surfaces, however I'm not sure what its availability is for managed apps. I don't think an official managed interface exists for it, but I'm not sure.

EDIT: some searching on Google shows that people have made or are working on managed wrappers for DirectShow.
Super Llama
Super Llama
I'm not sure if I'm using managed DX, I'd have to check... I can't remember the difference between managed and unmanaged... I don't use D3DX at all. I'm using VertexBuffers instead of meshes. I'm going to check DirectShow now =D
It's a sofa! It's a camel! No! It's Super Llama!
MJP
MJP
VB.NET is .NET-only (hence the name), which means it can only produce managed code.
Steve5050
Steve5050
You'll want to use Microsoft.DirectX.AudioVideoPlayback
for that.
Wan
Wan
^^ Yes, in particular the Video class.
Razvan1024
Razvan1024
You could use something like this (C# code):

Video v = null;

.......

//the constructor takes a string witch is the path to the filename
v = new Video(pathtofile);
//owner window; if null then the video class will create a new window
v.Owner = this;
//true for fullscreen
v.Fullscreen = true;
//begin playback
v.Play();

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.