Microsoft DirectX 8.0 |
Provides methods for manipulating timeline objects in Microsoft® DirectShow® Editing Services (DES). All timeline objects support AMTimelienObj, including source, effect, transition, track, group, and composition objects. Create a timeline object by calling the AMTimeline.CreateEmptyNode method.
Methods
ClearDirty Not supported for Visual Basic. FixTimes Not supported for Visual Basic. FixTimes2 Rounds the specified start and stop times to the nearest frame boundaries, as defined by the parent group's frame rate setting. GetDirtyRange Not supported for Visual Basic. GetDirtyRange2 Not supported for Visual Basic. GetEmbedDepth Not supported for Visual Basic. GetGenID Retrieves the object's generated identifier. GetGroupIBelongTo Not supported for Visual Basic. GetLocked Retrieves the object's editing state (locked or unlocked). GetMuted Retrieves the object's muted state. GetPropertySetter Not supported for Visual Basic. GetStartStop Not supported for Visual Basic. GetStartStop2 Retrieves the object's start and stop times, relative to the object's parent. GetSubObject Not supported for Visual Basic. GetSubObjectGUID Not supported for Visual Basic. GetSubObjectGUIDB Retrieves the GUID of the subobject associated with this object. GetSubObjectLoaded Determines whether a subobject has been created for the object. GetTimelineNoRef Not supported for Visual Basic. GetTimelineType Retrieves the object's type. GetUserData Retrieves application-defined persistent data. GetUserID Retrieves the object's application-defined identifier. GetUserName Retrieves the object's application-defined name. Remove Removes this object from the timeline, for reinsertion elsewhere. RemoveAll Permanently removes this object from the timeline, including subobjects and children. SetDirtyRange Not supported for Visual Basic. SetDirtyRange2 Not supported for Visual Basic. SetLocked Sets the object's editing state to locked or unlocked. SetMuted Sets the object's muted state. SetPropertySetter Not supported for Visual Basic. SetStartStop Not supported for Visual Basic. SetStartStop2 Sets the object's start and stop times, relative to the object's parent. SetSubObject Not supported for Visual Basic. SetSubObjectGUID Not supported for Visual Basic. SetSubObjectGUIDB Specifies the GUID of the subobject associated with this object. SetTimelineType Not supported for Visual Basic. SetUserData Sets application-defined persistent data. SetUserID Sets an application-defined identifier for the object. SetUserName Sets an application-defined name for the object.
Not supported for Visual Basic.
Syntax
object.ClearDirty()
Not supported for Visual Basic.
Syntax
object.FixTimes( pStart As <Unsupported variant type>, pStop As <Unsupported variant type> )
Rounds the specified start and stop times to the nearest frame boundaries, as defined by the parent group's frame rate setting.
Syntax
object.FixTimes2( pStart As Double, REFTIME As Double*pStop )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pStart
- Variable that contains the start time, in seconds. If the call succeeds, the value is set to the rounded time.
- pStop
- Variable that contains the stop time, in seconds. If the call succeeds, the value is set to the rounded time.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_NOTINTREE The object is not in the timeline.
Remarks
During rendering, DES rounds the object's start and stop times to the nearest frame boundary. However, DES does not overwrite the object's times. If you change the group frame rate, the rounded times are always calculated from the original times. For more information, see Frame Rates.
Use this method to determine accurate start and stop times in the rendered project. For example, if you seek within the project, seek to the rounded times and not the original times. Call GetStartStop2 to obtain the original times, and pass those values to FixTimes2.
Not supported for Visual Basic.
Syntax
object.GetDirtyRange( pStart As <Unsupported variant type>, pStop As <Unsupported variant type> )
Not supported for Visual Basic.
Syntax
object.GetDirtyRange2( pStart As Double, pStop As Double )
Not supported for Visual Basic.
Syntax
object.GetEmbedDepth( pVal As Long )
Retrieves the object's generated identifier. The identifier is a reserved number. Applications should not use it.
Syntax
object.GetGenID( pVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pVal
- Variable that receives the generated identifier.
Error Codes
If the method fails, an error is raised.
Not supported for Visual Basic.
Syntax
object.GetGroupIBelongTo( ppGroup As AMTimelineGroup )
Retrieves the object's editing state (locked or unlocked). A locked state indicates that the object should not be edited; an unlocked state indicates that the object can be edited. The timeline does not enforce the lock. The locked setting exists only for the convenience of the application.
Syntax
GetLocked( pVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pVal
- Variable that receives the object's editing state. If the value is zero, the object is unlocked and can be edited. If the value is non-zero, the object is locked and should not be edited.
Error Codes
If the method fails, an error is raised.
Retrieves the object's muted state. A muted object is not rendered, but it remains in the timeline.
Syntax
object.GetMuted( pVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pVal
- Variable that receives a value indicating the muted state. If the value is zero, the object is not muted. If the value is non-zero, the object and its children are muted.
Error Codes
If the method fails, an error is raised.
Remarks
If an object's parent is muted, the object is muted regardless of its muted state. When the parent is no longer muted, the object's previous muted state is restored.
Not supported for Visual Basic..
Syntax
object.GetPropertySetter() As PropertySetter
Not supported for Visual Basic.
Syntax
object.GetStartStop( pStart As <Unsupported variant type>, pStop As <Unsupported variant type> )
Retrieves the object's start and stop times, relative to the object's parent.
Syntax
object.GetStartStop2( pStart As Double, pStop As Double )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pStart
- Variable that receives the start time, in seconds.
- pStop
- Variable that receives the stop time, in seconds.
Error Codes
If the method fails, an error is raised.
Remarks
Compositions, groups, and tracks always have a start time of 0.
During rendering, DES rounds an object's start and stop times to the nearest frame boundary. However, it does not overwrite the object's times. If you change the group frame rate, the rounded times are always calculated from the original times. For more information, see Frame Rates. To determine the start and stop times in the rendered project, pass the values returned by GetStartStop2 to the FixTimes2 method.
Not supported for Visual Basic.
Syntax
object.GetSubObject( pVal As Unknown )
Not supported for Visual Basic.
Syntax
object.GetSubObjectGUID( pVal As GUID )
Retrieves the GUID of the subobject associated with this timeline object.
Syntax
object.GetSubObjectGUIDB() As String
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
Return Value
Returns a string that contains the GUID of the subobject. If the object has no subobject, the return value is {00000000-0000-0000-0000-000000000000}.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_OUTOFMEMORY Insufficient memory.
Determines whether a subobject has been created for the object.
Syntax
object.GetSubObjectLoaded( pVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pVal
- Variable that receives a value indicating whether a subobject has been created. If zero, a subobject has been not created. If non-zero, a subobject has been created.
Error Codes
If the method fails, an error is raised.
Not supported for Visual Basic.
Syntax
object.GetTimelineNoRef( ppResult As AMTimeline )
Retrieves the object's type.
Syntax
object.GetTimelineType( pVal As TIMELINE_MAJOR_TYPE )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pVal
- Variable that receives a member of the TIMELINE_MAJOR_TYPE enumerated type, indicating the type of object.
Error Codes
If the method fails, an error is raised.
Not supported for Visual Basic.
Syntax
object.GetUserData( pData As Byte, pSize As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pData
- Reference to an array of bytes that contains the data.
- pSize
- Size of the array, in bytes. When the method returns, the value is set to the required size. See Remarks.
Error Codes
If the method fails, an error is raised.
Error Codes
This method sets the value of pSize equal to the array size needed for the user data. Use the ReDim statement to resize the array and call the method again. Pass the pData parameter by reference, using the first element of the array as the parameter value.
Dim UserData(0) As Byte Dim Size As Long ' Find the required size. ReDim UserData(1) objTimelineObject.GetUserData UserData(0), Size ' Resize the array and get all the data. If Size <> 0 Then ReDim UserData(Size) objTimelineObject.GetUserData UserData(0), Size End If
Retrieves the object's application-defined identifier.
Syntax
object.GetUserID( pVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pVal
- Variable that receives the application-defined identifier.
Error Codes
If the method fails, an error is raised.
Retrieves the object's application-defined name.
Syntax
object.GetUserName() As String
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
Return Value
Returns a string that contains the application-defined name.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_OUTOFMEMORY Insufficient memory.
Removes this object from the timeline (including subobjects but not children), for reinsertion elsewhere.
Syntax
object.Remove()
Error Codes
If the method fails, an error is raised.
Remarks
Call this method only if the application will immediately insert the object back into the timeline. It is an invalid operation to call this method without then reinserting the object. To remove an object permanently, call RemoveAll.
Permanently removes this object from the timeline, including subobjects and children.
Syntax
object.RemoveAll()
Error Codes
If the method fails, an error is raised.
Remarks
To remove an object for the purpose of reinserting it elsewhere in the timeline, call Remove.
Not supported for Visual Basic.
Syntax
object.SetDirtyRange( Start As <Unsupported variant type>, Stop As <Unsupported variant type> )
Not supported for Visual Basic.
Syntax
object.SetDirtyRange2( Start As Double, Stop As Double )
Sets the object's editing state to locked or unlocked. A locked state indicates that the object should not be edited; an unlocked state indicates that the object can be edited. The timeline does not enforce the lock. The locked setting exists only for the convenience of the application.
Syntax
object.SetLocked( newVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- newVal
- Value that specifies the object's editing state. If zero, the object is unlocked and can be edited. If non-zero, the object is locked and should not be edited.
Error Codes
If the method fails, an error is raised.
Sets the object's muted state. A muted object is not rendered, but it remains in the timeline.
Syntax
object.SetMuted( newVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- newVal
- Value that specifies the muted state. If zero, the object is non muted. If non-zero, the object and all its children are muted.
Error Codes
If the method fails, an error is raised.
Remarks
Muting an object also mutes any children contained in the object. For example, if you mute a track, the transitions, sources, and effects in that track are also muted. Once the object is no longer muted, its children revert to their previous state, which might be muted or unmuted.
Not supported for Visual Basic.
Syntax
object.SetPropertySetter( newVal As PropertySetter )
Not supported for Visual Basic.
Syntax
object.SetStartStop( Start As <Unsupported variant type>, Stop As <Unsupported variant type> )
Sets the object's start and stop times, relative to the object's parent.
Syntax
object.SetStartStop2( Start As Double, Stop As Double )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- Start
- New start time, in seconds, or 1 to keep the existing start time.
- Stop
- New stop time, in seconds, or 1 to keep the existing stop time.
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_NOTIMPL Not implemented.
Remarks
Tracks, compositions, and groups do not implement this method. For these objects, the start time is always zero, and the stop time is the maximum stop time of the objects they contain.
Do not set overlapping times on source objects within the same track. Doing so can cause undefined behaviors.
For source objects, the start and stop times are independent of the media start and media stop times. Changing one pair of values does not change the other. To set the media start and stop times, call the AMTimelineSrc.SetMediaTimes2 method. For more information, see Time in DirectShow Editing Services.
Not supported for Visual Basic.
Syntax
object.SetSubObject( newVal As Unknown )
Not supported for Visual Basic.
Syntax
object.SetSubObjectGUID( newVal As GUID )
Specifies the GUID of the subobject associated with this object.
Syntax
object.SetSubObjectGUIDB( newVal As String )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- newVal
- String that contains the GUID of the subobject.
Error Codes
If the method fails, an error is raised.
Remarks
The render engine creates an instance of the subobject as needed.
Not supported for Visual Basic. To create a new timeline object, call the AMTimeline.CreateEmptyNode method. Once an object is created, you cannot change its type.
Syntax
object.SetTimelineType( newVal As TIMELINE_MAJOR_TYPE )
Sets application-defined persistent data.
Syntax
object.SetUserData( pData As Byte, Size As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- pData
- Reference to an array of bytes that contains the data.
- Size
- Size of the array, in bytes.
Error Codes
If the method fails, an error is raised, and Err.Number can be set to one of the following values:
E_OUTOFMEMORY Insufficient memory.
Remarks
Pass the pData parameter by reference, using the first element of the array as the parameter value:
Dim UserData(100) As Byte ' Initialize the array (not shown). objTimelineObject.SetUserData UserData(0), 100
Sets an application-defined identifier for the object.
Syntax
object.SetUserID( newVal As Long )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- newVal
- Value that specifies the identifier. This identifier is used only by the application and can be any value.
Error Codes
If the method fails, an error is raised.
Sets an application-defined name for the object.
Syntax
object.SetUserName( newVal As String )
Parts
- object
- Object expression that evaluates to an AMTimelineObj object.
- newVal
- String that contains the name. Strings longer than 256 characters might be truncated.
Error Codes
If the method fails, an error is raised.