set_duration


Description:

public virtual bool set_duration (ClockTime duration)

Sets duration for the element.

Whilst the element is part of a Timeline, this is the same as editing the element with edit under TRIM with END. In particular, the duration of the element may be snapped to a different timeline time difference from the one given. In addition, setting may fail if it would place the timeline in an unsupported configuration, or the element does not have enough internal content to last the desired duration.

Parameters:

this

A TimelineElement

duration

The desired duration in its timeline

Returns:

true if duration could be set for this.