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

Video clip, description of the video file. More...

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

Public Member Functions

int getVideoType ()
 Gets clip type. More...
 
int getRoleInTheme ()
 Gets the role of the clip in the theme. More...
 
void setPlayInReverse (boolean playInReverse)
 Sets whether the clip is reversed. More...
 
boolean getPlayInReverse ()
 Gets whether the clip is reversed. More...
 
void setExtraVideoRotation (int rotation)
 Sets the video's extra rotation angle. More...
 
int getExtraVideoRotation ()
 Gets the video's extra rotation angle. More...
 
void setSoftWareDecoding (boolean softwareUsed)
 Sets whether to apply software decoding on the video. More...
 
boolean isSoftWareDeocedUsed ()
 Gets whether to apply software decoding on the video. More...
 
void disableAmbiguousCrop (boolean disable)
 Sets whether to disable the ambiguous cropping of the screen on video. More...
 
boolean isAmbiguousCropDisabled ()
 Gets whether to disable the ambiguous cropping of the screen on video. More...
 
void setPanAndScan (float pan, float scan)
 Sets pan and scan. More...
 
NvsPanAndScan getPanAndScan ()
 Gets pan and scan. More...
 
int getSourceBackgroundMode ()
 Gets background mode. More...
 
void setSourceBackgroundMode (int mode)
 Sets background mode. More...
 
int getImageMotionMode ()
 Gets image clip operation mode. More...
 
void setImageMotionMode (int mode)
 Sets image mode of operation. More...
 
boolean getImageMotionAnimationEnabled ()
 Gets image animation status. More...
 
void setImageMotionAnimationEnabled (boolean enabled)
 Sets whether to support image animation. More...
 
RectF getStartROI ()
 Gets the image clip's starting ROI. More...
 
RectF getEndROI ()
 Gets image clip's terminating ROI. More...
 
void setImageMotionROI (RectF startROI, RectF endROI)
 Sets image clip's dynamic move ROI. More...
 
RectF getImageMaskROI ()
 Gets image clip's mask ROI. More...
 
void setImageMaskROI (RectF maskROI)
 Sets image clip‘s mask ROI. More...
 
void setClipWrapMode (int wrapMode)
 Sets the clip's loop mode. More...
 
int getClipWrapMode ()
 Gets video loop mode. More...
 
NvsVideoFx appendBuiltinFx (String fxName)
 Appends built-in effect to clips. More...
 
NvsVideoFx insertBuiltinFx (String fxName, int fxIndex)
 Inserts a built-in effect at the specified effect index on the clip. More...
 
NvsVideoFx appendPackagedFx (String fxPackageId)
 Appends package effect to the clip. More...
 
NvsVideoFx insertPackagedFx (String fxPackageId, int fxIndex)
 Inserts package effect at the specified effect index on the clip. More...
 
NvsVideoFx appendCustomFx (NvsCustomVideoFx.Renderer customVideoFxRender)
 Appends custom video effect to the clip. More...
 
NvsVideoFx insertCustomFx (NvsCustomVideoFx.Renderer customVideoFxRender, int fxIndex)
 Inserts a custom video effect at the specified effect index on the clip. More...
 
NvsVideoFx appendBeautyFx ()
 Adds a beauty effect to the clip. More...
 
NvsVideoFx insertBeautyFx (int fxIndex)
 Inserts a beauty effect at the specified effect index on the clip. More...
 
boolean removeFx (int fxIndex)
 Remove effect by index. More...
 
boolean removeAllFx ()
 Removes all effects. More...
 
NvsVideoFx getFxByIndex (int fxIndex)
 Gets special effect by index. More...
 
- Public Member Functions inherited from com.meicam.sdk.NvsClip
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 VIDEO_CLIP_TYPE_AV = 0
 Audio and video type. More...
 
static final int VIDEO_CLIP_TYPE_IMAGE = 1
 Image type. More...
 
The clip's role in themes.

static final int ROLE_IN_THEME_GENERAL = 0
 General. More...
 
static final int ROLE_IN_THEME_TITLE = 1
 Title. More...
 
static final int ROLE_IN_THEME_TRAILER = 2
 Trailer. More...
 
Clip motion mode

static final int CLIP_MOTIONMODE_LETTERBOX_ZOOMIN = 0
 Zoom in. More...
 
static final int ClIP_MOTIONMODE_LETTERBOX_ZOOMOUT = 1
 Zoom out. More...
 
static final int IMAGE_CLIP_MOTIONMMODE_ROI = 2
 Image clip's ROI(Region Of Interesting) More...
 
Clip loop mode

static final int CLIP_WRAPMODE_REPEAT_LASTFRAME = 0
 First frame. More...
 
static final int ClIP_WRAPMODE_REPEAT_FIRSTFRAME = 1
 Last frame. More...
 
static final int ClIP_WRAPMODE_REPEAT = 2
 
Extra rotation of the video

static final int ClIP_EXTRAVIDEOROTATION_0 = 0
 0 degree More...
 
static final int ClIP_EXTRAVIDEOROTATION_90 = 1
 90 degree More...
 
static final int ClIP_EXTRAVIDEOROTATION_180 = 2
 180 degree More...
 
static final int ClIP_EXTRAVIDEOROTATION_270 = 3
 
Clip background display mode

static final int ClIP_BACKGROUNDMODE_COLOR_SOLID = 0
 Solid color. More...
 
static final int ClIP_BACKGROUNDMODE_BLUR = 1
 
- 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...
 

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

Video clip, description of the video file.

The video clip source can be a video or an image. Each video clip can be modified for its in and out point and playback speed, as well as pan and scan. When editing a video, users can add or insert multiple video effects by the type of effect (built-in effects, wrapped effects, beauty effects). When adding a resource package effect, users have to install it firstly. When installation is successful, users can get the package Id to use, and the built-in effect can be used only by obtaining the effect name.

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

Member Function Documentation

NvsVideoFx com.meicam.sdk.NvsVideoClip.appendBeautyFx ( )
inline

Adds a beauty effect to the clip.

Returns
Returns the added video effect object.
See also
insertBeautyFx
appendPackagedFx
appendBuiltinFx
NvsVideoFx com.meicam.sdk.NvsVideoClip.appendBuiltinFx ( String  fxName)
inline

Appends built-in effect to clips.

Parameters
fxNameThe effect name. To get the video effect name, please refer to getAllBuiltinVideoFxNames() or built-in effect name list.
Returns
Returns the added video effect object.
See also
insertBuiltinFx
appendBeautyFx
appendPackagedFx
NvsVideoFx com.meicam.sdk.NvsVideoClip.appendCustomFx ( NvsCustomVideoFx.Renderer  customVideoFxRender)
inline

Appends custom video effect to the clip.

Parameters
customVideoFxRenderUser-implemented custom video effect renderer interface.
Returns
Returns the added video effect object.
Since
1.7.0
NvsVideoFx com.meicam.sdk.NvsVideoClip.appendPackagedFx ( String  fxPackageId)
inline

Appends package effect to the clip.

Parameters
fxPackageIdEffect resource package ID.
Returns
Returns the added video effect object.
See also
insertPackagedFx
appendBuiltinFx
appendBeautyFx
void com.meicam.sdk.NvsVideoClip.disableAmbiguousCrop ( boolean  disable)
inline

Sets whether to disable the ambiguous cropping of the screen on video.

Parameters
disablewhether to disable or not.
See also
isAmbiguousCropDisabled
int com.meicam.sdk.NvsVideoClip.getClipWrapMode ( )
inline

Gets video loop mode.

Returns
Returns loop mode.
Since
2.2.3
See also
setClipWrapMode
RectF com.meicam.sdk.NvsVideoClip.getEndROI ( )
inline

Gets image clip's terminating ROI.

Returns
Returns a RectF object indicating that the image clip's terminating ROI.
Since
1.1.0
See also
setImageMotionROI
int com.meicam.sdk.NvsVideoClip.getExtraVideoRotation ( )
inline

Gets the video's extra rotation angle.

Returns
Returns the extra rotation angle of the video. Please refer to Video Extra Rotation Angle.
See also
setExtraVideoRotation
NvsVideoFx com.meicam.sdk.NvsVideoClip.getFxByIndex ( int  fxIndex)
inline

Gets special effect by index.

Parameters
fxIndexSpecial effect index, please refer to getFxCount().
Returns
Returns the obtained video effect object.
RectF com.meicam.sdk.NvsVideoClip.getImageMaskROI ( )
inline

Gets image clip's mask ROI.

Returns
Returns a RectF object representing the image clip's mask ROI.
Since
2.2.3
See also
setImageMaskROI
boolean com.meicam.sdk.NvsVideoClip.getImageMotionAnimationEnabled ( )
inline

Gets image animation status.

Returns
Returns a boolean value indicating the state of the image animation. A value of true supports image animation, and false does not support it.
Since
1.1.0
See also
setImageMotionAnimationEnabled
int com.meicam.sdk.NvsVideoClip.getImageMotionMode ( )
inline

Gets image clip operation mode.

Returns
Returns the integer value indicating the mode of operation of the image clip. Please refer to [Fragment Operation Mode].
Since
1.1.0
See also
setImageMotionMode
NvsPanAndScan com.meicam.sdk.NvsVideoClip.getPanAndScan ( )
inline

Gets pan and scan.

Returns
Return the acquired pan and scan object.
See also
setPanAndScan
boolean com.meicam.sdk.NvsVideoClip.getPlayInReverse ( )
inline

Gets whether the clip is reversed.

Returns
Returns whether the clip is reversed.
Since
1.5.0
See also
setPlayInReverse
int com.meicam.sdk.NvsVideoClip.getRoleInTheme ( )
inline

Gets the role of the clip in the theme.

Returns
Returns role of clip in the theme.
int com.meicam.sdk.NvsVideoClip.getSourceBackgroundMode ( )
inline

Gets background mode.

Returns
Returns the obtained background mode object.
See also
setClipBackgroundMode
RectF com.meicam.sdk.NvsVideoClip.getStartROI ( )
inline

Gets the image clip's starting ROI.

Returns
Returns a RectF object representing the starting ROI of the image clip.
Since
1.1.0
See also
setImageMotionROI
int com.meicam.sdk.NvsVideoClip.getVideoType ( )
inline

Gets clip type.

Returns
Returns clip type.
NvsVideoFx com.meicam.sdk.NvsVideoClip.insertBeautyFx ( int  fxIndex)
inline

Inserts a beauty effect at the specified effect index on the clip.

Parameters
fxIndexEffect index to insert at, please refer togetFxCount().
Returns
Returns the inserted video effect object.
See also
appendBeautyFx
insertBuiltinFx
insertPackagedFx
NvsVideoFx com.meicam.sdk.NvsVideoClip.insertBuiltinFx ( String  fxName,
int  fxIndex 
)
inline

Inserts a built-in effect at the specified effect index on the clip.

Parameters
fxNameThe effect name. To get the video effect name, please refer to getAllBuiltinVideoFxNames() or Built-in Effect Name List.
fxIndexEffect index to insert at.
Returns
Returns the inserted video effect object.
See also
appendBuiltinFx
insertPackagedFx
insertBeautyFx
NvsVideoFx com.meicam.sdk.NvsVideoClip.insertCustomFx ( NvsCustomVideoFx.Renderer  customVideoFxRender,
int  fxIndex 
)
inline

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

Parameters
customVideoFxRenderUser-implemented custom video effects renderer interface.
fxIndexEffect index to insert at.
Returns
Returns the inserted video special effect object.
Since
1.7.0
NvsVideoFx com.meicam.sdk.NvsVideoClip.insertPackagedFx ( String  fxPackageId,
int  fxIndex 
)
inline

Inserts package effect at the specified effect index on the clip.

Parameters
fxPackageIdEffect resource package ID.
fxIndexEffect index to insert at, please refer to getFxCount().
Returns
Returns the inserted video effect object.
See also
appendPackagedFx
insertBeautyFx
insertBuiltinFx
boolean com.meicam.sdk.NvsVideoClip.isAmbiguousCropDisabled ( )
inline

Gets whether to disable the ambiguous cropping of the screen on video.

Returns
Returns whether to disable the approximate scale cropping of the screen on video.
See also
disableAmbiguousCrop
boolean com.meicam.sdk.NvsVideoClip.isSoftWareDeocedUsed ( )
inline

Gets whether to apply software decoding on the video.

Returns
Returns whether the obtained video is software decoded.
See also
setSoftWareDecoding
boolean com.meicam.sdk.NvsVideoClip.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
boolean com.meicam.sdk.NvsVideoClip.removeFx ( int  fxIndex)
inline

Remove effect by index.

Parameters
fxIndexSpecial effect index, please refer togetFxCount().
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
removeAllFx
getFxByIndex
void com.meicam.sdk.NvsVideoClip.setClipWrapMode ( int  wrapMode)
inline

Sets the clip's loop mode.

Parameters
wrapModeLoop mode.
Since
2.2.3
See also
getClipWrapMode

< Loop mode is between 0 and 2

void com.meicam.sdk.NvsVideoClip.setExtraVideoRotation ( int  rotation)
inline

Sets the video's extra rotation angle.

Parameters
rotationThe extra rotation angle of the video. Please refer to Video Extra Rotation Angle.
See also
getExtraVideoRotation
void com.meicam.sdk.NvsVideoClip.setImageMaskROI ( RectF  maskROI)
inline

Sets image clip‘s mask ROI.

For details, please refer to Image CLip's ROI Topics.

Parameters
maskROIImage clip's mask ROI.
Since
2.2.3
See also
getStartROI
void com.meicam.sdk.NvsVideoClip.setImageMotionAnimationEnabled ( boolean  enabled)
inline

Sets whether to support image animation.

Parameters
enabledWhether to support image animation. A value of true supports image animation, and false does not.
Since
1.1.0
See also
getImageMotionAnimationEnabled
void com.meicam.sdk.NvsVideoClip.setImageMotionMode ( int  mode)
inline

Sets image mode of operation.

Parameters
modeImage clip mode of operation. Please refer to Fragment Operation Mode.
Since
1.1.0
See also
getImageMotionMode
void com.meicam.sdk.NvsVideoClip.setImageMotionROI ( RectF  startROI,
RectF  endROI 
)
inline

Sets image clip's dynamic move ROI.

For details, please refer to Image Clip's ROI Topics.

Parameters
startROIImage clip's starting ROI.
endROIImage clip's terminating ROI.
Since
1.1.0
See also
getStartROI
getEndROI
void com.meicam.sdk.NvsVideoClip.setPanAndScan ( float  pan,
float  scan 
)
inline

Sets pan and scan.

The pan and scan functions are used to adapt the position and size of the image on the display window. For details, please refer to Pan and Scan topic.

Parameters
panPan
scanScan
See also
getPanAndScan
void com.meicam.sdk.NvsVideoClip.setPlayInReverse ( boolean  playInReverse)
inline

Sets whether the clip is reversed.

Note: Please use the clip reverse playback to ensure that the current video file is a I frame video, otherwise the playback efficiency of the reverse playback is extremely low! Users can use Meishe SDK to record the logo. Uses STREAMING_ENGINE_RECORDING_FLAG_VIDEO_INTRA_FRAME_ONLY to generate a all I frame video file. If the file imported from other files cannot be guaranteed to be a all I frame video and users want to use the reverse function, users can use Meishe transcoding SDK to directly transcode the original video into a reversed file.

Parameters
playInReverseWhether the clip is reversed.
Since
1.5.0
See also
getPlayInReverse
void com.meicam.sdk.NvsVideoClip.setSoftWareDecoding ( boolean  softwareUsed)
inline

Sets whether to apply software decoding on the video.

Parameters
softwareUsedWhether to use software decoder to decode.
See also
isSoftWareDeocedUsed
void com.meicam.sdk.NvsVideoClip.setSourceBackgroundMode ( int  mode)
inline

Sets background mode.

Parameters
modeBackground mode.
See also
getSourceBackgroundMode

Member Data Documentation

final int com.meicam.sdk.NvsVideoClip.ClIP_BACKGROUNDMODE_BLUR = 1
static

Blur

final int com.meicam.sdk.NvsVideoClip.ClIP_BACKGROUNDMODE_COLOR_SOLID = 0
static

Solid color.

final int com.meicam.sdk.NvsVideoClip.ClIP_EXTRAVIDEOROTATION_0 = 0
static

0 degree

final int com.meicam.sdk.NvsVideoClip.ClIP_EXTRAVIDEOROTATION_180 = 2
static

180 degree

final int com.meicam.sdk.NvsVideoClip.ClIP_EXTRAVIDEOROTATION_270 = 3
static

270 degree

final int com.meicam.sdk.NvsVideoClip.ClIP_EXTRAVIDEOROTATION_90 = 1
static

90 degree

final int com.meicam.sdk.NvsVideoClip.CLIP_MOTIONMODE_LETTERBOX_ZOOMIN = 0
static

Zoom in.

final int com.meicam.sdk.NvsVideoClip.ClIP_MOTIONMODE_LETTERBOX_ZOOMOUT = 1
static

Zoom out.

final int com.meicam.sdk.NvsVideoClip.ClIP_WRAPMODE_REPEAT = 2
static

Repeat

final int com.meicam.sdk.NvsVideoClip.ClIP_WRAPMODE_REPEAT_FIRSTFRAME = 1
static

Last frame.

final int com.meicam.sdk.NvsVideoClip.CLIP_WRAPMODE_REPEAT_LASTFRAME = 0
static

First frame.

final int com.meicam.sdk.NvsVideoClip.IMAGE_CLIP_MOTIONMMODE_ROI = 2
static

Image clip's ROI(Region Of Interesting)

final int com.meicam.sdk.NvsVideoClip.ROLE_IN_THEME_GENERAL = 0
static

General.

final int com.meicam.sdk.NvsVideoClip.ROLE_IN_THEME_TITLE = 1
static

Title.

final int com.meicam.sdk.NvsVideoClip.ROLE_IN_THEME_TRAILER = 2
static

Trailer.

final int com.meicam.sdk.NvsVideoClip.VIDEO_CLIP_TYPE_AV = 0
static

Audio and video type.

final int com.meicam.sdk.NvsVideoClip.VIDEO_CLIP_TYPE_IMAGE = 1
static

Image type.


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