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: *** AutoPlay (again) ***



I think this stuff is only for the QT Player native
application, the QuickTime API won't do the autoplaying. So
I suppose you have to read that value yourself from the
movie and then if "isAutoPlayMovie" is true then do setRate
on it. Problem is you HAVE to wait till it finishes loading
(not sure how you can do that) before you call "setRate",
else it won't play if you call this while it still haven't
finished loading :o(

unfortunately same should be for looping atoms, you may have
to check them and setup an ExtremesCallback and when movie
ends go back to start (remember at the callback handler to
enable the callback again, I think it gets "removed" after
it fires)

maybe QT also allows you to set hints to the movie at
runtime (they're not persistent unfortunately) to tell the
movie to autoplay and loop. So then at runtime you'll
basically read the atoms (via the boolean functions I had
sent for example) and set the appropriate movie hints
(instead of setting up callbacks for the looping etc.)

there was an interesting thread I had started on the QTJava
list at the time before posting that code, maybe at the same
time I had asked some of these things on the QT-API list
(check it out as well). There were links in those e-mails to
related Apple technical info on the ADC site

greetings,
George

> Hi George
>
> Excuse me for annoy you like that...
>
> My movie is load with a Movie.fromDataRef function. When I
ask for the
> isAutoPlayMovie(), it said my movie IS autoplay. But, my
movie doesn't
> autoplay. I wait until the loading is finish and the movie
still don't play.
> I have to start it manually (with my play button that
setRate() to 1)
>
> If you have any idea, please answer me...
>
> Thanks
>
> BigBlackPapa
>
> public static boolean isAutoPlayMovie(Movie movie)
> throws QTException
> {
> UserData userData=movie.getUserData();
> //do I have to check for null here?
> int playAtomType=QTUtils.toOSType(PLAY_ATOMTYPE_STRING);
>
> if(!containsUserDataAtom(userData,playAtomType))
> return false; //play atom not found
>
> QTHandle playHandle=userData.getData(playAtomType,1);
> if(playHandle.getSize()==0)
> return false; //maybe error, play should contain a
value
>
> byte[] playData=new byte[1];
> playHandle.copyToArray(0,playData,0,1);
> return (playData[0]==1); //only if data=1 assume
autoplaying (0=normal,
> other values might be other play modes?)
> }
>
>
>
____________________________________________________________
_____
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
_______________________________________________
quicktime-java mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-java
Do not post admin requests to the list. They will be ignored.



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.