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?
LVL 12
HypoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cyberbumCommented:
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).
0
olgatCommented:
0
chensuCommented:
Use the Windows Media Player ActiveX Control.

Windows Media Player Control
http://www.microsoft.com/directx/dxm/help/ds/c-frame.htm#default.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

HypoAuthor Commented:
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???
0
chensuCommented:
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
0
HypoAuthor Commented:
Is this supposed to work even if I'm making a console app?
0
chensuCommented:
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);
0
HypoAuthor Commented:
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?
0
chensuCommented:
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
0
HypoAuthor Commented:
thank you, I found what I was looking for,
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.