Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MovieCallbacks problem! (Nor Fadzilah Hj Kamarudzaman)



> 1. MovieCallbacks problem! (Nor Fadzilah Hj Kamarudzaman)
>

> Does anyone know what problem with the following code is?
>
> static class Interceptor implements QTVRInterceptor {
> public boolean execute (QTVRInstance vr, QTVRInterceptRecord qtvrMsg) {
> System.out.println (vr.getPanAngle());
> return false;
> }
> }
>

If my understanding of the QTVR API is correct, what you have noticed is correct behavior. I believe that you are creating a circular call for yourself if you call the getPanAngle method within the Interceptor. I think this excerpt from the documentation could be describing the problem that I think you are creating for yourself by calling vr.getPanAngle() :


IMPORTANT
You should use QTVRCallInterceptedProc instead of the function you're
intercepting. If you called QTVRSetPanAngle directly in
Listing 2-6, your intercept procedure would be called
repeatedly until your stack overflowed.

I think what you have observed is the following. You set up an intercept procedure which internally may be calling getPanAngle to do so, and then you programatically call getPanAngle, which generates the interrupt to call the intercept procedure which runs your programming request to getPanAngle, which generates the interrupt to call the intercept procedure... I don't think I need to go on.

>
> However the problem will be solved if I use "qtvrMsg.getAngle()"
> instead of "vr.getPanAngle()".
>

I think that in this case, you are getting parameters out of the QTVRIntercept Record, and this would be correct behavior. The documentation describes the QTVR Intercept Record structure.


> Fadzilah

As far as the comments below are concerned, I am unaware of bugs in the QTJava callback mechanism. I use the QTVR callbacks extensively, and also the Extremes Callback for linear movies. These have worked well for me for over a year. Please correct me if I am wrong.


the problem you described is a general bug of the QT-Java callback
mechanism which has been reported on this list several times (for at
least over one year!).

I have been on this list since April 1999 and I have not noticed these complaints about the QTJava callback mechanism. I am not even sure what this statement could refer to. Once again, I am happy to be corrected if I am wrong.


Fadzilah, I think that all you need to do is look at the QTVR API documentation, which is available in PDF form on Apple's site. Almost all of the API's are implemented in QTJava, and in my experience they work.

Vickie




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.