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

Audio clip, description of the audio file. More...

Inheritance diagram for com.meicam.sdk.NvsAudioClip:
com.meicam.sdk.NvsClip com.meicam.sdk.NvsObject

Public Member Functions

NvsAudioFx appendFx (String fxName)
 Adds an audio effect to the end of the audio clip. More...
 
NvsAudioFx insertFx (String fxName, int fxIndex)
 Inserts an audio effect at the specified effect index on the audio clip. More...
 
NvsAudioFx appendCustomFx (NvsCustomAudioFx.Renderer customAudioFxRender)
 Appends custom audio effect to the clip. More...
 
NvsAudioFx insertCustomFx (NvsCustomAudioFx.Renderer customAudioFxRender, int fxIndex)
 Inserts a custom audio effect at the specified effect index on the clip. More...
 
boolean removeFx (int fxIndex)
 Removes audio effect by index,The subsequent audioFx index moves forward. More...
 
boolean removeAllFx ()
 Removes all effects. More...
 
NvsAudioFx getFxByIndex (int fxIndex)
 Gets audio effect by index. More...
 
void setFadeInDuration (long duration)
 Sets the fade-in time. More...
 
long getFadeInDuration ()
 Gets fade-in time. More...
 
void setFadeOutDuration (long duration)
 Sets fade-out time. More...
 
long getFadeOutDuration ()
 Gets fade-out time. More...
 
- Public Member Functions inherited from com.meicam.sdk.NvsClip
NvsTimeline getInternalTimeline ()
 Gets the internal timeline object from the clip. More...
 
long getTrimIn ()
 Gets the trim in point of the clip. More...
 
long getTrimOut ()
 Gets the trim out point of the clip. More...
 
boolean moveTrimPoint (long offset)
 Move trim points of clip(in microseconds) More...
 
long getInPoint ()
 Gets the in-point of the clip on the timeline. More...
 
long getOutPoint ()
 Gets the out-point of the clip on the timeline. More...
 
int getType ()
 Gets the clip type (video clip, audio clip). More...
 
int getClipMode ()
 Gets the clip mode (media clip, timeline clip). More...
 
int getIndex ()
 Gets the index of the clip on the track. More...
 
boolean changeClipMode (int clipMode)
 Change the clip mode. More...
 
boolean changeFilePath (String filePath)
 Change the clip file path. More...
 
boolean changeInternalTimeline (NvsTimeline timeline)
 Change the clip internal timeline. More...
 
String getFilePath ()
 Gets the clip file path. More...
 
int getFxCount ()
 Gets the number of effects on the clip. Note: The effect index on the clip starts from 0. More...
 
long changeTrimInPoint (long newTrimInPoint, boolean affectSibling)
 Modifies the trim in point of the clip. More...
 
long changeTrimOutPoint (long newTrimOutPoint, boolean affectSibling)
 Modifies the trim out point of the clip. More...
 
double getSpeed ()
 Get the playback speed of the clip. More...
 
boolean isKeepAudioPitch ()
 Is keep the tone unchanged. More...
 
void changeSpeed (double newSpeed)
 Changes the playback speed of the clip. More...
 
boolean changeCurvesVariableSpeed (String curvesString, boolean keepAudioPitch)
 Changes the playback speed of the clip by curves(only support for video clip). More...
 
String getClipVariableSpeedCurvesString ()
 get current variable speed curves of clip. More...
 
NvsAudioFx getAudioVolumeFx ()
 Gets the audio volume effect of the clip. More...
 
void changeSpeed (double newSpeed, boolean keepAudioPitch)
 Changes the playback speed of the clip. More...
 
void setVolumeGain (float leftVolumeGain, float rightVolumeGain)
 Sets the volume. More...
 
NvsVolume getVolumeGain ()
 Gets volume. More...
 
NvsVolume getRealVolumeAtTime (long time)
 Get the real-time volume at a specified time point. More...
 
void setLoopAudio (boolean loop)
 Sets whether to loop audio if the clip' trim out go beyond its audio stream's duration. More...
 
boolean getLoopAudio ()
 Gets whether to loop audio if the clip' trim out go beyond its audio stream's duration. More...
 
long GetClipPosByTimelinePosCurvesVariableSpeed (long timelinePos)
 Gets the pos in clip by current timeline pos when used curves variable speed. More...
 
long GetTimelinePosByClipPosCurvesVariableSpeed (long clipPos)
 Gets the pos in timelne by current clip pos when used curves variable speed. 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.NvsClip
static final int CLIP_TYPE_VIDEO = 0
 video clip type More...
 
static final int CLIP_TYPE_AUDIO = 1
 audio clip type More...
 
static final int CLIP_MODE_MEDIA = 0
 video clip type More...
 
static final int CLIP_MODE_TIMELINE = 1
 audio clip type 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 clip, description of the audio file.

Audio clips can modify trim in and out points, playback speed, etc. Users can also add, insert, remove, and acquire multiple audio effects.

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

Member Function Documentation

◆ appendCustomFx()

NvsAudioFx com.meicam.sdk.NvsAudioClip.appendCustomFx ( NvsCustomAudioFx.Renderer  customAudioFxRender)
inline

Appends custom audio effect to the clip.

Parameters
NvsCustomAudioFx.RendererUser-implemented custom audio effect renderer interface.
Returns
Returns the appended audio effect object.
Warning
This interface causes the streaming engine state to jump to the engine stop state. For more infomations please refer to Engine Changes.

◆ appendFx()

NvsAudioFx com.meicam.sdk.NvsAudioClip.appendFx ( String  fxName)
inline

Adds an audio effect to the end of the audio clip.

Parameters
fxNameAudio effect name. For the effect name, please refer to getAllBuiltinAudioFxNames() or built-in effect name list.
Returns
Returns the appended audio effect object.
Warning
This interface causes the streaming engine state to jump to the engine stop state. For more infomations please refer to Engine Changes.
See also
insertFx
removeFx
getFxByIndex

◆ getFadeInDuration()

long com.meicam.sdk.NvsAudioClip.getFadeInDuration ( )
inline

Gets fade-in time.

Returns
Returns the fade-in time in microseconds.
Since
1.16.0
See also
setFadeInDuration

◆ getFadeOutDuration()

long com.meicam.sdk.NvsAudioClip.getFadeOutDuration ( )
inline

Gets fade-out time.

Returns
Returns the fade-out time in microseconds.
Since
1.16.0
See also
getFadeOutDuration

◆ getFxByIndex()

NvsAudioFx com.meicam.sdk.NvsAudioClip.getFxByIndex ( int  fxIndex)
inline

Gets audio effect by index.

Parameters
fxIndexAudio effect's index. Range [0, getFxCount())
Returns
Returns the acquired audio effect object.
See also
appendFx
insertFx
removeFx

◆ insertCustomFx()

NvsAudioFx com.meicam.sdk.NvsAudioClip.insertCustomFx ( NvsCustomAudioFx.Renderer  customAudioFxRender,
int  fxIndex 
)
inline

Inserts a custom audio effect at the specified effect index on the clip.

Parameters
NvsCustomAudioFx.RendererUser-implemented custom audio effect renderer interface.
fxIndexaudio effects' index to insert at.Range [0, getFxCount() - 1 ). If index is outOfRange,It will be add in the end.
Returns
Returns the inserted audio effect object.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For more information, please refer to Engine Change.

◆ insertFx()

NvsAudioFx com.meicam.sdk.NvsAudioClip.insertFx ( String  fxName,
int  fxIndex 
)
inline

Inserts an audio effect at the specified effect index on the audio clip.

Parameters
fxNameAudio effect name. For information about getting all effects' names, please refer to getAllBuiltinAudioFxNames() or built-in effect name list.
fxIndexaudio effects' index to insert at. Range [0, getFxCount() - 1 ). If index is outOfRange,It will be add in the end.
Returns
Returns the inserted audio effect object.
Warning
This interface will cause the streaming engine state to jump to the engine stop state. For more information, please refer to Engine Change.
See also
appendFx
removeFx
getFxByIndex

◆ removeAllFx()

boolean com.meicam.sdk.NvsAudioClip.removeAllFx ( )
inline

Removes all effects.

Returns
Determines whether the removal is successful. If it returns true, the removal is successful and if it returns false, it fails to remove.
See also
removeFx
Since
2.24.0

◆ removeFx()

boolean com.meicam.sdk.NvsAudioClip.removeFx ( int  fxIndex)
inline

Removes audio effect by index,The subsequent audioFx index moves forward.

Parameters
fxIndexAudio effects' index. Range [0, getFxCount())
Returns
Determines if the audio effect is removed successfully. true means a successfull removal, false means failure.
Warning
This interface causes the streaming engine state to jump to the engine stop state, as described in Engine Changes.
See also
appendFx
insertFx
getFxByIndex

◆ setFadeInDuration()

void com.meicam.sdk.NvsAudioClip.setFadeInDuration ( long  duration)
inline

Sets the fade-in time.

Parameters
durationFade-in duration in microseconds, 0 means no fade-in.Duration must >= 0.
Since
1.16.0
See also
getFadeInDuration

◆ setFadeOutDuration()

void com.meicam.sdk.NvsAudioClip.setFadeOutDuration ( long  duration)
inline

Sets fade-out time.

Parameters
durationFade-out duration in microseconds, 0 means no fade-out.Duration must >= 0.
Since
1.16.0
See also
setFadeOutDuration

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