1

QuickTime (C) API を使用して、一般に QuickTime ムービー トラックのEdit Atom (つまり'edts' ) の内容とそのEdit List Atom (つまり'elst' ) の内容を取得する方法はありますか?

目標は、特定のトラック内の編集を、その継続時間と開始時間とともに特定することです。

過去 2 時間、QuickTime リファレンス ライブラリ (レガシーと最新の両方) をチェックしてきましたが、これを実現するための API を特定できませんでした。

どんなヒントでも大歓迎です。

乾杯、

\ビョルン

4

1 に答える 1

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);
于 2009-12-11T09:37:40.747 に答える