Microsoft DirectX 8.0 |
Inserts or retrieves virtual tracks on a composition in Microsoft® DirectShow® Editing Services (DES).
A composition is a collection of layers that acts as a composited track. For example, a composition that contains two tracks with a transition between them acts as a single track with the transition precomposited. A composition should contain media of only one type (such as audio or video), but this limitation is not enforced. A virtual track is any object that can reside in a composition, including tracks and other compositions.
The topmost nodes in the timeline are groups. Groups support both AMTimelineComp and AMTimelineGroup.
For more information, see The Timeline Model.
Methods
GetCountOfType Retrieves the number of objects of a given type contained in this composition and all of its virtual tracks, recursively. GetNextVTrack Retrieves the next virtual track after a specified virtual track. GetRecursiveLayerOfType Performs a depth-first ordering of the virtual tracks contained in this composition, and retrieves the nth virtual track from that ordering. GetRecursiveLayerOfTypeI Not supported for Visual Basic. GetVTrack Retrieves the virtual track at the specified priority. VTrackGetCount Retrieves the number of virtual tracks contained in the composition. VTrackInsBefore Inserts a virtual track into the composition at the specified priority. VTrackSwapPriorities Switches the priority levels of two tracks.
Retrieves the number of objects of a given type contained in this composition and all its virtual tracks, recursively.
Syntax
object.GetCountOfType( pVal As Long, pValWithComps As Long, MajorType As TIMELINE_MAJOR_TYPE )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- pVal
- Variable that receives the number of objects of the specified type contained in this composition and all its virtual tracks, recursively.
- pValWithComps
- Variable that receives the count returned in pVal plus the number of compositions searched, including this one.
- MajorType
- Member of the TIMELINE_MAJOR_TYPE enumerated type, specifying the type of object to count.
Error Codes
If the method fails, an error is raised.
Remarks
Typically, an application will not call this method. It is called by the render engine.
If you count compositions, the value returned in pVal is zero and the value returned in pValWithComps is the number of compositions. The value of pValWithComps includes the composition on which you call the method. For example, if you call this method on an empty composition, pValWithComps equals 1.
Groups cannot reside inside compositions, so you cannot use this method to count groups (the returned count will always be zero). To count groups, call the AMTimeline.GetGroupCount method.
Retrieves the next virtual track after a specified virtual track.
Syntax
object.GetNextVTrack( pVirtualTrack As AMTimelineObj, ppNextVirtualTrack As AMTimelineObj )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- pVirtualTrack
- AMTimelineObj object that specifies the previous virtual track, or Nothing to retrieve the first virtual track in the composition.
- ppNextVirtualTrack
- AMTimelineObj object that receives the next virtual track, in order of priority.
Error Codes
If the method fails, an error is raised.
Performs a depth-first ordering of the virtual tracks contained in this composition, and retrieves the nth virtual track from that ordering.
Syntax
object.GetRecursiveLayerOfType( ppVirtualTrack As AMTimelineObj, WhichLayer As Long, Type As TIMELINE_MAJOR_TYPE )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- ppVirtualTrack
- AMTimelineObj object that receives the virtual track.
- WhichLayer
- Value that specifies which virtual track to retrieve, indexed from zero.
- Type
- Member of the TIMELINE_MAJOR_TYPE enumerated type that specifies whether to include tracks in the search.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to the following value:
E_INVALIDARG No object of the specified type.
Remarks
Typically, an application will not need to call this method.
If the Type parameter is TIMELINE_MAJOR_TYPE_TRACK, the depth-first ordering includes tracks. If not, it includes only compositions and groups. The object itself is included in the ordering.
For example, in the following arrangement, starting from Composition A, the ordering would be B, C, F, D, E, A.
Not supported for Visual Basic. Call the GetRecursiveLayerOfType method instead.
Syntax
object.GetRecursiveLayerOfTypeI( ppVirtualTrack As AMTimelineObj, pWhichLayer As Long, Type As TIMELINE_MAJOR_TYPE )
Retrieves the virtual track at the specified priority.
Syntax
object.GetVTrack( ppVirtualTrack As AMTimelineObj, Which As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- ppVirtualTrack
- AMTimelineObj object that receives the virtual track.
- Which
- Priority of the virtual track to retrieve.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_INVALIDARG No virtual track with the specified priority.
Retrieves the number of virtual tracks contained in the composition.
Syntax
object.VTrackGetCount( pVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- pVal
- Variable that receives the number of virtual tracks.
Error Codes
If the method fails, an error is raised.
Inserts a virtual track into the composition at the specified priority.
Syntax
object.VTrackInsBefore( pVirtualTrack As AMTimelineObj, Priority As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- pVirtualTrack
- AMTimelineObj object that specifies the virtual track.
- Priority
- Priority at which to insert the virtual track, or 1 to insert the virtual track at the end of the priority list.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_INVALIDARG Invalid argument. E_NOINTERFACE Object specified by pVirtualTrack is not a virtual track.
Remarks
Priority levels start at zero. If the timeline already contains a virtual track at the specified priority level, everything from that point on moves down the priority list to make room for the inserted track. This method fails if the specified priority is greater than the current number of tracks.
Switches the priority levels of two tracks.
Given two priority levels, this method switches the virtual tracks at those priorities. When the method returns, the track that was at the first priority level is now at the second priority level, and vice versa.
Syntax
object.VTrackSwapPriorities( VirtualTrackA As Long, VirtualTrackB As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineComp object.
- VirtualTrackA
- First priority level at which to swap virtual tracks.
- VirtualTrackB
- Second priority level at which to swap virtual tracks.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_INVALIDARG Invalid argument.