Playing mpg or avi with delphiX
I need to be able to play a avi or mpg on a delphix surface. So I thought to install sxmedia and problem would be solved. However, sxmedia will not compile for me.I get a number of
[Error] SXMovie.pas(256): Incompatible types: ''DirectX.IDirectDrawSurface'' and ''DirectDraw.IDirectDrawSurface''
errors. Particulary in the following sxmovie unit
procedure TSXMovie.SetupMediaSample;
begin
try
FSample:=nil;
FDDStream:=nil;
FPrimaryVidStream:=nil;
FMMStream.GetMediaStream(MSPID_PrimaryVideo, FPrimaryVidStream);
FPrimaryVidStream.QueryInterface(IID_IDirectDrawMediaStream, FDDStream);
FDDStream.CreateSample(nil,PRect(nil)^,0,FSample);
FDXSurface := TDirectDrawSurface.Create(FDXDraw.DDraw);
FSample.GetSurface(FSurface,FRect);
FDXSurface.IDDSurface := FSurface; <====== this one
except
end;
end;
APart from trying to fix this code I was wondering if there were any other ways of displaying a movie on a delphix dxdraw surface?
I am using windows 2000 with directx 8. I hope someone can help
Ralph
Solved my problem. SXmedia will work with the official delphiX only, and not the patched UnDelphiX. I switched back to the original unpatched delphiX and now it works sweet. The project I am working on seems to function as before, so no harm done.
Hi Czar,
Dean Ellis, the SXMedia mogul will be back from his year long travel around the world in a few weeks, so he will probably update SXMedia to be compatible with UnDelphiX I would imagine.
L8R,
Dominique
http://www.DelphiGamer.com := for all your Object Pascal game development needs;
http://www.DelphiGamer.com := for all your Object Pascal game development needs;
Dean Ellis, the SXMedia mogul will be back from his year long travel around the world in a few weeks, so he will probably update SXMedia to be compatible with UnDelphiX I would imagine.
L8R,
Dominique
http://www.DelphiGamer.com := for all your Object Pascal game development needs;
http://www.DelphiGamer.com := for all your Object Pascal game development needs;
2 Czar: The problem you mentioned had easier (and better) solution: just try changing the order of DirectDraw, DXDraws and DirectX units in "uses" statement.
Edited by - Lifepower on February 3, 2002 9:51:22 AM
Edited by - Lifepower on February 3, 2002 9:51:22 AM
Hi,
I also have a question to the SXMovie.
How can I set it to looped and how can I play it without the DoFlip Option set to true (It should play synchronic with the whle game...)
I also have a question to the SXMovie.
How can I set it to looped and how can I play it without the DoFlip Option set to true (It should play synchronic with the whle game...)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement