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: frame-by-frame advancing



At 12:55 PM -0800 1/6/02, Dmitry Beransky wrote:
I figured, the ideal way would be to have one turn unit correspond to a
movie frame. For that, it seems, I need Movie.getNextInterestingTime(). But I'm doubtful of whether it will do what I want. Judging from the
description given in the docs, if I use the nextTimeSyncSample flag, that
will only find me key frames. But what about the intermediate frames
(B, P, I, or whatever else the underlying codec may use), how do I get to
those?

The preferred way is something like this:

myMovie.setTime(myMovie.getNextInterestingTime(nextTimeStep, new int[] { visualMediaCharacteristic }, curTime, 1.0F).time);


The second parameter means that it will only look for samples in the video tracks (and ignore audio samples). The use of nextTimeStep is preferred to the older nextTimeMediaSample flag because nextTimeStep works with MPEG media (as well as with ordinary multi-sampled media).

Good luck,

Eric Smith
Tarkvara Design Inc.


References: 
 >frame-by-frame advancing (From: Dmitry Beransky <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.