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 single, 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 implement both the IAMTimelineComp interface and the IAMTimelineGroup interface.
For more information, see The Timeline Model and Groups, Compositions, and Tracks.
Requirements
Requires Qedit.h.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IAMTimelineComp Methods Description VTrackInsBefore Inserts a virtual track into the composition at the specified priority. VTrackSwapPriorities Switches the priority levels of two tracks. VTrackGetCount Retrieves the number of virtual tracks contained in the composition. GetVTrack Retrieves the virtual track at the specified priority. GetCountOfType Retrieves the number of objects of a given type contained in this composition and all of its virtual tracks, recursively. 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. GetNextVTrack Retrieves the next virtual track after a specified virtual track.
Retrieves the number of objects of a given type contained in this composition and all its virtual tracks, recursively.
Syntax
HRESULT GetCountOfType( long *pVal, long *pValWithComps, TIMELINE_MAJOR_TYPE MajorType );
Parameters
- pVal
- Pointer to a variable that receives the number of objects of the specified type contained in this composition and all its virtual tracks, recursively.
- pValWithComps
- Pointer to a 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.
Return Value
Returns S_OK if successful, or E_POINTER otherwise.
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 IAMTimeline::GetGroupCount method.
Retrieves the next virtual track after a specified virtual track.
Syntax
HRESULT GetNextVTrack( IAMTimelineObj *pVirtualTrack, IAMTimelineObj **ppNextVirtualTrack );
Parameters
- pVirtualTrack
- Pointer to the previous virtual track, or NULL to retrieve the first virtual track in the composition.
- ppNextVirtualTrack
- [out] Address of a pointer that receives the IAMTimelineObj interface of the next virtual track, in order of priority.
Return Value
Returns S_OK if the method retrieves a virtual track, or S_FALSE otherwise.
Remarks
If the method succeeds, the IAMTimelineObj interface that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.
Performs a depth-first ordering of the virtual tracks contained in this composition, and retrieves the nth virtual track from that ordering.
Syntax
HRESULT GetRecursiveLayerOfType( IAMTimelineObj **ppVirtualTrack, long WhichLayer, TIMELINE_MAJOR_TYPE Type );
Parameters
- ppVirtualTrack
- [out] Address of a pointer that receives the virtual track's IAMTimelineObj interface.
- 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.
Return Value
Returns one of the following HRESULT values:
S_OK Success. E_INVALIDARG No object of the specified type. E_POINTER NULL pointer argument.
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.
If the method succeeds, the IAMTimelineObj interface that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.
Not supported. Call the GetRecursiveLayerOfType method instead.
Syntax
HRESULT GetRecursiveLayerOfTypeI( IAMTimelineObj **ppVirtualTrack, long *pWhichLayer, TIMELINE_MAJOR_TYPE Type );
Retrieves the virtual track at the specified priority.
Syntax
HRESULT GetVTrack( IAMTimelineObj **ppVirtualTrack, long Which );
Parameters
- ppVirtualTrack
- [out] Address of a pointer that receives the virtual track's IAMTimelineObj interface.
- Which
- Priority of the virtual track to retrieve.
Return Value
Returns one of the following HRESULT values:
S_OK Success. E_INVALIDARG No virtual track with the specified priority. E_POINTER NULL pointer argument.
Remarks
If the method succeeds, the IAMTimelineObj interface that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.
Retrieves the number of virtual tracks contained in the composition.
Syntax
HRESULT VTrackGetCount( long *pVal );
Parameters
- pVal
- Pointer to a variable that receives the number of virtual tracks.
Return Value
Returns S_OK if successful, or E_POINTER otherwise.
Inserts a virtual track into the composition at the specified priority.
Syntax
HRESULT VTrackInsBefore( IAMTimelineObj *pVirtualTrack, long Priority );
Parameters
- pVirtualTrack
- Pointer to the IAMTimelineObj interface of 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.
Return Value
Returns one of the following HRESULT values:
S_OK Success. E_INVALIDARG Invalid argument. E_NOINTERFACE Object 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
HRESULT VTrackSwapPriorities( long VirtualTrackA, long VirtualTrackB );
Parameters
- VirtualTrackA
- First priority level at which to swap virtual tracks.
- VirtualTrackB
- Second priority level at which to swap virtual tracks.
Return Value
Returns S_OK if successful, or E_INVALIDARG otherwise.