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

Audio track, the collection of audio clips. More...

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

Public Member Functions

NvsAudioClip appendClip (String filePath)
 Appends a clip at the end of the track. More...
 
NvsAudioClip appendClip (String filePath, long trimIn, long trimOut)
 Appends a clip at the end of the track. More...
 
NvsAudioClip insertClip (String filePath, int clipIndex)
 Inserts a clip at the specified clip index on the track. More...
 
NvsAudioClip insertClip (String filePath, long trimIn, long trimOut, int clipIndex)
 Inserts clip at the specified clip index on the track. More...
 
NvsAudioClip addClip (String filePath, long inPoint)
 Adds audio clip. More...
 
NvsAudioClip addClip (String filePath, long inPoint, long trimIn, long trimOut)
 Adds audio clip. More...
 
NvsAudioClip appendTimelineClip (NvsTimeline timeline)
 Appends a timeline clip at the end of the audio track. More...
 
NvsAudioClip appendTimelineClip (NvsTimeline timeline, long trimIn, long trimOut)
 Appends a timeline clip at the end of the audio track. More...
 
NvsAudioClip insertTimelineClip (NvsTimeline timeline, int clipIndex)
 Inserts a timeline clip at the specified clip index on the audio track. More...
 
NvsAudioClip insertTimelineClip (NvsTimeline timeline, long trimIn, long trimOut, int clipIndex)
 Inserts timeline clip at the specified clip index on the audio track. More...
 
NvsAudioClip addTimelineClip (NvsTimeline timeline, long inPoint)
 Adds timeline clip. More...
 
NvsAudioClip addTimelineClip (NvsTimeline timeline, long inPoint, long trimIn, long trimOut)
 Adds timeline clip. More...
 
NvsAudioClip getClipByIndex (int clipIndex)
 Gets clip by index. More...
 
NvsAudioClip getClipByTimelinePosition (long timelinePos)
 Gets clip by time. More...
 
NvsAudioTransition setBuiltinTransition (int srcClipIndex, String transitionName)
 Sets built-in transition. More...
 
NvsAudioTransition getTransitionWithSourceClipIndex (int srcClipIndex)
 Gets audio transition from the source clip index. More...
 
- Public Member Functions inherited from com.meicam.sdk.NvsTrack
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.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...
 
long changeOutPoint (int clipIndex, long 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...
 
boolean splitClip (int clipIndex, long splitPoint)
 Splits the specified clip. More...
 
boolean removeClip (int clipIndex, boolean keepSpace)
 Removes the specified clip.You are not allowed to remove the opening and ending of a theme. 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., 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...
 
boolean moveClip (int clipIndex, int destClipIndex)
 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...
 
boolean moveClip (int clipIndex, long targetTimelinePos, boolean isInsertTarget, boolean 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...
 
boolean removeAllClips ()
 Removes all the clips. More...
 
void setVolumeGain (float leftVolumeGain, float rightVolumeGain)
 Sets the volume. The final volume value is the track volume Multiplied by the clip volume. More...
 
NvsVolume getVolumeGain ()
 Get the volume information. The final volume value is the track volume Multiplied by the clip volume. 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...
 
void setTemplateAttachment (String key, String value)
 Adds additional template data to the NvsObject object to identify the NvsObject template object. More...
 
Object getAttachment (String key)
 Gets an attachment to NvsObject. More...
 
String getTemplateAttachment (String key)
 Gets an template attachment to NvsObject. More...
 

Additional Inherited Members

- Static Public Attributes inherited from com.meicam.sdk.NvsTrack
static final int TRACK_TYPE_VIDEO = 0
 Video track. More...
 
static final int TRACK_TYPE_AUDIO = 1
 Audio track. More...
 
- Static Public Attributes inherited from com.meicam.sdk.NvsObject
static final String TEMPLATE_KEY_REPLACE_ID = "MSTemplate-ReplaceId"
 
static final String TEMPLATE_KEY_FOOTAGE_CAN_REPLACE = "MSTemplate-FootageCanReplace"
 
static final String TEMPLATE_KEY_FOOTAGE_ID = "MSTemplate-FootageId"
 
static final String TEMPLATE_KEY_FOOTAGE_NAME = "MSTemplate-FootageName"
 
static final String TEMPLATE_KEY_FOOTAGE_M3U8_NAME = "MSTemplate-FootageM3U8Name"
 
static final String TEMPLATE_KEY_FOOTAGE_TAGS = "MSTemplate-FootageTags"
 
static final String TEMPLATE_KEY_FOOTAGE_TYPE = "MSTemplate-FootageType"
 
static final String TEMPLATE_KEY_FOOTAGE_NEED_REVERSE = "MSTemplate-FootageNeedReverse"
 
static final String TEMPLATE_KEY_CLIP_RAW_WIDTH = "MSTemplate-ClipRawWidth"
 
static final String TEMPLATE_KEY_CLIP_RAW_HEIGHT = "MSTemplate-ClipRawHeight"
 
static final String TEMPLATE_KEY_VOLUME_TYPE = "MSTemplate-VolumeType"
 
static final String TEMPLATE_KEY_FX_GROUP = "MSTemplate-FxGroup"
 
static final String TEMPLATE_KEY_BEST_SEEK_TIME = "MSTemplate-BestSeekTime"
 
static final String TEMPLATE_KEY_MASK_TYPE = "MSTemplate-MaskType"
 
static final String TEMPLATE_VALUE_MASK_TYPE_LINE = "MSTemplate-MaskType-Line"
 
static final String TEMPLATE_VALUE_MASK_TYPE_MIRROR = "MSTemplate-MaskType-Mirror"
 
static final String TEMPLATE_VALUE_MASK_TYPE_CIRCLE = "MSTemplate-MaskType-Circle"
 
static final String TEMPLATE_VALUE_MASK_TYPE_RECT = "MSTemplate-MaskType-Rect"
 
static final String TEMPLATE_VALUE_MASK_TYPE_HEART = "MSTemplate-MaskType-Heart"
 
static final String TEMPLATE_VALUE_MASK_TYPE_STAR = "MSTemplate-MaskType-Star"
 
static final String TEMPLATE_KEY_TRANS_TYPE_CUT = "MSTemplate-TransType-Cut"
 
static final String TEMPLATE_KEY_CURVE_SPEED_TYPE = "MSTemplate-CurveSpeedType"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_CUSTOM = "MSTemplate-CurveSpeedType-Custom"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_MONTAGE = "MSTemplate-CurveSpeedType-Montage"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_HERO = "MSTemplate-CurveSpeedType-Hero"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_BULLET = "MSTemplate-CurveSpeedType-bullet"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_PLUS = "MSTemplate-CurveSpeedType-Plus"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_IN = "MSTemplate-CurveSpeedType-In"
 
static final String TEMPLATE_VALUE_CURVE_SPEED_TYPE_OUT = "MSTemplate-CurveSpeedType-Out"
 
- 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

Audio track, the collection of audio clips.

An audio track is an entity that holds audio clips. Multiple audio clips can be added or removed from audio track. At the joint of two audio clips, an audio transition could be inserted.

Note: For the meaning of a series of interfaces and parameters of the audio track, please refer to the corresponding interface of the video track NvsVideoTrack.

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

Member Function Documentation

◆ addClip() [1/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.addClip ( String  filePath,
long  inPoint 
)
inline

Adds audio clip.

Parameters
filePathAudio clip path. For the clip path type, please refer to the parameter filePath of the NvsVideoTrack interface addClip().
inPointThe in point on the timeline to insert the audio clip (in microseconds).
Returns
Returns the added audio clip object.
Warning
inPoint range: [0 , timeline.getDuration())
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
appendClip
insertClip

◆ addClip() [2/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.addClip ( String  filePath,
long  inPoint,
long  trimIn,
long  trimOut 
)
inline

Adds audio clip.

Parameters
filePathAudio clip path. For the clip path type, please refer to the parameter filePath of the NvsVideoTrack interface addClip().
inPointThe in point of the audio clip to be inserted on the timeline (in microseconds).
trimInTrim in point of audio clip (in microseconds).
trimOutTrim out point of audio clip (in microseconds).
Returns
Returns the added audio clip object.
Warning
Parameters need to meet (0 <= trimIn < trimOut). If trimOut is bigger than the file original duration, it will be played in the last frame
This interface causes the streaming engine state to jump to the engine stop state, as described in Engine Changes.
See also
appendClip
insertClip

◆ addTimelineClip() [1/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.addTimelineClip ( NvsTimeline  timeline,
long  inPoint 
)
inline

Adds timeline clip.

Parameters
timelineThe timeline object to be added.
inPointThe in point on the timeline to add the audio clip (in microseconds).
Returns
Returns the added audio clip object.
Warning
inPoint range: 0 , parent timeline duration)
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
appendTimelineClip
insertTimelineClip
Since
2.24.0

◆ addTimelineClip() [2/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.addTimelineClip ( NvsTimeline  timeline,
long  inPoint,
long  trimIn,
long  trimOut 
)
inline

Adds timeline clip.

Parameters
timelineThe timeline object to be added.
inPointThe in point of the audio clip to be inserted on the timeline (in microseconds).
trimInTrim in point of audio clip (in microseconds).
trimOutTrim out point of audio clip (in microseconds).
Returns
Returns the added audio clip object.
Warning
Parameters need to meet (0 <= trimIn < trimOut). If trimOut is bigger than the added timeline duration, it will be played in the last frame
This interface causes the streaming engine state to jump to the engine stop state, as described in Engine Changes.
See also
appendTimelineClip
insertTimelineClip

◆ appendClip() [1/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.appendClip ( String  filePath)
inline

Appends a clip at the end of the track.

Parameters
filePathclip path. For the clip path type, please refer to the parameter filePath of the NvsVideoTrack interface addClip().
Returns
Returns the appended audio clip object.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
insertClip
getClipByIndex

◆ appendClip() [2/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.appendClip ( String  filePath,
long  trimIn,
long  trimOut 
)
inline

Appends a clip at the end of the track.

Parameters
filePathclip path. For the clip path type, please refer to the parameter filePath of the NvsVideoTrack interface addClip().
trimInTrim in point (in microseconds).
trimOutTrim out point (in microseconds).
Returns
Returns the appended audio clip object.
Warning
Parameters need to meet (0 <= trimIn < trimOut). If trimOut is bigger than the file original duration, it will be played in the last frame
This interface will cause the streaming engine state to jump to the engine stop state, for more details, please refer to Engine Change Feature.
See also
insertClip
getClipByIndex

◆ appendTimelineClip() [1/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.appendTimelineClip ( NvsTimeline  timeline)
inline

Appends a timeline clip at the end of the audio track.

Parameters
timelineThe timeline object to be appended.
Returns
Returns the appended audio clip object.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
insertTimelineClip
getClipByIndex
Since
2.24.0

◆ appendTimelineClip() [2/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.appendTimelineClip ( NvsTimeline  timeline,
long  trimIn,
long  trimOut 
)
inline

Appends a timeline clip at the end of the audio track.

Parameters
timelineThe timeline object to be appended.
trimInTrim in point (in microseconds).
trimOutTrim out point (in microseconds).
Returns
Returns the appended audio clip object.
Warning
Parameters need to meet (0 <= trimIn < trimOut). If trimOut is bigger than the appended timeline duration, it will be played in the last frame
This interface will cause the streaming engine state to jump to the engine stop state, for more details, please refer to Engine Change Feature.
See also
insertTimelineClip
getClipByIndex
Since
2.24.0

◆ getClipByIndex()

NvsAudioClip com.meicam.sdk.NvsAudioTrack.getClipByIndex ( int  clipIndex)
inline

Gets clip by index.

Parameters
clipIndexClip index.
Returns
Returns the obtained audio clip object.
Warning
clipIndex range(0 <= clipIndex < getClipCount()),if out of range will return NULL
See also
getClipByTimelinePosition
appendClip
insertClip

◆ getClipByTimelinePosition()

NvsAudioClip com.meicam.sdk.NvsAudioTrack.getClipByTimelinePosition ( long  timelinePos)
inline

Gets clip by time.

Parameters
timelinePosPosition on the timeline (in microseconds).
Returns
Returns the obtained audio clip object.
Warning
timelinePos range(0 <= timelinePos < timeline.getDuration()),if out of range will return NULL
See also
getClipByIndex

◆ getTransitionWithSourceClipIndex()

NvsAudioTransition com.meicam.sdk.NvsAudioTrack.getTransitionWithSourceClipIndex ( int  srcClipIndex)
inline

Gets audio transition from the source clip index.

Parameters
srcClipIndexSource clip index.Range [0 , getClipCount())
Returns
Returns the acquired audio transition object.
See also
setBuiltinTransition

◆ insertClip() [1/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.insertClip ( String  filePath,
int  clipIndex 
)
inline

Inserts a clip at the specified clip index on the track.

Parameters
filePathclip path. For the clip path type, please refer to the parameter filePath of the NvsVideoTrack interface addClip().
clipIndexClip index to insert at.
Returns
Returns the inserted audio clip object.
Warning
If index is greater than the number of existing clips, it is added at the end.If the value of clipIndex is equal to 0, meanwhile the timeline contain themeLeader,the return object is NULL.If the value of clipIndex is more or equal to the getClipCount() of this track, meanwhile the timeline contain themeTrailer,the return object is NULL.
This interface will cause the streaming engine state to jump to the engine stop state, for more details,please refer to Engine Change Feature.
See also
appendClip
getClipByIndex

◆ insertClip() [2/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.insertClip ( String  filePath,
long  trimIn,
long  trimOut,
int  clipIndex 
)
inline

Inserts clip at the specified clip index on the track.

Parameters
filePathclip path. For the clip path type, please refer to the parameter filePath of the NvsVideoTrack interface addClip().
trimInTrim in point (in microseconds).
trimOutTrim out point (in microseconds).
clipIndexClip index to insert at.
Returns
Returns the inserted audio clip object.
Warning
Parameters need to meet (0 <= trimIn < trimOut). If trimOut is bigger than the file original duration, it will be played in the last frame
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
appendClip
getClipByIndex

◆ insertTimelineClip() [1/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.insertTimelineClip ( NvsTimeline  timeline,
int  clipIndex 
)
inline

Inserts a timeline clip at the specified clip index on the audio track.

Parameters
timelineThe timeline object to be inserted.
clipIndexClip index to insert at.
Returns
Returns the inserted audio clip object.
Warning
If index is greater than the number of existing clips, it is added at the end.If the value of clipIndex is equal to 0, meanwhile the timeline contain themeLeader,the return object is NULL.If the value of clipIndex is more or equal to the getClipCount() of this track, meanwhile the timeline contain themeTrailer,the return object is NULL.
This interface will cause the streaming engine state to jump to the engine stop state, for more details,please refer to Engine Change Feature.
See also
appendTimelineClip
getClipByIndex
Since
2.24.0

◆ insertTimelineClip() [2/2]

NvsAudioClip com.meicam.sdk.NvsAudioTrack.insertTimelineClip ( NvsTimeline  timeline,
long  trimIn,
long  trimOut,
int  clipIndex 
)
inline

Inserts timeline clip at the specified clip index on the audio track.

Parameters
timelineThe timeline object to be inserted.
trimInTrim in point (in microseconds).
trimOutTrim out point (in microseconds).
clipIndexClip index to insert at.
Returns
Returns the inserted audio clip object.
Warning
Parameters need to meet (0 <= trimIn < trimOut). If trimOut is bigger than the inserted timeline duration, it will be played in the last frame
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
appendTimelineClip
getClipByIndex
Since
2.24.0

◆ setBuiltinTransition()

NvsAudioTransition com.meicam.sdk.NvsAudioTrack.setBuiltinTransition ( int  srcClipIndex,
String  transitionName 
)
inline

Sets built-in transition.

Parameters
srcClipIndexSource clip index of the transition. Range [0 , getClipCount())
transitionNameAudio transition name. Note: Currently audio transition only supports Fade mode; if it is set to null string, the original transition will be deleted.
Returns
Returns audio transition object.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, please refer to Engine Change Feature for details.
See also
getTransitionWithSourceClipIndex

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