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: Quick Time Java -CallBacks





this is some old code i found on this mailing list which might do what you want.........
hope it helps......


public void setupCallBacks(Movie mov){
   TaskAllMovies.addMovieAndStart();
   TimeBase tbase = mov.getTimeBase();
   Timer timer = new Timer (1, 2, new MovieTickler(), mov);
   TimeBaseExtremesCallBack callb = new
     TimeBaseExtremesCallBack(tbase, StdQTConstants.triggerAtStop,
timer);
   callb.callMeWhen();
   timer.setActive(true);
}


class TimeBaseExtremesCallBack extends ExtremesCallBack {

   private Timer timer;

public TimeBaseExtremesCallBack(TimeBase b, int flag, Timer t)
throws
QTException {
     super(b, flag);
     timer = t;
   }

   /** Called when movie ends. */
   public void execute() {
     TaskAllMovies.removeMovie();
     cancelAndCleanup();
     timer.setActive(false);
     ....
     <perform some AWT/Swing code>
     ....
   }
}

On 8 Nov 2005, at 20:42, narayanan s. wrote:

Yeah, I had forgotten about the RateCallBack yesterday. I just went and used RateCallBack with rate >0 and =0. Still did   not help me with the synching issues.


On Tue, 08 Nov 2005 Noel Lynch wrote :
>have you tried extending the Ticklish class and using the quicktime.app.time.Timer class???
>quicktime.app.time.Timer takes the movie as a constructor arguement so therefore it should work only when the movie starts......
>for starting and stopping i think there is a rate changed callback........
>for detecting the movie finishing or starting i think there are also the ExtremesCallBack........
>there is some sample code on apple site showing how to use it.........
>
>On 7 Nov 2005, at 19:37, narayanan s. wrote:
>
>>    Reposting... as my previous post did not appear on the list for some reason.
>>
>>  I would like to know if and how you can set a callback for specific events such as:
>>
>>  a) QuickTime has started playing a streaming movie.
>>  b) Quicktime has successfully managed to stop a movie it is playing when I tell it to stop playing.
>>
>>  Issue at hand seems to be thread synching. QuickTime is not ready for me yet, when I try to do other stuff. For example, I am setting a timer, after getting the movie to play inside a
>>  synchronized (anObject) {} block. But, that is turning out to be not good enough and I need a full blown callback. I can sort of see how something of this sort is done in QT-C, but don't see the mapping to QT-J.
>>
>>  Any ideas, anyone?
>>
>>
>>
>><email@hidden> _______________________________________________
>>Do not post admin requests to the list. They will be ignored.
>>QuickTime-java mailing list      (email@hidden)
>>Help/Unsubscribe/Update your Subscription:
>>http://lists.apple.com/mailman/options/quicktime-java/noel%40thru- u.com
>>
>>This email sent to email@hidden




<email@hidden> _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden


This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden

This email sent to email@hidden
References: 
 >Re: Re: Quick Time Java -CallBacks (From: "narayanan s." <email@hidden>)



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.