|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| I'm trying to draw a Core Image transition using a Core Video display link. My thought was to create a display link and then in the callback generate and display a single frame of the transition. To do that, I need to know what the time stamp in the Display Link callback represents. In particular, I need to know how long has elapsed between the time my animation started, and the time the Display Link's callback is called. The documentation on the Display Link seems to be oriented toward getting frames from QuickTime. The Display Link itself doesn't seem to have any idea what time it started. I tried using : mStartTime.version = 0; CVDisplayLinkGetCurrentTime(mDisplayLink, &mStartTime); To get the time the display link started. Then in the callback I tried to do some math: double currentTime = (double)(timeStamp.videoTime - mStartTime.videoTime) / (double)timeStamp.videoTimeScale; to come up with the time elapsed (in seconds) since the animation started. It appears, however, that my call to CVDisplayLinkGetCurrentTime is not returning what I hoped it would because the elapsed times I get are on the order of 27000 seconds. Certainly I could use NSDate in a similar way to get the information I'm looking for (to the precision I need)... I just thought I would see if I could use the time stamps I was given. Clearly I'm trying to do something unusual... use the display link without using the buffer services provided by Core Video. Is this even a meaningful strategy? Is there some way to obtain the timing information I am looking for from the callback's time stamp? Scott |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartz-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.