如何从CMTimeRange获取CMTime

时间:2014-03-14 08:11:43

标签: objective-c

我是Objective-C编程的新手。我将CMTimeRange从一个视图发送到另一个视图,但在另一个视图中,我需要在CMTime格式中的CMTimeRange中开始时间。有人知道我怎么做 在第一个视图中,时间范围是。

CMTimeRange timeRange = CMTimeRangeMake(startTime, realPlayer.currentTime);

提前致谢。

1 个答案:

答案 0 :(得分:0)

typedef struct{
CMTime          start;      /*! @field start The start time of the time            range. */
CMTime          duration;   /*! @field duration The duration of the time  range. */
} CMTimeRange;

因此您可以使用CMTimeGetSeconds(timeRange.start)获得开始时间。