MeiCam SDK For Android  1.0.0
Public Member Functions | List of all members
com.meicam.sdk.NvsTrack Class Reference

Track,the container of Clips. More...

Inheritance diagram for com.meicam.sdk.NvsTrack:
com.meicam.sdk.NvsObject com.meicam.sdk.NvsAudioTrack com.meicam.sdk.NvsVideoTrack

Public Member Functions

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...
 
- Public Member Functions inherited from com.meicam.sdk.NvsObject
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...
 

Static Public Attributes

Track type

static final int TRACK_TYPE_VIDEO = 0
 Video track. More...
 
static final int TRACK_TYPE_AUDIO = 1
 Audio track. More...
 

Additional Inherited Members

- Protected Member Functions inherited from com.meicam.sdk.NvsObject
void setInternalObject (long internalObject)
 
long getInternalObject ()
 
- Protected Attributes inherited from com.meicam.sdk.NvsObject
long m_internalObject = 0
 

Detailed Description

Track,the container of Clips.

A track can be thought of as a collection of clips, divided into an audio track (Audio Track) and a video track (Video Track). After creating a timeline instance, you can add or remove multiple tracks. On each track, you can add multiple video/audio clips to edit, set the volume to the clip,remove the clip and move clip's position.

Warning
In the NvsTrack class, all public APIs are used in the UI thread! ! !

Member Function Documentation

long com.meicam.sdk.NvsTrack.changeInPoint ( int  clipIndex,
long  newInPoint 
)
inline

Modifies the clip's in-point on timeline.

Parameters
clipIndexClip Index.
newInPointThe new in-point value on the timeline (in microseconds).
Returns
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.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
Since
1.6.0
See also
changeOutPoint
long com.meicam.sdk.NvsTrack.changeOutPoint ( int  clipIndex,
long  newOutPoint 
)
inline

Modifies the clip's out-point on timeline.

Parameters
clipIndexClip Index.
newOutPointThe new out-point on the timeline (in microseconds).
Returns
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.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
Since
1.6.0
See also
changeOutPoint
int com.meicam.sdk.NvsTrack.getClipCount ( )
inline

Gets the number of clips on the track.

Returns
Returns the number of clips on the track.
long com.meicam.sdk.NvsTrack.getDuration ( )
inline

Gets track length.

Returns
Returns the length of the track (in microseconds).
int com.meicam.sdk.NvsTrack.getIndex ( )
inline

Gets track index.

Returns
Returns track index.
int com.meicam.sdk.NvsTrack.getType ( )
inline

Get track type.

Returns
Returns track type.
NvsVolume com.meicam.sdk.NvsTrack.getVolumeGain ( )
inline

Get the volume information.

Returns
Returns the volume object.
See also
setVolumeGain
boolean com.meicam.sdk.NvsTrack.moveClip ( int  clipIndex,
int  destClipIndex 
)
inline

Removes the specified clip.

Parameters
clipIndexClip index.
destClipIndexTarget index of th clip move to.
Returns
Returns the number of clips on the track.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
boolean com.meicam.sdk.NvsTrack.removeAllClips ( )
inline

Removes all the clips.

Returns
Determine if the removal is successful. True means the removal is successful and false the opposite.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
See also
removeClip
boolean com.meicam.sdk.NvsTrack.removeClip ( int  clipIndex,
boolean  keepSpace 
)
inline

Removes the specified clip.

Parameters
clipIndexClip index.
keepSpaceWhether 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
Determine if the removal is successful. True means the removal is successful and false the opposite.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
See also
removeAllClips
boolean com.meicam.sdk.NvsTrack.removeRange ( long  startTimelinePos,
long  endTimelinePos,
boolean  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.

Parameters
startTimelinePosStart timeline position of the interval (in microseconds).
endTimelinePosEnd timeline position of the interval (in microseconds).
keepSpaceAfter 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
Whether the removal was successful or not. True means the removal is successful and false the opposite.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
void com.meicam.sdk.NvsTrack.setVolumeGain ( float  leftVolumeGain,
float  rightVolumeGain 
)
inline

Sets the volume.

Parameters
leftVolumeGainLeft volume value, value ranges from [0, 8).
rightVolumeGainRight volume value, value ranges from [0, 8).
See also
getVolumeGain
boolean com.meicam.sdk.NvsTrack.splitClip ( int  clipIndex,
long  splitPoint 
)
inline

Splits the specified clip.

Parameters
clipIndexClip index.
splitPointSpliting point (in microseconds). 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.

Examples are as follows:

TrackClip.PNG

In the above figure, there are three video clips C1, C2, and C3 on the track, and the clip C2 is splited, and the splited clips are named C2 and C4, respectively. Determine whether the split is successful by obtaining the current number of clips on the track. If the split is successful, the C2 and C4 index values correspond to 1 and 2.

The result is as follows:

afterSplitClip.PNG
Warning
This interface will cause the streaming engine state to jump to the engine stop state, refer to Engine Change Feature for details.
See also
removeClip

Member Data Documentation

final int com.meicam.sdk.NvsTrack.TRACK_TYPE_AUDIO = 1
static

Audio track.

final int com.meicam.sdk.NvsTrack.TRACK_TYPE_VIDEO = 0
static

Video track.


The documentation for this class was generated from the following file: