Microsoft DirectX 8.0

AMTimelineObj Object

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

ClearDirtyNot supported for Visual Basic.
FixTimesNot supported for Visual Basic.
FixTimes2Rounds the specified start and stop times to the nearest frame boundaries, as defined by the parent group's frame rate setting.
GetDirtyRangeNot supported for Visual Basic.
GetDirtyRange2Not supported for Visual Basic.
GetEmbedDepthNot supported for Visual Basic.
GetGenIDRetrieves the object's generated identifier.
GetGroupIBelongToNot supported for Visual Basic.
GetLockedRetrieves the object's editing state (locked or unlocked).
GetMutedRetrieves the object's muted state.
GetPropertySetterNot supported for Visual Basic.
GetStartStopNot supported for Visual Basic.
GetStartStop2Retrieves the object's start and stop times, relative to the object's parent.
GetSubObjectNot supported for Visual Basic.
GetSubObjectGUIDNot supported for Visual Basic.
GetSubObjectGUIDBRetrieves the GUID of the subobject associated with this object.
GetSubObjectLoadedDetermines whether a subobject has been created for the object.
GetTimelineNoRefNot supported for Visual Basic.
GetTimelineTypeRetrieves the object's type.
GetUserDataRetrieves application-defined persistent data.
GetUserIDRetrieves the object's application-defined identifier.
GetUserNameRetrieves the object's application-defined name.
RemoveRemoves this object from the timeline, for reinsertion elsewhere.
RemoveAllPermanently removes this object from the timeline, including subobjects and children.
SetDirtyRangeNot supported for Visual Basic.
SetDirtyRange2Not supported for Visual Basic.
SetLockedSets the object's editing state to locked or unlocked.
SetMutedSets the object's muted state.
SetPropertySetterNot supported for Visual Basic.
SetStartStopNot supported for Visual Basic.
SetStartStop2Sets the object's start and stop times, relative to the object's parent.
SetSubObjectNot supported for Visual Basic.
SetSubObjectGUIDNot supported for Visual Basic.
SetSubObjectGUIDBSpecifies the GUID of the subobject associated with this object.
SetTimelineTypeNot supported for Visual Basic.
SetUserDataSets application-defined persistent data.
SetUserIDSets an application-defined identifier for the object.
SetUserNameSets an application-defined name for the object.

ClearDirty Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.ClearDirty()

FixTimes Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.FixTimes(
    pStart As <Unsupported variant type>,
    pStop As <Unsupported variant type>
)

FixTimes2 Method (AMTimelineObj Object)

AMTimelineObj Object

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_NOTINTREEThe 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.

GetDirtyRange Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetDirtyRange(
    pStart As <Unsupported variant type>,
    pStop As <Unsupported variant type>
)

GetDirtyRange2 Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetDirtyRange2(
    pStart As Double,
    pStop As Double
)

GetEmbedDepth Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetEmbedDepth(
    pVal As Long
)

GetGenID Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetGroupIBelongTo Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetGroupIBelongTo(
    ppGroup As AMTimelineGroup
)

GetLocked Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetMuted Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetPropertySetter Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic..

Syntax

object.GetPropertySetter() As PropertySetter

GetStartStop Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetStartStop(
    pStart As <Unsupported variant type>,
    pStop As <Unsupported variant type>
)

GetStartStop2 Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetSubObject Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetSubObject(
    pVal As Unknown
)

GetSubObjectGUID Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetSubObjectGUID(
    pVal As GUID
)

GetSubObjectGUIDB Method (AMTimelineObj Object)

AMTimelineObj Object

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_OUTOFMEMORYInsufficient memory.

GetSubObjectLoaded Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetTimelineNoRef Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.GetTimelineNoRef(
    ppResult As AMTimeline 
)

GetTimelineType Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetUserData Method (AMTimelineObj Object)

AMTimelineObj Object

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

GetUserID Method (AMTimelineObj Object)

AMTimelineObj Object

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.

GetUserName Method (AMTimelineObj Object)

AMTimelineObj Object

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_OUTOFMEMORYInsufficient memory.

Remove Method (AMTimelineObj Object)

AMTimelineObj Object

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.

RemoveAll Method (AMTimelineObj Object)

AMTimelineObj Object

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.

SetDirtyRange Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.SetDirtyRange(
    Start As <Unsupported variant type>,
    Stop As <Unsupported variant type>
)

SetDirtyRange2 Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.SetDirtyRange2(
    Start As Double,
    Stop As Double
)

SetLocked Method (AMTimelineObj Object)

AMTimelineObj Object

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.

SetMuted Method (AMTimelineObj Object)

AMTimelineObj Object

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.

SetPropertySetter Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.SetPropertySetter(
    newVal As PropertySetter
)

SetStartStop Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.SetStartStop(
    Start As <Unsupported variant type>,
    Stop As <Unsupported variant type>
)

SetStartStop2 Method (AMTimelineObj Object)

AMTimelineObj Object

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_INVALIDARGInvalid argument.
E_NOTIMPLNot 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.

SetSubObject Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.SetSubObject(
    newVal As Unknown
)

SetSubObjectGUID Method (AMTimelineObj Object)

AMTimelineObj Object

Not supported for Visual Basic.

Syntax

object.SetSubObjectGUID(
    newVal As GUID
)

SetSubObjectGUIDB Method (AMTimelineObj Object)

AMTimelineObj Object

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.

SetTimelineType Method (AMTimelineObj Object)

AMTimelineObj Object

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 
)

SetUserData Method (AMTimelineObj Object)

AMTimelineObj Object

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_OUTOFMEMORYInsufficient 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

SetUserID Method (AMTimelineObj Object)

AMTimelineObj Object

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.

SetUserName Method (AMTimelineObj Object)

AMTimelineObj Object

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.