Track class: track, a structure that holds segments. Tracks can be regarded as a collection of clips, which are divided into audio track and video track. After you create a timeline instance, you can add or remove multiple tracks. On each track, you can add multiple video and audio clips to edit, set the volume of the clips, or remove and move the position.
More...
|
| constructor () |
| NvsFx constructor.
|
|
| getType () |
| Get track type. More...
|
|
| getIndex () |
| Gets track index. More...
|
|
| getDuration () |
| Gets track length. More...
|
|
| getClipCount () |
| Gets the number of clips on the track. More...
|
|
| changeInPoint (clipIndex, newInPoint) |
| Modifies the clip's in-point on timeline.If clip does not have this function authorization to return the current InPoint. If newInPoint is less than the outPoint of the previous clip, return the outPoint of the previous clip directly. If the current clip is the 0th clip, newInPoint is at least 0. This function internally calculates a new trimIn based on newInPoint and modifies the trimIn of the clip. If the new trimIn is less than 0, the corresponding Inpoint value when the trimIn is 0 will be returned; if the newInPoint is greater than trimOut, the corresponding Inpoint value of trimOut-1 will be returned. More...
|
|
| changeOutPoint (clipIndex, newOutPoint) |
| Modifies the clip's out-point on timeline.If clip does not have this function authorization to return the current outPoint.If newOutpoint is less than the outPoint of the clip, then newOutpoint will not be less than inpoint+1; if the clip is followed by nextclip, then newOutpoint will not be greater than the inpoint of nextclip. If the current clip is the last clip, the final outPoint is the duration of the timeline. If newOutpoint is greater than the outPoint of the clip, then the end of the video will be FreezeFrame. This function internally calculates a new trimOut based on newOutPoint, and removes the intermediate transition if the inPoint of the clip is not equal to the outPoint of the next clip. More...
|
|
| splitClip (clipIndex, splitPoint) |
| Splits the specified clip. More...
|
|
| removeClip (clipIndex, keepSpace) |
| Removes the specified clip.You are not allowed to remove the opening and ending of a theme. More...
|
|
| removeRange (startTimelinePos, endTimelinePos, keepSpace) |
| Removes all clips within the specified interval, and adjust the timeline in-point or out-point if the clip only partially overlaps the interval., and adjust the timeline in or out point if the clip only partially overlaps the interval.Failed to remove the fragment if it contains the opening and ending sections of the theme.StartTimeLinepos < 0 or endTimeLinepos <= startTimeLinepos will also remove failure. More...
|
|
| moveClip (sourceClipIndex, targetClipIndex) |
| Moving the specified clip, swapping the two positions of the input, affects the arrangement of the clip on the timeline.,clipIndex and destClipIndex cannot be equal to clipCount. More...
|
|
| moveClipByPositions (sourceClipIndex, targetTimelinePos, isInsertTarget, keepSpace) |
| Moves the specified clip to the input position.. clipIndex greater than or equal to clipCount will fail to remove, targetTimeLinePos equal to 0 will be moved to the 0 position, the theme title title will not be moved. More...
|
|
| removeAllClips () |
| Removes all the clips. More...
|
|
| setVolumeGain (leftVolumeGain, rightVolumeGain) |
| Sets the volume. The final volume value is the track volume Multiplied by the clip volume. More...
|
|
| getVolumeGain () |
| Get the volume information. The final volume value is the track volume Multiplied by the clip volume. More...
|
|
| constructor () |
|
| setInternalObject (obj) |
| set internal object More...
|
|
| getInternalObject () |
| get internal object More...
|
|
| setTemplateAttachment (key, value) |
| Adds additional template data to the NvsObject object to identify the NvsObject template object. More...
|
|
| getTemplateAttachment (key) |
| Gets an template attachment to NvsObject. More...
|
|
Track class: track, a structure that holds segments. Tracks can be regarded as a collection of clips, which are divided into audio track and video track. After you create a timeline instance, you can add or remove multiple tracks. On each track, you can add multiple video and audio clips to edit, set the volume of the clips, or remove and move the position.
- See also
- NvsProjObj
◆ changeInPoint()
NvsTrack::changeInPoint |
( |
|
clipIndex, |
|
|
|
newInPoint |
|
) |
| |
|
inline |
Modifies the clip's in-point on timeline.If clip does not have this function authorization to return the current InPoint. If newInPoint is less than the outPoint of the previous clip, return the outPoint of the previous clip directly. If the current clip is the 0th clip, newInPoint is at least 0. This function internally calculates a new trimIn based on newInPoint and modifies the trimIn of the clip. If the new trimIn is less than 0, the corresponding Inpoint value when the trimIn is 0 will be returned; if the newInPoint is greater than trimOut, the corresponding Inpoint value of trimOut-1 will be returned.
- Parameters
-
{Number} | clipIndex Clip Index. |
{Number} | newInPoint The new in-point value on the timeline (in microseconds). |
- Returns
- {Number} Returns the in-point (in microseconds) on the actual reachable timeline. Note: The in-point range on the actual achievable timeline is within the open interval of the timeline out-point of the previous clip and the timeline out-point of the clip.
◆ changeOutPoint()
NvsTrack::changeOutPoint |
( |
|
clipIndex, |
|
|
|
newOutPoint |
|
) |
| |
|
inline |
Modifies the clip's out-point on timeline.If clip does not have this function authorization to return the current outPoint.If newOutpoint is less than the outPoint of the clip, then newOutpoint will not be less than inpoint+1; if the clip is followed by nextclip, then newOutpoint will not be greater than the inpoint of nextclip. If the current clip is the last clip, the final outPoint is the duration of the timeline. If newOutpoint is greater than the outPoint of the clip, then the end of the video will be FreezeFrame. This function internally calculates a new trimOut based on newOutPoint, and removes the intermediate transition if the inPoint of the clip is not equal to the outPoint of the next clip.
- Parameters
-
{Number} | clipIndex Clip Index. |
{Number} | newOutPoint The new out-point on the timeline (in microseconds). |
- Returns
- {Number} Returns the out-point (in microseconds) on the actual reachable timeline. Note: The out-point range on the actual achievable timeline is within the open interval of the timeline in-point of the clip and the next out-point of the clip.
◆ getClipCount()
NvsTrack::getClipCount |
( |
| ) |
|
|
inline |
Gets the number of clips on the track.
- Returns
- {Number} Returns the number of clips on the track.
◆ getDuration()
NvsTrack::getDuration |
( |
| ) |
|
|
inline |
Gets track length.
- Returns
- {Number} Returns the length of the track (in microseconds).
◆ getIndex()
Gets track index.
- Returns
- {Number} Returns track index.
◆ getType()
Get track type.
- Returns
- {NvsTrackTypeEnum} Returns track type.
◆ getVolumeGain()
NvsTrack::getVolumeGain |
( |
| ) |
|
|
inline |
Get the volume information. The final volume value is the track volume Multiplied by the clip volume.
- Returns
- {NvsVolume} Returns the volume object.
◆ moveClip()
NvsTrack::moveClip |
( |
|
sourceClipIndex, |
|
|
|
targetClipIndex |
|
) |
| |
|
inline |
Moving the specified clip, swapping the two positions of the input, affects the arrangement of the clip on the timeline.,clipIndex and destClipIndex cannot be equal to clipCount.
- Parameters
-
{Number} | sourceClipIndex The clip index that needs to be moved |
{Number} | targetClipIndex Target index of th clip move to. |
- Returns
- {Boolean} Returns whether the move operation was successful
◆ moveClipByPositions()
NvsTrack::moveClipByPositions |
( |
|
sourceClipIndex, |
|
|
|
targetTimelinePos, |
|
|
|
isInsertTarget, |
|
|
|
keepSpace |
|
) |
| |
|
inline |
Moves the specified clip to the input position.. clipIndex greater than or equal to clipCount will fail to remove, targetTimeLinePos equal to 0 will be moved to the 0 position, the theme title title will not be moved.
- Parameters
-
{Number} | sourceClipIndex The clip index that need to be moved. |
{Number} | targetTimelinePos The timeline position to which the clip is moved, in microseconds. |
{Boolean} | isInsertTarget Whether to move the clip as an insert,False means use overridden. |
{Boolean} | keepSpace Whether to preserve space during clip movement,The reserved space is the black clip. |
- Returns
- {Boolean} Returns whether the move operation was successful.
◆ removeAllClips()
NvsTrack::removeAllClips |
( |
| ) |
|
|
inline |
Removes all the clips.
- Returns
- {Boolean} Determine if the removal is successful. True means the removal is successful and false the opposite.
◆ removeClip()
NvsTrack::removeClip |
( |
|
clipIndex, |
|
|
|
keepSpace |
|
) |
| |
|
inline |
Removes the specified clip.You are not allowed to remove the opening and ending of a theme.
- Parameters
-
{Number} | clipIndex Clip index. |
{Boolean} | keepSpace Whether the clip's space on the track is preserved after the clip is removed. A value of true is reserved, and a value of false is not retained. |
- Returns
- {Boolean} Determine if the removal is successful. Returning YES will remove the success and NO will fail.
◆ removeRange()
NvsTrack::removeRange |
( |
|
startTimelinePos, |
|
|
|
endTimelinePos, |
|
|
|
keepSpace |
|
) |
| |
|
inline |
Removes all clips within the specified interval, and adjust the timeline in-point or out-point if the clip only partially overlaps the interval., and adjust the timeline in or out point if the clip only partially overlaps the interval.Failed to remove the fragment if it contains the opening and ending sections of the theme.StartTimeLinepos < 0 or endTimeLinepos <= startTimeLinepos will also remove failure.
- Parameters
-
{Number} | startTimelinePos Start timeline position of the interval (in microseconds). |
{Number} | endTimelinePos End timeline position of the interval (in microseconds). |
{Boolean} | keepSpace After the clip in the interval is removed, whether the space on the track occupied by the interval is reserved. A value of true is reserved, and a value of false is not retained. |
- Returns
- {Boolean} Whether the removal was successful or not. True means the removal is successful and false the opposite.
◆ setVolumeGain()
NvsTrack::setVolumeGain |
( |
|
leftVolumeGain, |
|
|
|
rightVolumeGain |
|
) |
| |
|
inline |
Sets the volume. The final volume value is the track volume Multiplied by the clip volume.
- Parameters
-
{Number} | leftVolumeGain Set the left channel of the volume, in the range [0, 4). |
{Number} | rightVolumeGain Set the right channel of the volume, in the range [0, 4). |
- Returns
- {Boolean}
◆ splitClip()
NvsTrack::splitClip |
( |
|
clipIndex, |
|
|
|
splitPoint |
|
) |
| |
|
inline |
Splits the specified clip.
- Parameters
-
{Number} | clipIndex Clip index. |
{Number} | splitPoint Splitting point (in microseconds).The value range is (clip.inpoint, clip.outpoint),Exceeding the value range will cause the cut to fail. Splitting a clip, that is, an operation of dividing a clip of a specified index value into two clips, the index value of the clip on the corresponding track is also changed accordingly. |
- Returns
- {Boolean} Determine whether the split is successful, YES is successful for splitting,NO is unsuccessful.
The documentation for this class was generated from the following file: