(id)addPeriodicTimeObserverForInterval:(CMTime)interval queue:(nullable dispatch_queue_t)queue usingBlock:(void (^)(CMTime time))block
这个方法的参数 interval 我见有不同的填写,如:CMTimeMake(1, 1),CMTimeMake(10, 1000),能回答一下,都表示什么意思吗?
天蓬老师2017-05-02 09:23:08
CMTime CMTimeMake (
int64_t value,
int32_t timescale
);
CMTime is specially used to represent movie time.
CMTime(a,b) a represents the current frame, b represents the frame rate, how many frames per second.
CMTime(60,30) This represents a video with 30 frames per second, and 60 frames are played, which is at 2 seconds.
CMTime(30,15) This represents a video with 15 frames per second. After playing 30 frames, it is still at 2 seconds.