|
NvsVideoClip | appendClip (String filePath) |
| Appends a video clip to the end of the video track. More...
|
|
NvsVideoClip | appendClip (String filePath, long trimIn, long trimOut) |
| Appends a video clip of the specified length to the end of the video track. More...
|
|
NvsVideoClip | insertClip (String filePath, int clipIndex) |
| Inserts a video clip at the specified clip index on the video track. More...
|
|
NvsVideoClip | insertClip (String filePath, long trimIn, long trimOut, int clipIndex) |
| Inserts a video clip of the specified length at the specified clip index on the video track. More...
|
|
NvsVideoClip | addClip (String filePath, long inPoint) |
| add clip. More...
|
|
NvsVideoClip | addClip (String filePath, long inPoint, long trimIn, long trimOut) |
| Adds a clip of the specified length. More...
|
|
NvsVideoClip | getClipByIndex (int clipIndex) |
| Gets video clip by index. More...
|
|
NvsVideoClip | getClipByTimelinePosition (long timelinePos) |
| Gets video clip by time. More...
|
|
NvsVideoTransition | setBuiltinTransition (int srcClipIndex, String transitionName) |
| Sets built-in transitions. More...
|
|
NvsVideoTransition | setPackagedTransition (int srcClipIndex, String packageId) |
| Sets resource package transition. More...
|
|
NvsVideoTransition | getTransitionBySourceClipIndex (int srcClipIndex) |
| Get the transition through the source video clip index. More...
|
|
int | getType () |
| Get track type. More...
|
|
int | getIndex () |
| Gets track index. More...
|
|
long | getDuration () |
| Gets track length. More...
|
|
int | getClipCount () |
| Gets the number of clips on the track. More...
|
|
long | changeInPoint (int clipIndex, long newInPoint) |
| Modifies the clip's in-point on timeline. More...
|
|
long | changeOutPoint (int clipIndex, long newOutPoint) |
| Modifies the clip's out-point on timeline. More...
|
|
boolean | splitClip (int clipIndex, long splitPoint) |
| Splits the specified clip. More...
|
|
boolean | removeClip (int clipIndex, boolean keepSpace) |
| Removes the specified clip. More...
|
|
boolean | removeRange (long startTimelinePos, long endTimelinePos, boolean 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. More...
|
|
boolean | moveClip (int clipIndex, int destClipIndex) |
| Removes the specified clip. More...
|
|
boolean | removeAllClips () |
| Removes all the clips. More...
|
|
void | setVolumeGain (float leftVolumeGain, float rightVolumeGain) |
| Sets the volume. More...
|
|
NvsVolume | getVolumeGain () |
| Get the volume information. More...
|
|
void | setAttachment (String key, Object value) |
| Adds additional data to the NvsObject object to identify the NvsObject object or for other purpose. More...
|
|
Object | getAttachment (String key) |
| Gets an attachment to NvsObject. More...
|
|
video track,the collection of video clips.
A video track is an entity that holds video clips, and users can add, insert, and delete multiple video clips. The video track continues to expand as the clip increases, and video transitions can be inserted between clips. When adding a package transition, users need to install it and get the packageID returned as the handle of the transition. For built-in transition, their names are regarded as handle. Note: The index of the video clip starts from 0.
- Warning
- In the NvsVideoTrack class, all public APIs are used in the UI thread! ! !
NvsVideoClip com.meicam.sdk.NvsVideoTrack.insertClip |
( |
String |
filePath, |
|
|
long |
trimIn, |
|
|
long |
trimOut, |
|
|
int |
clipIndex |
|
) |
| |
|
inline |
Inserts a video clip of the specified length at the specified clip index on the video track.
- Parameters
-
filePath | Video clip path. For the clip path method, please refer to the parameter filePath of addClip(). |
clipIndex | Index of the inserted clip. |
trimIn | Trim in point of video clips (in microseconds) |
trimOut | Trim out point of video clips (in microseconds)) |
- Returns
- Returns the inserted video clip object.
There are three video clips C1, C2, C3 on the track in the above figure, and the clip C4 is to be inserted. The point indicated by the arrow on the C4 clip is the clip's trim in and out points, C4 is inserted after trim. Note: The trim in and out values must be within the duration of this clip, and the trim in point value must be less than the trim out point value. The implementation code is as follows: NvsVideoTrack m_videoTrack;//m_videoTrack Omits creation int clipCount = m_videoTrack.getClipCount(); NvsVideoClip m_videoClip; m_videoClip = m_videoTrack.insertClip(filepath,trimIn,trimOut,0);//Filepath is the path of clip C4, trim in and trim out are the values at the position indicated by the arrow on the C4 clip of the above figure, and the value of clipIndex is [0, clipCount-1]. After insertion, it becomes:
- Warning
- This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
- See also
- appendClip
NvsVideoTransition com.meicam.sdk.NvsVideoTrack.setBuiltinTransition |
( |
int |
srcClipIndex, |
|
|
String |
transitionName |
|
) |
| |
|
inline |
Sets built-in transitions.
- Parameters
-
- Returns
- Returns the video transition object. If the transitionName is set to a null string (namely, to delete the original transition), return null.
For instance: There are four video clips on the track in the below figure, which are C1, C2, C3, and C4, respectively, where clip C1, C2, and C3 are adjacent, and there is a gap between clip C3 and C4. If a transition is set between C1 and C2, it becomes:
NvsVideoTrack m_videoTrack;//m_videoTrack omitted creation
int clipCount = m_videoTrack.getClipCount();
NvsVideoTransition m_videoTransition;
m_videoTransition = m_videoTrack.setBuiltinTransition(0,transitionName) //srcClipIndex takes the range of (1, clipCount-1), and transitionName is the name of the transition to be set.
If a transition is added between C2 and C3, the index is 1. The transition can only be set between two adjacent clips. Since there is a gap between the C3 and C4 clip in the above figure, it is not possible to add a transition between the two clips.
- Warning
- This interface will cause the streaming engine state to jump to the engine stop state. For details, please refer to Engine Change.
- See also
- setPackagedTransition