是否有任何方法可以掌握QuickTime Movie Track的编辑原子(即'edts')的内容以及的内容使用QuickTime(C)API编辑List Atom (即'elst')?
目标是识别给定轨道中的任何编辑及其持续时间和开始时间。
我在过去两个小时内一直在检查QuickTime参考库(包括旧版和当前版),但却未能找到任何API来实现这一目标。
任何提示都将不胜感激。
干杯,
\比约恩
答案 0 :(得分:0)
回答我自己的问题:
曲目编辑列表的内容(如果有),即曲目中的编辑/片段可以通过GetTrackNextInterestingTime()
API函数(从Movies.h中删除的代码)确定:
/*
* GetTrackNextInterestingTime()
*
* Availability:
* Non-Carbon CFM: in QuickTimeLib 2.5 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
* Windows: in qtmlClient.lib 3.0 and later
*/
EXTERN_API( void )
GetTrackNextInterestingTime(
Track theTrack,
short interestingTimeFlags,
TimeValue time,
Fixed rate,
TimeValue * interestingTime,
TimeValue * interestingDuration);
通过nextTimeTrackEdit
传递nextTimeEdgeOK
(寻找曲目编辑)和interestingTimeFlags
(包括边线情况)。
对于您可能对某个曲目中的修改感兴趣的大多数情况,您必须将返回的interestingTime
从曲目时间映射到媒体时间(如果您一直在检查曲目的编辑以确定可能的曲目偏移,则为fe。)
这是通过TrackTimeToMediaTime()
API函数完成的:
/*
* TrackTimeToMediaTime()
*
* Availability:
* Non-Carbon CFM: in QuickTimeLib 2.5 and later
* CarbonLib: in CarbonLib 1.0 and later
* Mac OS X: in version 10.0 and later
* Windows: in qtmlClient.lib 3.0 and later
*/
EXTERN_API( TimeValue )
TrackTimeToMediaTime(
TimeValue value,
Track theTrack);
修改强>
将曲目时间转换为媒体时间的最先进方式是TrackTimeToMediaDisplayTime()
:
/*
* TrackTimeToMediaDisplayTime()
*
* Summary:
* Converts a track's time value to a display time value that is
* appropriate to the track's media, using the track's edit list.
* This is a 64-bit replacement for TrackTimeToMediaTime.
*
* Discussion:
* This function maps the track time through the track's edit list
* to come up with the media time. This time value contains the
* track's time value according to the media's time coordinate
* system. If the time you specified lies outside of the movie's
* active segment or corresponds to empty space in the track, this
* function returns a value of -1. Hence you can use it to determine
* whether a specified track edit is empty.
*
* Parameters:
*
* value:
* The track's time value; must be expressed in the time scale of
* the movie that contains the track.
*
* theTrack:
* The track for this operation. Your application obtains this
* track identifier from such functions as NewMovieTrack and
* GetMovieTrack.
*
* Result:
* The corresponding time in media display time, in the media's time
* coordinate system. If the track time corresponds to empty space,
* this function returns a value of -1.
*
* Availability:
* Non-Carbon CFM: not available
* CarbonLib: not available
* Mac OS X: in version 10.4 (or QuickTime 7.0) and later
* Windows: in qtmlClient.lib version 10.4 (or QuickTime 7.0) and later
*/
EXTERN_API( TimeValue64 )
TrackTimeToMediaDisplayTime(
TimeValue64 value,
Track theTrack);