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

Clip, specific description of audio and video files. More...

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

Public Member Functions

long getTrimIn ()
 Gets the trim in point of the clip. More...
 
long getTrimOut ()
 Gets the trim out point of the clip. 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 getIndex ()
 Gets the index of the clip on the track. 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...
 
void changeSpeed (double newSpeed)
 Changes the playback speed 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...
 
- 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

clip type

static final int CLIP_TYPE_VIDEO = 0
 video clip type More...
 
static final int CLIP_TYPE_AUDIO = 1
 audio clip type 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

Clip, specific description of audio and video files.

A clip is an entity that accommodates audio and video content. It is a description of video and audio files, and is divided into an audio clip (Audio Clip) and a video clip (Video Clip). It defines the common attributes and behaviors of different types of clips. That is, the derived audio clips and video clips can be modified for your demand. These modifications include trim in and out points, left or right volume channels, playback speed and so on. In the SDK framework, corresponding audio clips and video clips can be added to the track.

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

Member Function Documentation

void com.meicam.sdk.NvsClip.changeSpeed ( double  newSpeed)
inline

Changes the playback speed of the clip.

Parameters
newSpeedNew playback speed.
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
getSpeed
void com.meicam.sdk.NvsClip.changeSpeed ( double  newSpeed,
boolean  keepAudioPitch 
)
inline

Changes the playback speed of the clip.

Parameters
newSpeedNew playback speed.
keepAudioPitchKeep the tone unchanged.
Warning
This interface will cause the streaming engine state to jump to the engine stop state, see Engine Change Feature for details.
See also
getSpeed
Since
1.15.1
long com.meicam.sdk.NvsClip.changeTrimInPoint ( long  newTrimInPoint,
boolean  affectSibling 
)
inline

Modifies the trim in point of the clip.

Parameters
newTrimInPointNew trim in point (in microseconds).
affectSiblingWhether it affects other clips on the same track (true/false).
Returns
Returns the actual reachable trim in point (in microseconds). Note: The actual achievable trim in point is within [0,trimOut - 1].
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
changeTrimOutPoint
getTrimIn
long com.meicam.sdk.NvsClip.changeTrimOutPoint ( long  newTrimOutPoint,
boolean  affectSibling 
)
inline

Modifies the trim out point of the clip.

Parameters
newTrimOutPointNew trim out point (in microseconds).
affectSiblingWhether it affects other clips on the same track (true/false).
Returns
Returns the actual reachable trim out point (in microseconds). Note: The actual achievable trim out point is within [trimIn + 1, clipDuration] and clipDuration is the clip duration.
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
changeTrimInPoint
getTrimOut
String com.meicam.sdk.NvsClip.getFilePath ( )
inline

Gets the clip file path.

Returns
Returns the string of the clip path.
int com.meicam.sdk.NvsClip.getFxCount ( )
inline

Gets the number of effects on the clip. Note: The effect index on the clip starts from 0.

Returns
Returns the number of special effects on the clip.
int com.meicam.sdk.NvsClip.getIndex ( )
inline

Gets the index of the clip on the track.

Returns
Returns the index value of the clip on the track.
long com.meicam.sdk.NvsClip.getInPoint ( )
inline

Gets the in-point of the clip on the timeline.

Returns
Returns the in-point value of the clip on the timeline (in microseconds).
See also
getOutPoint
getTrimIn
long com.meicam.sdk.NvsClip.getOutPoint ( )
inline

Gets the out-point of the clip on the timeline.

Returns
Returns the out-point value (in microseconds) of the clip on the timeline.
See also
getInPoint
getTrimOut
double com.meicam.sdk.NvsClip.getSpeed ( )
inline

Get the playback speed of the clip.

The default value is 1, which means that it plays at normal speed; the value less than 1 means slower playback; the value greater than 1 means faster playback.

Returns
Returns the playback speed of the current clip.
See also
changeSpeed
long com.meicam.sdk.NvsClip.getTrimIn ( )
inline

Gets the trim in point of the clip.

Returns
Returns the trim in point of the clip (in microseconds).
See also
getTrimOut
changeTrimInPoint
getInPoint
long com.meicam.sdk.NvsClip.getTrimOut ( )
inline

Gets the trim out point of the clip.

Returns
Returns the trim out point of the clip (in microseconds).
See also
getTrimIn
changeTrimOutPoint
getOutPoint
int com.meicam.sdk.NvsClip.getType ( )
inline

Gets the clip type (video clip, audio clip).

Returns
Returns the clip type value. The return value is a static int value prefixed by CLIP_TYPE. Two types of clips are included, namely the audio clip type and the video clip type. Please refer to fragment type.
NvsVolume com.meicam.sdk.NvsClip.getVolumeGain ( )
inline

Gets volume.

Returns
Returns the volume object obtained.
See also
getVolumeGain
void com.meicam.sdk.NvsClip.setVolumeGain ( float  leftVolumeGain,
float  rightVolumeGain 
)
inline

Sets the volume.

Parameters
leftVolumeGainLeft channel value, value range [0, 8).
rightVolumeGainRight channel value, value range [0, 8).
See also
getVolumeGain

Member Data Documentation

final int com.meicam.sdk.NvsClip.CLIP_TYPE_AUDIO = 1
static

audio clip type

final int com.meicam.sdk.NvsClip.CLIP_TYPE_VIDEO = 0
static

video clip type


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