Hypo
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?
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).
Just see
http://codeguru.developer.com/directx/overlay.shtml
and http://codeguru.developer.com/directx/overlay1.shtml
articles.
You will find there a sample code too.
http://codeguru.developer.com/directx/overlay.shtml
and http://codeguru.developer.com/directx/overlay1.shtml
articles.
You will find there a sample code too.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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???
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
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
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);
::ShellExecute(NULL, NULL, _T("a.mpg"), NULL, NULL, SW_SHOW);
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?
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
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
ASKER
thank you, I found what I was looking for,