MeiCam SDK For Android
1.0.0
|
Timeline is which the entity of editing the scene. More...
Classes | |
class | PlaybackRateControlRegion |
Public Member Functions | |
NvsVideoResolution | getVideoRes () |
Gets video's resolution (image's width, height and aspect ratio). More... | |
NvsAudioResolution | getAudioRes () |
Gets audio's resolution (sampling rate, sampling format and number of channels). More... | |
NvsRational | getVideoFps () |
Gets the framerate of the video. More... | |
long | getDuration () |
Gets timeline's duration. More... | |
NvsVideoTrack | appendVideoTrack () |
Appends video track. More... | |
NvsAudioTrack | appendAudioTrack () |
Appends audio track. More... | |
boolean | removeVideoTrack (int trackIndex) |
Remove video track. More... | |
boolean | removeAudioTrack (int trackIndex) |
Remove audio track. More... | |
int | videoTrackCount () |
Get count of video track. More... | |
int | audioTrackCount () |
Get count of audio track. More... | |
NvsVideoTrack | getVideoTrackByIndex (int trackIndex) |
Gets video track with track index. More... | |
NvsAudioTrack | getAudioTrackByIndex (int trackIndex) |
Gets audio track with track index. More... | |
boolean | changeVideoSize (int videoWidth, int videoHeight) |
Change the timeline video resolution. Remark:If timeline is linked to a surfaceTexture, the surfaceTexture must be detached first, and then timeline video resolution can be changed. After timeline resolution is changed, the SurfaceTexture can be re-attached to timeline. More... | |
void | setCaptionBoundingRectInActualMode (boolean isActualBoundingRect) |
Set the border of the caption to the actual envelope size of the text. More... | |
NvsTimelineCaption | getFirstCaption () |
Get the first caption on the timeline. More... | |
NvsTimelineCaption | getLastCaption () |
Get the last caption on the timeline. More... | |
NvsTimelineCaption | getPrevCaption (NvsTimelineCaption caption) |
Get the previous caption of the current caption on the timeline. More... | |
NvsTimelineCaption | getNextCaption (NvsTimelineCaption caption) |
Get the next caption of the current caption on the timeline. More... | |
List< NvsTimelineCaption > | getCaptionsByTimelinePosition (long timelinePos) |
Get a list of captions based on the position on the timeline. More... | |
NvsTimelineCaption | addCaption (String captionText, long inPoint, long duration, String captionStylePackageId) |
Add a caption on the timeline. More... | |
NvsTimelineCaption | addPanoramicCaption (String captionText, long inPoint, long duration, String captionStylePackageId) |
Add a panorama caption on the timeline. More... | |
NvsTimelineCaption | removeCaption (NvsTimelineCaption caption) |
Remove the caption on the timeline. More... | |
NvsTimelineAnimatedSticker | getFirstAnimatedSticker () |
Get the first animated sticker on the timeline. More... | |
NvsTimelineAnimatedSticker | getLastAnimatedSticker () |
Get the last animated sticker on the timeline. More... | |
NvsTimelineAnimatedSticker | getPrevAnimatedSticker (NvsTimelineAnimatedSticker animatedSticker) |
Get the previous animated sticker of the current animated sticker of the timeline. More... | |
NvsTimelineAnimatedSticker | getNextAnimatedSticker (NvsTimelineAnimatedSticker animatedSticker) |
Get the next animated sticker of the current animated sticker of the timeline. More... | |
List< NvsTimelineAnimatedSticker > | getAnimatedStickersByTimelinePosition (long timelinePos) |
Get an animated sticker list based on the position on the timeline. More... | |
NvsTimelineAnimatedSticker | addAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId) |
Add a animated sticker on the timeline. More... | |
NvsTimelineAnimatedSticker | addPanoramicAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId) |
Add a panorama animation sticker on the timeline. More... | |
NvsTimelineAnimatedSticker | addCustomAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId, String customImagePath) |
Add a custom animated sticker on the timeline. More... | |
NvsTimelineAnimatedSticker | addCustomPanoramicAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId, String customImagePath) |
Add a a custom panorama animated sticker on the timeline. More... | |
NvsTimelineAnimatedSticker | removeAnimatedSticker (NvsTimelineAnimatedSticker animatedSticker) |
Remove an animated sticker on the timeline. More... | |
NvsTimelineVideoFx | getFirstTimelineVideoFx () |
Get the first timeline video effect on the timeline. More... | |
NvsTimelineVideoFx | getLastTimelineVideoFx () |
Get the last timeline video effect on the timeline. More... | |
NvsTimelineVideoFx | getPrevTimelineVideoFx (NvsTimelineVideoFx videoFx) |
Get the previous timeline video effect of a timeline video effect on the timeline. More... | |
NvsTimelineVideoFx | getNextTimelineVideoFx (NvsTimelineVideoFx videoFx) |
Get the next timeline video effect of a timeline video effect on the timeline. More... | |
List< NvsTimelineVideoFx > | getTimelineVideoFxByTimelinePosition (long timelinePos) |
Get a list of timeline video effects based on position on the timeline. More... | |
NvsTimelineVideoFx | addBuiltinTimelineVideoFx (long inPoint, long duration, String videoFxName) |
Add a built-in timeline video effect on the timeline. More... | |
NvsTimelineVideoFx | addPackagedTimelineVideoFx (long inPoint, long duration, String videoFxPackageId) |
Add a timeline video effect in the form of a resource package on the timeline. More... | |
NvsTimelineVideoFx | addCustomTimelineVideoFx (long inPoint, long duration, NvsCustomVideoFx.Renderer customVideoFxRender) |
Add a custom timeline video effect on the timeline. More... | |
NvsTimelineVideoFx | removeTimelineVideoFx (NvsTimelineVideoFx videoFx) |
Remove a timeline video effect from the timeline. More... | |
String | getCurrentThemeId () |
Get the id of the current theme. More... | |
boolean | applyTheme (String themeId) |
Apply a theme to the current timeline (the theme is relative to the entire timeline). More... | |
void | removeCurrentTheme () |
Remove current theme. More... | |
void | setThemeTitleCaptionText (String text) |
Set the caption text for theme title. More... | |
void | setThemeTrailerCaptionText (String text) |
Set the caption text for theme trailer. More... | |
void | setThemeMusicVolumeGain (float leftVolumeGain, float rightVolumeGain) |
Set the volume value for theme music. More... | |
NvsVolume | getThemeMusicVolumeGain () |
Get the volume value for theme music. More... | |
boolean | addWatermark (String watermarkFilePath, int displayWidth, int displayHeight, float opacity, int position, int marginX, int marginY) |
Add watermark. More... | |
void | deleteWatermark () |
Delete watermark which has added. More... | |
boolean | setWatermarkOpacity (float opacity) |
Set watermark opacity. More... | |
boolean | setTimelineEndingLogo (String logoFilePath, int displayWidth, int displayHeight, int centerX, int centerY) |
Set the logo effect at the end of the timeline. More... | |
void | removeTimelineEndingLogo () |
Remove the logo effect at the end of the timeline. More... | |
void | setAudioFadeOutDuration (long duration) |
Sets audio fade out duration. More... | |
long | getAudioFadeOutDuration () |
Gets audio fade out duration. More... | |
void | setPlaybackRateControl (PlaybackRateControlRegion[] playbackRateControlRegions) |
PlaybackRateControlRegion[] | getPlaybackRateControl () |
![]() | |
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 | |
Watermark position | |
static final int | NvsTimelineWatermarkPosition_TopRight = 0 |
Watermark on top-right. More... | |
static final int | NvsTimelineWatermarkPosition_TopLeft = 1 |
Watermark on top-left. More... | |
static final int | NvsTimelineWatermarkPosition_BottomLeft = 2 |
Watermark on bottom-left. S. More... | |
static final int | NvsTimelineWatermarkPosition_BottomRight = 3 |
Additional Inherited Members | |
![]() | |
void | setInternalObject (long internalObject) |
long | getInternalObject () |
![]() | |
long | m_internalObject = 0 |
Timeline is which the entity of editing the scene.
The timeline consists of tracks and can be thought of as a collection of audio and video tracks. The timeline can add or remove multiple video and audio tracks, and the multiple tracks are superimposed and combined. When editing video,users can add captions. themes, animated stickers to make final beautifull videos.Otherwise,User needs to install asset package (theme package, animated stick package, Caption style and timeline effect package) before loading and using them. Each package comes with its unique package ID.For built-in timeline effects, they can be applied only with obtaining their effect name.
|
inline |
Add a animated sticker on the timeline.
inPoint | The in point of the animated sticker on the timeline (in microseconds) |
duration | The duration of the animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
|
inline |
Add a built-in timeline video effect on the timeline.
inPoint | The in point of the timeline video effect on the timeline (in microseconds) |
duration | Duration of the timeline video effect which displayed (in microseconds) |
videoFxName | The video effect name |
|
inline |
Add a caption on the timeline.
captionText | Text of caption |
inPoint | The in point of the caption on the timeline (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id |
|
inline |
Add a custom animated sticker on the timeline.
inPoint | The in point of custom animated sticker on the timeline (in microseconds) |
duration | The duration of custom animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
customImagePath | Path of custom animated sticker image |
|
inline |
Add a a custom panorama animated sticker on the timeline.
inPoint | The in point of custom animated sticker on the timeline (in microseconds) |
duration | The duration of custom animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
customImagePath | Path of custom animated sticker image |
|
inline |
Add a custom timeline video effect on the timeline.
inPoint | The in point of the timeline video effect on the timeline (in microseconds) |
duration | Duration of the timeline video effect which displayed (in microseconds) |
customVideoFxRender | User-implemented custom video effects renderer interface |
|
inline |
Add a timeline video effect in the form of a resource package on the timeline.
inPoint | The in point of the timeline video effect on the timeline (in microseconds) |
duration | Duration of the timeline video effect which displayed (in microseconds) |
videoFxPackageId | The Id of resource package |
|
inline |
Add a panorama animation sticker on the timeline.
inPoint | The in point of the animated sticker on the timeline (in microseconds) |
duration | The duration of the animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
|
inline |
Add a panorama caption on the timeline.
captionText | Text of caption |
inPoint | The in point of the caption on the timeline (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id |
|
inline |
Add watermark.
watermarkFilePath | The path of the watermark file must be a .PNG or .JPG file. |
displayWidth | The width of the watermark displayed in the timeline. If 0, the width of the image file is used. |
displayHeight | The height of the watermark displayed in the timeline. If 0, the height of the image file is used. |
opacity | Watermark opacity, the range is [0,1] |
position | The position of the watermark, please refer to NvsTimelineWatermarkPosition |
marginX | The margin of the watermark in the horizontal direction |
marginY | The margin of the watermark in the vertical direction |
|
inline |
Appends audio track.
|
inline |
Appends video track.
|
inline |
Apply a theme to the current timeline (the theme is relative to the entire timeline).
For themes, there may be a title or a trailer, or both of them, or none. When applying a theme with a title or a trailer or both of them are treated as a clip, resulting in an increase in the count of clips. When using this interface, be careful to determine the count of clips.
themeId | Id of theme package |
|
inline |
Get count of audio track.
|
inline |
Change the timeline video resolution.
Remark:If timeline is linked to a surfaceTexture, the surfaceTexture must be detached first, and then timeline video resolution can be changed. After timeline resolution is changed, the SurfaceTexture can be re-attached to timeline.
videoWidth | New video width |
videoHeight | New video height |
|
inline |
Delete watermark which has added.
|
inline |
Get an animated sticker list based on the position on the timeline.
timelinePos | Position on the timeline (in microseconds) |
|
inline |
Gets audio fade out duration.
|
inline |
Gets audio's resolution (sampling rate, sampling format and number of channels).
|
inline |
Gets audio track with track index.
trackIndex | Index of audio track |
|
inline |
Get a list of captions based on the position on the timeline.
timelinePos | The position on the timeline(in micro-second) |
|
inline |
Get the id of the current theme.
|
inline |
Gets timeline's duration.
|
inline |
Get the first animated sticker on the timeline.
|
inline |
Get the first caption on the timeline.
|
inline |
Get the first timeline video effect on the timeline.
|
inline |
Get the last animated sticker on the timeline.
|
inline |
Get the last caption on the timeline.
|
inline |
Get the last timeline video effect on the timeline.
|
inline |
Get the next animated sticker of the current animated sticker of the timeline.
animatedSticker | the current NvsTimelineAnimatedSticker obejct |
|
inline |
Get the next caption of the current caption on the timeline.
caption | The current caption on the timeline |
|
inline |
Get the next timeline video effect of a timeline video effect on the timeline.
videoFx | The NvsTimelineVideoFx object |
|
inline |
|
inline |
Get the previous animated sticker of the current animated sticker of the timeline.
animatedSticker | the current NvsTimelineAnimatedSticker obejct |
|
inline |
Get the previous caption of the current caption on the timeline.
caption | The current caption on the timeline |
|
inline |
Get the previous timeline video effect of a timeline video effect on the timeline.
videoFx | The NvsTimelineVideoFx object |
|
inline |
Get the volume value for theme music.
|
inline |
Get a list of timeline video effects based on position on the timeline.
timelinePos | The position on the timeline (in microseconds) |
|
inline |
Gets the framerate of the video.
|
inline |
Gets video's resolution (image's width, height and aspect ratio).
|
inline |
Gets video track with track index.
trackIndex | Index of video track |
|
inline |
Remove an animated sticker on the timeline.
animatedSticker | The NvsTimelineAnimatedSticker object which will be removed |
|
inline |
Remove audio track.
trackIndex | Index of audio track |
|
inline |
Remove the caption on the timeline.
caption | timeline caption object which removed |
|
inline |
Remove current theme.
|
inline |
Remove the logo effect at the end of the timeline.
|
inline |
Remove a timeline video effect from the timeline.
videoFx | The NvsTimelineVideoFx object which will be removed |
|
inline |
Remove video track.
trackIndex | Index of video track |
|
inline |
Sets audio fade out duration.
duration | duration of fade out(in microseconds), if 0 ,there's then no fade out. |
|
inline |
Set the border of the caption to the actual envelope size of the text.
isActualBoundingRect | Whether to display the actual envelope size |
|
inline |
|
inline |
Set the volume value for theme music.
leftVolumeGain | Left channel |
rightVolumeGain | Right channel |
|
inline |
Set the caption text for theme title.
text | The caption text |
|
inline |
Set the caption text for theme trailer.
text | 字幕文本 |
|
inline |
Set the logo effect at the end of the timeline.
logoFilePath | The path of the logo file must be a .PNG or .JPG file. |
displayWidth | The width of the logo displayed in the timeline. If 0, the width of the image file is used. |
displayHeight | The height of the logo displayed in the timeline. If 0, the height of the image file is used. |
centerX | logo中心点在X方向的位置 |
centerY | logo中心点在Y方向的位置 |
|
inline |
Set watermark opacity.
opacity | The opacity, the range is [0,1] |
|
inline |
Get count of video track.
|
static |
Watermark on bottom-left. S.
|
static |
Watermark on bottom-right.
|
static |
Watermark on top-left.
|
static |
Watermark on top-right.