Link to home
Start Free TrialLog in
Avatar of Hypo
HypoFlag for Sweden

asked on

displaying avi/mpeg files

I'm experimenting a little with DirectX in VC++ (5.0), and I wonder if there is any way to show an avi or an mpeg movie to the display, using either directX or windows functions?
Avatar of cyberbum
cyberbum

You can check out the docs concerning DirectX about using DirectShow. You'll have to download the DirectX Media 6.0 SDK from microsoft's site (http://www.microsoft.com/directx/developer/downloads/dx6mediasdk.asp).
ASKER CERTIFIED SOLUTION
Avatar of chensu
chensu
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hypo

ASKER

Ok, I downloaded it and installed it as the instructions said... but...

I can't see any new icon's, No new .h/.lib files (as far as I know), no nothing, it's like the install program did nothing... Isn't the MediaSDK supposed to be like the DirectX SDK, where you can see how things are supposed to be done???
That's an ActiveX control. Use the Component Gallery to insert it into your project and the wrapper classes will be generated.

ActiveX Control Containers: Programming ActiveX Controls in an ActiveX Control Container
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/devprods/vs6/visualc/vccore/_core_activex_control_containers.3a_.programming_activex_controls_in_an_activex_control_container.htm
Avatar of Hypo

ASKER

Is this supposed to work even if I'm making a console app?
No. But how are you going to display the video window? If you just want to launch a seperate window to do it, you can use

::ShellExecute(NULL, NULL, _T("a.mpg"), NULL, NULL, SW_SHOW);
Avatar of Hypo

ASKER

well Even if I'm making a console app, I have created a window (at least I've got a valid WindowHandle), and I have installed the directdraw object, set the cooperativelevel (fullscreen and exclusive mode), allocated two surfaces (for flipping).

I want to show a video movie within my program, I don't want to launch another application in order to do it. I guess it should be possible... But I can't import any components... atleast not with that program, but shouldn't it be possible to install an ActiveX control manually?
You can play AVI on the DirectDraw surface.

AVI Playback (Streaming) onto DirectDraw Surface
http://support.microsoft.com/support/kb/articles/Q154/7/89.asp

Playing AVI files with DirectX
http://home.das-netz.de/pat/aviplayer.htm
Avatar of Hypo

ASKER

thank you, I found what I was looking for,