2009-12-08 63 views
1

有沒有辦法讓一個QuickTime影片軌道的編輯的Atom內容保持(即「EDTS」)一般及編輯列表原子(即「埃爾斯特」)中的內容特別使用QuickTime(C)API?訪問QuickTime Movie Track的Edit Atom的內容?

目標是確定給定軌道中的任何編輯以及其持續時間和開始時間。

我一直在檢查過去兩個小時的QuickTime參考庫(包括傳統和當前),但還沒有能夠識別任何API來實現這一點。

任何提示將不勝感激。

乾杯,

\比約恩·

回答

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(尋找曲目編輯s)和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);