Re: Invalid Floating point in windows Thanks --AND-- Working with picture Handle! how to put the data in a TPicture or TBitmap or the Clipboard?
Subject: Re: Invalid Floating point in windows Thanks --AND-- Working with picture Handle! how to put the data in a TPicture or TBitmap or the Clipboard?
Hi Jacque-Yves,
replying to this older e-mail in case people are still researching this
issue, seems Odie Giblet found a workarround for it (not sure if some "bug"
report should be filled in against QuickTime, I'll try to look into it more
since I've read Delphi does some stuff with the FPU flags):
Odie wrote:
<<<<<<<
I actually found the solution to the problem yesterday which is to turn off
the
FPU's floating point exceptions. I call this function before any problematic
functions.
Set8087CW($133f);
I remembered that I saw this in a DirectShow library I was using. Apparently
Delphi
doesn't like it when calls to external DLL's mess with the FPU in a certain
way. So
the exact same DLL calls in Delphi/C++ might mess up Delphi.
google Set8087CW for a bunch of information on why this happens.
>From the reading.. I'm not sure, but if I LoadLibrary the DLL instead of a
static
link, then I can just call the Set8087CW once before the load library and
after to
reset it and this will fix the problem throughout the use of the DLL.
So anyways, problem seems resolved for me
>>>>>>
----- Original Message -----
From: "Jacques-Yves Bleau" <jybleau [at] artiscommunications.com>
To: <email@hidden>; "Quicktime-Api" <email@hidden>
Sent: Monday, April 07, 2003 11:57 PM
Subject: RE : Invalid Floating point in windows Thanks --AND-- Working with
picture Handle! how to put the data in a TPicture or TBitmap or the
Clipboard?
Thanks,
1- I saw some change in your work on the functions I use and I don't
get the invalide Floating point operation error anymore.
2- Informations on the 'getmoviePict' function.
I want to copy the picture, fine its done, but how do I print this
picture in a Tpicture, a tBitmap or any object that has a Canvas ? The
clipBoard would be fine too. I think I need to change the outPut port
for the time I want to 'Export' the pict !?! I didn't find something
very explicit in the Quicktime API help, probably because I'm using
Delphi.
//With the following code I print my pict on the quicktime movie that is
playing. That's a "début".
getMovieTime(TheMovie,@aTimeRecord);
pichandle:= GetMoviePict(TheMovie, aTimeRecord.value.lo);
aRec.top:= 100;
aRec.left:= 100;
aRec.bottom:= 200;
aRec.right:= 200;
drawPicture(pichandle,@aRec);
3- I tried to translate the function "TCGetCurrentTimeCode" to get the
timecode in the "HH:MM:SS:FF" format, but it doesn't work for the
moment.
This function is in the quickTimeComponents.h.
I put that in a separate "pas" to make it easier to debug.
Everything about the TimeCode functions of QT would be very usefull for
me. So when I'll have time I will work on that if nobody does. I'm
sending you the pas for information.
Thanks again,
Jack
-----Message d'origine-----
De : George Birbilis [mailto:email@hidden]
Envoyé : 4 avril, 2003 17:29
À : Jacques-Yves Bleau
Objet : Re: Invalid Floating point operation on windows with mpeg-4
codecs
Hi,
I'm now uploading newer JEDI QuickTime versions (20030405), they should
be online tomorrow or after a day or two...
cheers,
George
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <email@hidden>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://members.fortunecity.com/birbilis/
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................
............
----- Original Message -----
From: "Jacques-Yves Bleau" <email@hidden>
To: <email@hidden>
Sent: Thursday, March 27, 2003 7:51 PM
Subject: Invalid Floating point operation on windows with mpeg-4 codecs
> System: Windows 2000
> Dev tools: Delphi7 and c++ builder 6
> Qtversion: 6.02
> DLL: qtmlClient.dll last version (I can't used the .lib cause Borland
does not
> support the uSoft format)
>
> Hi,
> I'm getting an invalid foating point operation error when I open a
movie
> compressed with a mpeg-4 codec kind.
> I don't get this error with other kind of codec.
>
> I think I used the normal way to open a movie.
> The exception is generated from the DLL not from my code.
>
> I also get this error with the Quicktime Activex Plugin.
>
> The only way I found to "Eliminate" this problem is to put the
concerned
> functions into"try except" statement to catch the exception.
>
> Here is my code to open the movie (Dephi code but only the calls to
functions
> are important)
>
> // Get the ref to the movie
> //The error occurs here if I check the preview movie in the openDialog
box.
> 1-- theMovie:=QTUtils.GetMovie(@fs,@movieResFile,@myResID);
>
> if (theMovie <> nil) then begin
>
> // No error : make sure the movie uses the window GWorld in all
> situations //??? found in WinFrameWork.c from QTShell.c
> 2-- SetMovieGWorld(theMovie,
> CGrafPtr(GetPortFromWindowReference(WindowHandle)),
> GetGWorldDevice(CGrafPtr(GetPortFromWindowReference(WindowHandle))));
>
> 3-- theMovieRect.top:=0; //Ok
> 4-- theMovieRect.left:=0; //Ok
> 5-- theMovieRect.right:=width-1; //Ok
> 6-- theMovieRect.bottom:=height-1 -45; //Ok
>
> //Create the movie controller //Ok no error
> 7-- theMC:=NewMovieController(theMovie,@theMovieRect,
mcTopLeftMovie);
>
> if(theMC=nil) then exit;
> try //The error can occur here but the function
succeeds
> anyway ????!!
> 8-- MCSetControllerBoundsRect(theMC,theMovieRect); //needed, else
the
> above doesn't make the movie fit the control
> except
> end;
> end;
>
> try
> //The error occurs here but the function succeeds anyway
????!!
> //the getMoviePreferredRate throws a division-by-zero when
used
> with certain other files ??? Doesn't change anything to put 1 instead.
> 9-- SetMovieRate(theMovie,getMoviePreferredRate(theMovie));
> 10-- MCIdle(theMC); //tell the controller to paint itself (needed
for plain
> sound/music controllers)
> except
> end;
>
> I validated the delphi ''Header'' files I used to communicate with the
DLL and
> every structures and types I use seems to be ok.
> It seems to me that the problem could come from the qtmlClient.dll but
it's
> prematured to conclude this is it.
> My code to open a movie may be obsolete.
> Tell me if someone else experienced that kind of problem.
>
> Thank you for your answer.
>
> --
> Artis Communications inc
> Jacques-Yves Bleau
> email@hidden
> _______________________________________________
> quicktime-api mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/quicktime-api
> Do not post admin requests to the list. They will be ignored.
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden