MeiCam SDK For Android
3.14.0
|
Streaming context. More...
Classes | |
interface | AudioOutputCallback |
Callback interface for audio output. More... | |
interface | CapturedAudioCallback |
Callback interface for captured audio samples. More... | |
interface | CaptureDeviceCallback |
Capture device callback interface. More... | |
class | CaptureDeviceCapability |
Description of capturing device's capabilities. More... | |
interface | CapturedPictureCallback |
Gets callback interface of the captured preview. More... | |
interface | CapturedVideoFrameGrabberCallback |
Gets callback interface of the captured preview video frame. More... | |
interface | CaptureRecordingDurationCallback |
Callback interface for recording duration. More... | |
interface | CaptureRecordingFrameReachedCallback |
Callback interface for first recording frame reached. More... | |
interface | CaptureRecordingStartedCallback |
Callback interface for starting recording. More... | |
interface | CompileCallback |
Callback interface for timeline's compiling file. More... | |
interface | CompileCallback2 |
The second callback interface for timeline file compilation. More... | |
interface | CompileCallback3 |
The third callback interface for timeline file compilation. More... | |
interface | CompileFloatProgressCallback |
interface | CompileSliceCallback |
The callback interface for timeline slice file compilation. More... | |
interface | DebugLogCallback |
Debug log callback interface. More... | |
interface | HardwareErrorCallback |
Hardware error callback interface. deprecated, please use MediaErrorCallback instead. More... | |
interface | ImageGrabberCallback |
The callback interface of the grabbed image from timeline. More... | |
interface | ImageGrabberCallback2 |
The second callback interface of the grabbed image from timeline. More... | |
interface | MediaErrorCallback |
Media error callback interface. More... | |
class | NvsCapturedAudioSampleInfo |
Audio sample info from capturing. More... | |
class | NvsMediaError |
Media error info from callback. More... | |
interface | PlaybackCallback |
Callback interface for timeline playback. More... | |
interface | PlaybackCallback2 |
The second callback interface for timeline playback. More... | |
interface | PlaybackDelayCallback |
Callback interface for playback delay. More... | |
interface | PlaybackExceptionCallback |
Callback interface for timeline playback exception. More... | |
class | SdkVersion |
The version information of Meishe SDK. More... | |
interface | SeekingCallback |
Callback interface for timeline search. More... | |
interface | StreamingEngineCallback |
Callback interface for streaming engine. More... | |
class | templateFootageInfo |
information of template footage More... | |
interface | TimelineTimestampCallback |
Callback interface for timeline timestamp (note: Do not use this interface unless neccessary). More... | |
interface | VideoFrameReceiver |
Hardware error callback interface. More... | |
interface | WebCallback |
Public Member Functions | |
boolean | isSdkAuthorised () |
Checks if sdk is authorized. More... | |
int | getGLMaxTextureSize () |
Get GL max texture size. More... | |
boolean | preloadEffectResources () |
Preload effect resources. More... | |
float | detectEngineRenderFramePerSecond () |
Get engine render fps, only valid after calling StartCapturePreview or PlaybackTimeline. More... | |
SdkVersion | getSdkVersion () |
Obtains Meishe SDK's version information. More... | |
NvsAssetPackageManager | getAssetPackageManager () |
Gets resource package manager. More... | |
void | setCaptureDeviceCallback (CaptureDeviceCallback cb) |
Sets callback interface for capturing device. More... | |
void | setCapturedVideoFrameGrabberCallback (CapturedVideoFrameGrabberCallback cb) |
Sets callback interface for getting capture preview frame. More... | |
void | setCapturedPictureCallback (CapturedPictureCallback cb) |
Sets callback interface for getting capture preview frame. More... | |
void | setCaptureRecordingStartedCallback (CaptureRecordingStartedCallback cb) |
Sets callback interface for recording started. More... | |
void | setCaptureRecordingFrameReachedCallback (CaptureRecordingFrameReachedCallback cb) |
Sets callback interface for recording frame reached. More... | |
void | setCaptureRecordingDurationCallback (CaptureRecordingDurationCallback cb) |
Sets callback interface of recording duration. More... | |
void | setPlaybackCallback (PlaybackCallback cb) |
Sets the callback interface for timeline playback. More... | |
void | setCompileCallback (CompileCallback cb) |
Sets callback interface for timeline file compilation. More... | |
void | setStreamingEngineCallback (StreamingEngineCallback cb) |
Sets callback interface for streaming engine. More... | |
void | setTimelineTimestampCallback (TimelineTimestampCallback cb) |
Sets callback interface for timeline timestamp. More... | |
void | setCompileCallback2 (CompileCallback2 cb) |
Sets the second callback interface for timeline file compilation. More... | |
void | setCompileCallback3 (CompileCallback3 cb) |
Sets the third callback interface for timeline file compilation. More... | |
void | setCompileSliceCallback (CompileSliceCallback cb) |
Sets the callback interface for timeline slice file compilation. More... | |
void | setCompileFloatProgressCallback (CompileFloatProgressCallback cb) |
void | setPlaybackCallback2 (PlaybackCallback2 cb) |
Sets second callback interface for timeline playback. More... | |
void | setWebCallback (WebCallback cb) |
Streaming context web-based application callbacks. More... | |
void | setPlaybackDelayCallback (PlaybackDelayCallback cb) |
Sets callback interface for delay playback. More... | |
void | setPlaybackExceptionCallback (PlaybackExceptionCallback cb) |
Sets callback interface for playback exception. More... | |
void | setSeekingCallback (SeekingCallback cb) |
Sets the timeline search callback interface. More... | |
void | setHardwareErrorCallback (HardwareErrorCallback cb) |
Sets callback interface for hardware error. More... | |
void | setMediaErrorCallback (MediaErrorCallback cb) |
Sets callback interface for media error. More... | |
void | setAudioOutputCallback (AudioOutputCallback cb) |
Sets callback interface of audio output. More... | |
void | setCapturedAudioCallback (CapturedAudioCallback cb) |
Sets callback interface of audio output. More... | |
NvsAVFileInfo | getAVFileInfo (String avFilePath) |
Gets detailed information of the audio/video file. More... | |
NvsAVFileInfo | getAVFileInfo (String avFilePath, int extraFlag) |
Gets detailed information of the audio/video file. More... | |
NvsAVFileInfo | getAVFileInfoWithError (String avFilePath, int extraFlag, StringBuilder errorString) |
Gets detailed information of the audio/video file. More... | |
int | detectVideoFileKeyframeInterval (String videoFilePath) |
Detects video file's I-Frame interval. More... | |
boolean | setDefaultThemeEndingLogoImageFilePath (String logoImageFilePath) |
Sets default theme's ending logo. More... | |
String | getDefaultThemeEndingLogoImageFilePath () |
Gets the file path of the default ending logo. More... | |
String | registerFontByFilePath (String fontFilePath) |
Gets font file's fontFamily. More... | |
List< NvsFontInfo > | getFontInfoByFilePath (String fontFilePath) |
Gets font file's font information. More... | |
boolean | setThemeEndingEnabled (boolean enable) |
Sets whether to display theme ending's special effects. More... | |
int | getEngineHDRCaps () |
Get HDR capability. More... | |
NvsTimeline | createTimeline (NvsVideoResolution videoEditRes, NvsRational videoFps, NvsAudioResolution audioEditRes) |
Creates timeline. More... | |
NvsTimeline | createTimeline (NvsVideoResolution videoEditRes, NvsRational videoFps, NvsAudioResolution audioEditRes, int flags) |
Creates timeline. More... | |
NvsTimeline | createTimeline (String templateId, List< templateFootageInfo > templateFootages) |
Creates timeline. More... | |
NvsTimeline | createTimeline (String templateId, List< templateFootageInfo > templateFootages, int flags) |
Creates timeline. More... | |
NvsTimeline | createTimeline (String templateId, List< templateFootageInfo > templateFootages, int flags, NvsRational videoFps, NvsAudioResolution audioResolution) |
Creates timeline. More... | |
boolean | removeTimeline (NvsTimeline timeline) |
Removes timeline. More... | |
boolean | exportTemplateInfo (String templateUuid, NvsTimeline timeline, int requestedAspectRatio) |
Export template information. More... | |
boolean | generateTemplatePackage (String templateUuid, String innerAssetDir, String templateOutputDir) |
Generate template asset package. More... | |
void | setTemplateCustomResourceDir (String templateUuid, String customResourceDir) |
set templates/project custom resource folders More... | |
boolean | exportProjectInfo (String projectUuid, NvsTimeline timeline, int requestedAspectRatio) |
Export project information. More... | |
boolean | generateProjectPackage (String projectUuid, String innerAssetDir, String projectOutputDir) |
Generate project asset package. More... | |
NvsTimeline | loadProject (String projectId, String resourceDir, int flags) |
Load project. More... | |
int | getStreamingEngineState () |
Gets streaming engine's state. More... | |
long | getTimelineCurrentPosition (NvsTimeline timeline) |
Gets the current positon of the timeline (in microseconds) More... | |
boolean | compileTimeline (NvsTimeline timeline, long startTime, long endTime, String outputFilePath, int videoResolutionGrade, int videoBitrateGrade, int flags) |
Compiles timeline into a file. More... | |
boolean | compileTimeline (NvsTimeline timeline, long startTime, long endTime, String outputFilePath, int videoResolutionGrade, int videoBitrateGrade, Hashtable< String, Object > compileConfigurations, int flags) |
Compiles timeline into a file. More... | |
boolean | pauseCompiling () |
Pause compiling timeline. More... | |
boolean | resumeCompiling () |
Resume compiling timeline. More... | |
boolean | isCompilingPaused () |
Check if compiling timeline is paused. More... | |
void | setCustomCompileVideoHeight (int videoHeight) |
Sets the customized height for video. More... | |
int | getCustomCompileVideoHeight () |
Gets the customized video height. More... | |
boolean | compilePassthroughTimeline (NvsTimeline timeline, String outputFilePath, Hashtable< String, Object > compileConfigurations, int flags) |
Compile passthrough the video clips on video track 0 in the timeline into a file without processing filter, multi track and nested timeline. If there are photos, it will fail. More... | |
boolean | connectTimelineWithLiveWindow (NvsTimeline timeline, NvsLiveWindow liveWindow) |
Connects timeline with the LiveWindow. More... | |
boolean | connectTimelineWithLiveWindowExt (NvsTimeline timeline, NvsLiveWindowExt liveWindow) |
Connects timeline with the LiveWindow (based on TextureView) More... | |
boolean | connectTimelineWithSurfaceTexture (NvsTimeline timeline, SurfaceTexture outputSurfaceTexture) |
Connects timeline with a SurfaceTexture, of which the rendering outcome of the timeline will be output to this SurfaceTexture. More... | |
boolean | connectTimelineWithSurface (NvsTimeline timeline, Surface outputSurface) |
Connects timeline with a Surface, of which the rendering outcome of the timeline will be output to this Surface. More... | |
boolean | connectTimelineWithSurfaceTexture (NvsTimeline timeline, SurfaceTexture outputSurfaceTexture, NvsRational proxyScale) |
Connects timeline with SurfaceTexture and set the proxy scale. The timeline's rendering outcome will be output to this SurfaceTexture. More... | |
boolean | connectTimelineWithVideoFrameReceiver (NvsTimeline timeline, VideoFrameReceiver receiver, NvsRational proxyScale, int flags) |
Connects timeline with video frame receiver and set the proxy scale. More... | |
void | setTimelineScaleForSeek (NvsTimeline timeline, double secondsPerPixel) |
Set scale in seconds per pixel of a timeline to detect scrubbing. You should do this before each seek operation that sets the (STREAMING_ENGINE_SEEK_FLAG_ALLOW_FAST_SCRUBBING) flag. More... | |
boolean | seekTimeline (NvsTimeline timeline, long timestamp, int videoSizeMode, int flags) |
Seeking the frame at a specific timestamp. More... | |
boolean | seekTimeline (NvsTimeline timeline, long timestamp, NvsRational proxyScale, int flags) |
Seeking the frame at a specific timestamp. More... | |
Bitmap | grabImageFromTimeline (NvsTimeline timeline, long timestamp, NvsRational proxyScale) |
Gets the specific frame in timeline with a specific timestamp. For details please refer to The video frame retriever . More... | |
Bitmap | grabImageFromTimeline (NvsTimeline timeline, long timestamp, NvsRational proxyScale, int flags) |
Gets the specific frame in timeline with a specific timestamp. For details please refer to The video frame retriever. More... | |
void | setImageGrabberCallback (ImageGrabberCallback callback) |
Sets callback interface for timeline image grabber. More... | |
void | setImageGrabberCallback2 (ImageGrabberCallback2 callback) |
Sets second callback interface for timeline image grabber. More... | |
boolean | grabImageFromTimelineAsync (NvsTimeline timeline, long timestamp, NvsRational proxyScale, int flags) |
Gets the specific frame in timeline with a specific timestamp. For details please refer to The video frame retriever. This function is an internal asynchronous call. It is necessary to ensure that SeekTimeline () will not be invoked before getting the image. If the function that calls SeekTimeline after calling this function may not get the callback of the image, it can call Stop after this function to ensure that the Grab image can be executed successfully. More... | |
boolean | playbackTimeline (NvsTimeline timeline, long startTime, long endTime, int videoSizeMode, boolean preload, int flags) |
Timeline playback. More... | |
boolean | playbackTimeline (NvsTimeline timeline, long startTime, long endTime, NvsRational proxyScale, boolean preload, int flags) |
Timeline playback. More... | |
boolean | pausePlayback () |
Pause playback timeline. More... | |
boolean | resumePlayback () |
Resume playback timeline. More... | |
boolean | isPlaybackPaused () |
Check if playback timeline is paused. More... | |
void | stop () |
Stops the engine. More... | |
void | stop (int flags) |
Stops the engine. More... | |
void | clearCachedResources (boolean asynchronous) |
Clears cached resources. More... | |
void | clearCachedResources (boolean asynchronous, int flags) |
Clears cached resources. More... | |
int | getCaptureDeviceCount () |
Number of capture device. More... | |
boolean | isCaptureDeviceBackFacing (int captureDeviceIndex) |
Whether it's a rear capturing device. More... | |
CaptureDeviceCapability | getCaptureDeviceCapability (int captureDeviceIndex) |
Gets the capability description object of the capture device. More... | |
boolean | checkDontSetCameraParamOnRecordingWithSystemRecorder () |
Checks if the camera's parameters cannot be set when recording with system recorder. More... | |
boolean | connectCapturePreviewWithLiveWindow (NvsLiveWindow liveWindow) |
Connects the captured preview with live window. More... | |
boolean | connectCapturePreviewWithLiveWindowExt (NvsLiveWindowExt liveWindow) |
Connects the captured preview with live windowļ¼based on TextureViewļ¼ More... | |
boolean | connectCapturePreviewWithSurfaceTexture (SurfaceTexture outputSurfaceTexture) |
Connects a capture preview with a SurfaceTexture object. The capture preview's rendering result will be output to this SurfaceTexture object. More... | |
boolean | connectCapturePreviewWithSurface (Surface outputSurface) |
Connects a capture preview with a Surface object. The capture preview's rendering result will be output to this Surface object. More... | |
void | setUserWatermarkForCapture (String watermarkFilePath, int displayWidth, int displayHeight, float opacity, int position, int marginX, int marginY) |
Adds a custom watermark for capturing video. More... | |
void | removeUserWatermarkForCapture () |
Removes custom watermark which added for capturing video. More... | |
boolean | startCapturePreview (int captureDeviceIndex, int videoResGrade, int flags, NvsRational aspectRatio) |
Starts the capture preview. More... | |
boolean | startCapturePreviewWithSpecialSize (int captureDeviceIndex, int videoResGrade, int flags, NvsSize previewSize) |
Starts the capture preview. More... | |
boolean | startBufferCapturePreview (int width, int heidht, NvsRational fps, int rotation, boolean flipHorizontally) |
Starts the capture preview with inputting buffer mode. More... | |
boolean | startDualBufferCapturePreview (SurfaceTexture surfaceTexture, int surfaceTextureWidth, int surfaceTextureHeight, int surfaceTextureRotation, int cpuBufferWidth, int cpuBufferHeight, boolean cpuBufferFlipHorizontally, int cpuBufferRotation, NvsRational fps, int flags) |
Starts dual buffer mode for capture preview, one input is from SurfaceTexture and another is from cpu buffer. Two input must be of the same size when rotated to positive direction. More... | |
boolean | sendBufferToCapturePreview (byte[] data, long streamTime) |
Transfers the input buffer to capture preivew. More... | |
boolean | sendBufferToCapturePreview (byte[] data, long streamTime, int flags) |
Sends buffer to the capture preview. More... | |
NvsSize | getCapturePreviewVideoSize (int captureDeviceIndex) |
Gets the capture preview resolution. More... | |
NvsColor | sampleColorFromCapturedVideoFrame (RectF sampleRect) |
Samples the capture device's video frame. More... | |
void | startAutoFocus (RectF focusRect) |
Starts autofocus. More... | |
void | cancelAutoFocus () |
Cancels the ongoing autofocus. More... | |
void | StartContinuousFocus () |
Starts continuous focus. More... | |
void | setAutoExposureRect (RectF exposureRect) |
Set the auto exposure detection area. More... | |
void | setZoom (int zoom) |
Sets the zoom value. More... | |
int | getZoom () |
Gets the zoom factor. More... | |
void | toggleFlash (boolean flashOn) |
Sets which the flash light is on/off. More... | |
boolean | isFlashOn () |
get state of the flash light. More... | |
int | getVideoStabilization () |
Gets the current videoās stabilization flag. More... | |
void | setVideoStabilization (int flags) |
Sets video stabilization. More... | |
void | setExposureCompensation (int exposureCompensation) |
Set exposure compensation. More... | |
int | getExposureCompensation () |
Gets exposure compensation. More... | |
NvsCaptureVideoFx | appendBuiltinCaptureVideoFx (String videoFxName) |
Appends a built-in capture video effect. More... | |
NvsCaptureVideoFx | insertBuiltinCaptureVideoFx (String videoFxName, int insertPosition) |
Inserts a built-in video capture effect. More... | |
NvsCaptureVideoFx | appendPackagedCaptureVideoFx (String videoFxPackageId) |
Appends a package capture effectx. More... | |
NvsCaptureVideoFx | insertPackagedCaptureVideoFx (String videoFxPackageId, int insertPosition) |
Inserts a package capture effect. More... | |
NvsCaptureVideoFx | appendCustomCaptureVideoFx (NvsCustomVideoFx.Renderer customVideoFxRender) |
Appends a custom capture video effect. More... | |
NvsCaptureVideoFx | insertCustomCaptureVideoFx (NvsCustomVideoFx.Renderer customVideoFxRender, int insertPosition) |
Inserts a custom capture video effect. More... | |
NvsCaptureVideoFx | appendBeautyCaptureVideoFx () |
Appends a beauty effect. More... | |
NvsCaptureVideoFx | insertBeautyCaptureVideoFx (int insertPosition) |
Inserts a skin beauty video effect. More... | |
boolean | removeCaptureVideoFx (int captureVideoFxIndex) |
Removes a certain capture video effect indicated by its index. More... | |
void | removeAllCaptureVideoFx () |
Removes all capture video effects. More... | |
int | getCaptureVideoFxCount () |
Gets the count of video effects. More... | |
NvsCaptureVideoFx | getCaptureVideoFxByIndex (int captureVideoFxIndex) |
Gets a certain capture video effect. More... | |
NvsCaptureAudioFx | appendBuiltinCaptureAudioFx (String audioFxName) |
Appends a built-in capture audio effect. More... | |
NvsCaptureAudioFx | insertBuiltinCaptureAudioFx (String audioFxName, int insertPosition) |
Inserts a built-in audio capture effect. More... | |
boolean | removeCaptureAudioFx (int captureAudioFxIndex) |
Removes a certain capture audio effect indicated by its index. More... | |
void | removeAllCaptureAudioFx () |
Removes all capture audio effects. More... | |
int | getCaptureAudioFxCount () |
Gets the count of audio effects. More... | |
NvsCaptureAudioFx | getCaptureAudioFxByIndex (int captureAudioFxIndex) |
Gets a certain capture audio effect. More... | |
NvsCaptureAnimatedSticker | appendCaptureAnimatedSticker (long offsetTime, long duration, String animatedStickerPackageId) |
Appends a animated sticker. More... | |
NvsCaptureAnimatedSticker | insertCaptureAnimatedSticker (long offsetTime, long duration, String animatedStickerPackageId, int insertPosition) |
Appends a animated sticker. More... | |
NvsCaptureAnimatedSticker | addCustomCaptureAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId, String customImagePath) |
Add a custom animated sticker on capture. More... | |
NvsCaptureAnimatedSticker | insertCustomCaptureAnimatedSticker (long offsetTime, long duration, String animatedStickerPackageId, String customImagePath, int insertPosition) |
Insert a animated sticker. More... | |
boolean | removeCaptureAnimatedSticker (int captureAnimagedStickerIndex) |
Removes a certain capture animated sticker indicated by its index. More... | |
void | removeAllCaptureAnimatedSticker () |
Removes all capture animated sticker. More... | |
int | getCaptureAnimatedStickerCount () |
Gets the count of capture animated sticker. More... | |
NvsCaptureAnimatedSticker | getCaptureAnimatedStickerByIndex (int captureStikcerIndex) |
Gets a certain capture animated sticker. More... | |
NvsCaptureCompoundCaption | appendCaptureCompoundCaption (long offsetTime, long duration, String compoundCaptionPackageId) |
Appends a compound caption. More... | |
NvsCaptureCompoundCaption | insertCaptureCompoundCaption (long offsetTime, long duration, String compoundCaptionPackageId, int insertPosition) |
Insert a compound caption. More... | |
boolean | removeCaptureCompoundCaption (int captureCompoundCaptionIndex) |
Removes a certain capture compound caption indicated by its index. More... | |
void | removeAllCaptureCompoundCaption () |
Removes all capture compound caption. More... | |
int | getCaptureCompoundCaptionCount () |
Gets the count of capture compound caption. More... | |
NvsCaptureCompoundCaption | getCaptureCompoundCaptionByIndex (int captureCaptionIndex) |
Gets a certain capture compound caption. More... | |
NvsCaptureCaption | appendCaptureCaption (String captionText, long offsetTime, long duration, String captionStylePackageId) |
Appends a caption. More... | |
NvsCaptureCaption | insertCaptureCaption (String captionText, long offsetTime, long duration, String captionStylePackageId, int insertPosition) |
Insert a caption. More... | |
NvsCaptureCaption | appendCaptureModularCaption (String captionText, long offsetTime, long duration) |
Appends a modular caption. More... | |
NvsCaptureCaption | insertCaptureModularCaption (String captionText, long offsetTime, long duration, int insertPosition) |
Insert a modular caption. More... | |
boolean | removeCaptureCaption (int captureCaptionIndex) |
Removes a certain capture caption indicated by its index. More... | |
void | removeAllCaptureCaption () |
Removes all capture caption. More... | |
int | getCaptureCaptionCount () |
Gets the count of capture caption. More... | |
NvsCaptureCaption | getCaptureCaptionByIndex (int captureCaptionIndex) |
Gets a certain capture caption. More... | |
boolean | applyCaptureScene (String captureSceneId) |
Apply a capture scene resource package to the capture device. More... | |
boolean | applyCaptureScene (String captureSceneId, NvsCaptureSceneInfo info) |
Apply a capture scene resource package to the capture device. More... | |
String | getCurrentCaptureSceneId () |
Gets the ID of the current capture scene resource package. More... | |
void | removeCurrentCaptureScene () |
Removes the current capture scene. More... | |
void | setCompileConfigurations (Hashtable< String, Object > compileConfigurations) |
Sets the timeline configurations, which stay valid once set. More... | |
Hashtable< String, Object > | getCompileConfigurations () |
Gets configurations for compiling timeline. More... | |
void | setCompileVideoBitrateMultiplier (float compileVideoBitrateMultiplier) |
Set the rate multiplier for compiling video. More... | |
float | getCompileVideoBitrateMultiplier () |
Get the rate multiplier for compiling video. More... | |
void | setRecordVideoBitrateMultiplier (float recordVideoBitrateMultiplier) |
Set the rate multiplier for recording video. More... | |
float | getRecordVideoBitrateMultiplier () |
Get the rate multiplier for recording video. More... | |
boolean | startRecording (String outputFilePath) |
Starts recording. Please refer to Method of Recording Video. More... | |
boolean | startRecording (String outputFilePath, int flags) |
Starts recording. Please refer to Method of Recording Video. More... | |
boolean | startRecording (String outputFilePath, int flags, Hashtable< String, Object > recordConfigurations) |
Starts recording. Please refer to Method of Recording Video. More... | |
void | stopRecording () |
Stops recording. More... | |
void | stopRecording (boolean synchronous) |
Stops recording. More... | |
void | setAudioSampleInfoForCallback (NvsCapturedAudioSampleInfo info) |
Set audio sample information for callback of capturing. More... | |
boolean | pauseRecording () |
Pause to record. Resuming recording after a pause will output the recorded video to the same file. Note: Recording can only be paused without using the built-in recorder! More... | |
boolean | resumeRecording () |
Continues to record. Continuing recording will output the recorded video to the same media file, to which the recording before suspend outputs contents. More... | |
boolean | isRecordingPaused () |
Checks if the recording has been paused. More... | |
boolean | takePicture (int flags) |
take a picture with the max resolution of camera which matches the preview resolution best More... | |
void | toggleFlashMode (int mode) |
Sets the flash mode. More... | |
int | getFlashMode () |
get state of the flash light. More... | |
List< String > | getAllBuiltinVideoFxNames () |
Gets the list of all built-in video effect names. More... | |
List< String > | getAllBuiltinAudioFxNames () |
Gets the list of all built-in audio effect names. More... | |
List< String > | getAllBuiltinCaptureAudioFxNames () |
Gets the list of all built-in capture audio effect names. More... | |
List< String > | getAllBuiltinVideoTransitionNames () |
Gets the list of all built-in video transitionsā names. More... | |
List< String > | getAllBuiltinCaptureVideoFxNames () |
Gets the list of all built-in capture video effectsā names. More... | |
String | getBeautyVideoFxName () |
Gets the name of beauty effect. More... | |
String | getDefaultVideoTransitionName () |
Gets the default video transitionās name. More... | |
void | setDefaultAudioTransitionName (String audioTransitionName) |
Sets the default audio transitionās name. More... | |
NvsFxDescription | getVideoFxDescription (String fxName) |
Gets the description of a video effect. More... | |
NvsFxDescription | getAudioFxDescription (String fxName) |
Gets the description of an audio effect. More... | |
NvsVideoFrameRetriever | createVideoFrameRetriever (String videoFilePath) |
Creates an object of video frame retriever. More... | |
NvsVideoFrameRetriever | createVideoFrameRetriever (String videoFilePath, int flags) |
Creates an object of video frame retriever. More... | |
void | setDefaultCaptionFade (boolean fade) |
Sets whether default caption mode is fade in and fade out. More... | |
boolean | isDefaultCaptionFade () |
gets whether default caption mode is fade in and fade out. More... | |
void | setColorGainForSDRToHDR (float gain) |
Sets the color gain during SDR to HDR conversion. More... | |
float | getColorGainForSDRToHDR () |
gets the color gain during SDR to HDR conversion. More... | |
long | calcDurationAfterCurvesVariableSpeed (String curvesString) |
calc the duration after use curves variable speed.noteļ¼ the origin duration is the curves's last endpoint.x-first endpoint.x More... | |
void | setAudioOutputDeviceVolume (float volume) |
set volume to audio output device. More... | |
NvsStreamingContext | createAuxiliaryStreamingContext (int flags) |
Creates an object of auxiliary streaming context. More... | |
void | destoryAuxiliaryStreamingContext (NvsStreamingContext auxContext) |
destory auxiliary streaming context. More... | |
boolean | isBlackFrame (Bitmap bitmap) |
Determining whether the incoming bitmap is a black image, and judging by the mean value and variance of the image pixels. More... | |
void | SetDefaultImageClipDuration (long defaultImageClipDuration) |
Sets the default image clip duration. More... | |
boolean | isAndroidCameraPreferDualBufferAR () |
Get Android camera device tend to use dual buffer model to render AR. More... | |
int | getDeviceGpuLevel () |
Get Android camera device gpu power level. More... | |
int | getDeviceCpuLevel () |
Get Android camera device cpu power level. More... | |
boolean | getAECEnabled () |
Get whether AEC(Acoustic Echo Cancellation) is enabled. More... | |
void | setAECEnabled (boolean enable) |
Set whether to enable AEC(Acoustic Echo Cancellation). More... | |
Static Public Member Functions | |
static NvsStreamingContext | init (Context ctx, String sdkLicenseFilePath, int flags) |
Initializes streaming context instance. More... | |
static NvsStreamingContext | init (Activity mainActivity, String sdkLicenseFilePath, int flags) |
Initializes the instance of streaming context object. for more please refer to (4k video editing). More... | |
static NvsStreamingContext | init (Activity mainActivity, String sdkLicenseFilePath) |
Initializes an instance of streaming context object. More... | |
static void | close () |
Destroys the streaming context object instance. note: it can be created again after destruction. More... | |
static NvsStreamingContext | getInstance () |
Gets the instance of streaming context object (only can use this after initialization) More... | |
static void | openMainThreadChecker (boolean enable) |
Open main thread checker or not. More... | |
static boolean | initHumanDetection (Context ctx, String modelFilePath, String licenseFilePath, int features) |
Initializes human detection. Only once needed. More... | |
static boolean | initHumanDetection (Context ctx, String modelFilePath, String licenseFilePath, int features, Hashtable< String, Object > options) |
Initializes human detection. Only once needed. More... | |
static boolean | initHumanDetectionExt (Context ctx, String modelFilePath, String licenseFilePath, int features) |
Human detection initialization extension. Must be called after calling initHumanDetection. More... | |
static boolean | initHumanDetectionExt (Context ctx, String modelFilePath, String licenseFilePath, int features, Hashtable< String, Object > options) |
Human detection initialization extension. Must be called after calling initHumanDetection. More... | |
static boolean | setupHumanDetectionData (int dataType, String dataFilePath) |
Initializes human detection data pack. More... | |
static void | closeHumanDetection () |
Turns off the human detection mechanism. More... | |
static int | hasARModule () |
Checks if current SDK has an AR module. More... | |
static NvsAVFileInfo | getAVInfoFromFile (String avFilePath, int extraFlag) |
Gets detailed information of the audio/video file. More... | |
Static Public Attributes | |
Streaming context flags | |
static final int | STREAMING_CONTEXT_FLAG_SUPPORT_4K_EDIT = 1 |
Supports 4K video editting. More... | |
static final int | STREAMING_CONTEXT_FLAG_COMPACT_MEMORY_MODE = 2 |
Minimizes the memory occupation. More... | |
static final int | STREAMING_CONTEXT_FLAG_SUPPORT_8K_EDIT = 4 |
Supports 8K edittingting(only for pictures) More... | |
static final int | STREAMING_CONTEXT_FLAG_NO_HARDWARE_VIDEO_READER = 8 |
Disable hardware decoding. More... | |
static final int | STREAMING_CONTEXT_FLAG_ASYNC_ENGINE_STATE = 16 |
Switches engine states asynchronously to reduce main thread's jam. More... | |
static final int | STREAMING_CONTEXT_VIDEO_DECODER_WITHOUT_SURFACE_TEXTURE = 32 |
Decoding not using the SurfaceTexture. More... | |
static final int | STREAMING_CONTEXT_FLAG_ASYNC_INITIALIZED = 64 |
Streaming Context is initialized asynchronously. More... | |
static final int | STREAMING_CONTEXT_FLAG_SUPPORT_16K_EDIT = 128 |
Supports 16K editting(only for pictures) More... | |
static final int | STREAMING_CONTEXT_FLAG_USE_SYSTEM_IMAGE_READER = 512 |
Use system image reader. More... | |
static final int | STREAMING_CONTEXT_FLAG_ENABLE_MAX_CACHE_CAPTION_LIMIT = 1024 |
Enable max cache cont limit of caption. More... | |
static final int | STREAMING_CONTEXT_FLAG_DISABLE_CAPTURE = 2048 |
Disable capture. More... | |
static final int | STREAMING_CONTEXT_FLAG_PLAYBACK_DROP_FRAME_MODE = 4096 |
Drop frame mode in playback timeline (abandon) More... | |
static final int | STREAMING_CONTEXT_FLAG_NEED_GIF_MOTION = 8192 |
GIF file use motion mode. More... | |
static final int | STREAMING_CONTEXT_FLAG_ENABLE_HDR_DISPLAY_WHEN_SUPPORTED = 65536 |
Turn on HDR display mode, if the device supports. More... | |
static final int | STREAMING_CONTEXT_FLAG_INTERRUPT_STOP_FOR_INTERNAL_STOP = 262144 |
Interrupt stop is used for all internal stop, such as stop between seek state and playback state. More... | |
static final int | STREAMING_CONTEXT_FLAG_USE_FIXED_DEFAULT_CAPTION_CONTEXT_RESOLUTION = 4194304 |
Create default caption context with 1280 * 720 resolution. More... | |
static final int | STREAMING_CONTEXT_FLAG_DISABLE_ANDROID_CAMERA2 = 8388608 |
Disable camera2 used. More... | |
Clear cache flags | |
static final int | CLEAR_CACHE_FLAG_STREAMING_ENGINE = 1 |
Cache of streaming engine. More... | |
static final int | CLEAR_CACHE_FLAG_ICON_ENGINE = 2 |
Cache of icon engine. More... | |
static final int | CLEAR_CACHE_FLAG_WAVEFORM_ENGINE = 4 |
Cache of waveform engine. More... | |
static final int | CLEAR_CACHE_FLAG_AVFILE_INFO = 8 |
Cache of avfile infors. More... | |
static final int | CLEAR_CACHE_FLAG_AVFILE_KEYFRAME_INFO = 16 |
Cache of video's key frame infos. More... | |
static final int | CLEAR_CACHE_FLAG_CAPTION_FONT_INFO = 32 |
Cache of font infos. More... | |
Video frame receiver flags | |
static final int | VIDEO_FRAME_RECEIVER_FLAG_FORCE_RGBA_FORMAT = 1 |
Force RGBA pixel format on output buffer. More... | |
Streaming engine states | |
static final int | STREAMING_ENGINE_STATE_STOPPED = 0 |
Engine stopped. More... | |
static final int | STREAMING_ENGINE_STATE_CAPTUREPREVIEW = 1 |
Capture preview. More... | |
static final int | STREAMING_ENGINE_STATE_CAPTURERECORDING = 2 |
Capture recording. More... | |
static final int | STREAMING_ENGINE_STATE_PLAYBACK = 3 |
Playback. More... | |
static final int | STREAMING_ENGINE_STATE_SEEKING = 4 |
Seeking. More... | |
static final int | STREAMING_ENGINE_STATE_COMPILE = 5 |
Compiling file. More... | |
Video capture resolution level | |
static final int | VIDEO_CAPTURE_RESOLUTION_GRADE_LOW = 0 |
Low resolution for video capture. More... | |
static final int | VIDEO_CAPTURE_RESOLUTION_GRADE_MEDIUM = 1 |
Medium resolution for video capture. More... | |
static final int | VIDEO_CAPTURE_RESOLUTION_GRADE_HIGH = 2 |
High resolution for video capture. More... | |
static final int | VIDEO_CAPTURE_RESOLUTION_GRADE_SUPER_HIGH = 3 |
Super high resolution for video capture. More... | |
static final int | VIDEO_CAPTURE_RESOLUTION_GRADE_EXTREMELY_HIGH = 4 |
Extremely high resolution for video capture. More... | |
Video compile resolution level | |
static final int | COMPILE_VIDEO_RESOLUTION_GRADE_360 = 0 |
Compiles the video with height 360(the width of video is determined by height and the selected width when creating timeline, caculated by resolution ratio) More... | |
static final int | COMPILE_VIDEO_RESOLUTION_GRADE_480 = 1 |
Compiles the video with height 480. More... | |
static final int | COMPILE_VIDEO_RESOLUTION_GRADE_720 = 2 |
Compiles the video with height 720. More... | |
static final int | COMPILE_VIDEO_RESOLUTION_GRADE_1080 = 3 |
Compiles the video with height 1080. More... | |
static final int | COMPILE_VIDEO_RESOLUTION_GRADE_2160 = 4 |
Compiles the video with height 2160. More... | |
static final int | COMPILE_VIDEO_RESOLUTION_GRADE_CUSTOM = 256 |
Customizes the height of video compiledļ¼must be used with the API named setCustomCompileVideoHeight. More... | |
The bitrate of video compiled | |
static final int | COMPILE_BITRATE_GRADE_LOW = 0 |
Low bitrate for video compiled. More... | |
static final int | COMPILE_BITRATE_GRADE_MEDIUM = 1 |
Medium bitrate for video compiled. More... | |
static final int | COMPILE_BITRATE_GRADE_HIGH = 2 |
High bitrate for video compiled. More... | |
The encode profile of video compiled | |
static final int | COMPILE_ENCODE_PROFILE_BASELINE = 1 |
base line profile for video encode More... | |
static final int | COMPILE_ENCODE_PROFILE_MAIN = 2 |
main profile for video encode More... | |
static final int | COMPILE_ENCODE_PROFILE_HIGH = 3 |
High profile for video encode. More... | |
Configurations for recording | |
static final String | RECORD_BITRATE = "bitrate" |
Record bitrate in bpsļ¼type: int, such as 3000000 for 3M biterate. More... | |
static final String | RECORD_GOP_SIZE = "gopsize" |
Record GOP size, type: int, default is 30. More... | |
static final String | VIDEO_ENCODEC_NAME = "video encoder name" |
Assigned video encoding format, hevc(h.256) is supported, default is h.264. More... | |
static final String | ENCORDER_COLOR_TRANSFER = "encorder color transfer" |
Set color transfer for HDR to encode, curve: string, default is "none", can support "st2084" and "hlg",. More... | |
Configurations for creating the timeline | |
static final String | COMPILE_BITRATE = "bitrate" |
Compile bitrate in bpsļ¼type: int, such as 3000000 for 3M biterate. More... | |
static final String | COMPILE_GOP_SIZE = "gopsize" |
Compile GOP size, type: int, default is 30. More... | |
static final String | COMPILE_AUDIO_BITRATE = "audio bitrate" |
Compile audio bitrate in bps, type: int, such as 128000 for 128k bitrate. More... | |
static final String | COMPILE_LOSSLESS_AUDIO = "lossless audio" |
Whether to compile lossless audio, type: booleanļ¼default is false. More... | |
static final String | COMPILE_OPTIMIZE_FOR_NETWORK_USE = "optimize-for-network-use" |
Whether to prepose the index table, type: booleanļ¼default is false. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_PRESET = "software encorder preset" |
Preset parameters for software encoder, type: string, default is "faster", can support "ultrafast"ļ¼"superfast"ļ¼"veryfast"ļ¼"faster"ļ¼ "fast"ļ¼"medium"ļ¼"slow"ļ¼"slower"ļ¼"veryslow"ļ¼"placebo". More... | |
static final String | COMPILE_SOFTWARE_ENCODER_CRF = "software encorder crf" |
Preset crf parameters for software encoder, type: int, range is [1, 99], less is betterļ¼default is 23. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_CRF_BITRATE_MAX = "software encorder crf bitrate max" |
Preset maximum bitrate for software encoder in crf mode, type: int. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_MODE = "software encorder mode" |
Software encoder mode, type: string, support āabrāćācrfāļ¼default is crf. More... | |
static final String | COMPILE_VIDEO_ENCODER_NAME = "video encoder name" |
Assigned video encoding format, "hevc"(h.265), "vp8"(The audio encoder must be Vorbis and the file format must be WebM) is supported, default is "h.264". More... | |
static final String | COMPILE_AUDIO_ENCODER_NAME = "audio encoder name" |
Assigned audio encoding format, "amr-wb", "vorbis" and "mp3" are supported, default is "aac". More... | |
static final String | COMPILE_CREATION_TIME = "creation time" |
Set creation time for this file. Foramt:"YYYY-MM-DDTHH:MM:SS",eg:2010-12-24T12:00:00(use location time) More... | |
static final String | COMPILE_LOCATION = "location" |
Set location for this file. eg:17.641347+160.931648. More... | |
static final String | COMPILE_USE_OPERATING_RATE = "use operating rate" |
Whether to use operating rate, type: boolean. More... | |
static final String | COMPILE_FPS = "fps" |
frames per second when compiling, type: NvsRational More... | |
static final String | COMPILE_VIDEO_ENCODER_PROFILE = "encorder profile" |
Assigned video encoding profile, type: int, values are 0 means none, 1 means baseline, 2 means main, 3 means high. More... | |
static final String | COMPILE_VIDEO_ENCODER_LEVEL = "encorder level" |
Assigned video encoding level, type: int, Please refer to andorid CodecProfileLevel. More... | |
static final String | COMPILE_VIDEO_HDR_COLOR_TRANSFER = "encorder color transfer" |
Set color transfer for HDR to encode, curve: string, default is "none", can support "st2084" and "hlg", and "hdr10plus",. More... | |
static final String | COMPILE_VIDEO_ENABLE_BREAKPOINT_CONTINUATION = "enable breakpoint continuation" |
Set whether enable breakpoint continuation. More... | |
static final String | COMPILE_VIDEO_CACHE_FILE_PATH = "cache file path" |
Breakpoint continuation cache file path. More... | |
static final String | COMPILE_VIDEO_CACHE_FILE_DURATION = "cache file duration" |
Breakpoint continuation cache file durationļ¼in microseconds. The minimum duration is 1,000,000 microseconds. The default value is 10,000,000 microseconds. More... | |
static final String | COMPILE_VIDEO_CACHE_FILE_SIZE = "cache file size" |
Breakpoint continuation cache file size. The minimum size is 1,000,000 bytes. The default value is 0. More... | |
static final String | COMPILE_VIDEO_ENCODER_SUPPORT_ALPHA_CHANNEL = "alpha channel supported" |
Alpah channel is supported. Now, only VP8 format is supported. More... | |
static final String | COMPILE_VIDEO_ENCODER_GIF_STATS_MODE = "gif stats mode" |
Set the statistical mode for GIF export. Currently, it supports diff, single, and defaults to single mode. If set to diff mode, it is best to export GIF for no more than 10 seconds. In this mode, memory requirements are relatively high. More... | |
static final String | COMPILE_METADATADESCRIPTION = "metadata description" |
sets the metadata description of the video files More... | |
static final String | COMPILE_VIDEO_BITRATE_MODE = "bitrate mode" |
Compile bitrate mode, Currently supported "cbr" and "vbr". More... | |
static final String | COMPILE_USE_LESS_CPU_CONFIG = "use less cpu config" |
Whether to use this config, type: boolean. More... | |
static final String | COMPILE_AUDIO_SAMPLE_RATE = "audio sample rate" |
Set the audio sampling rate, currently supporting a minimum of 16K and a maximum of 128K. More... | |
static final String | COMPILE_AUDIO_CHANNELS_MODE = "audio channels mode" |
Set up audio channels, currently supporting "mixtomono", with default and timeline settings consistent. More... | |
static final String | COMPILE_FILE_META_DATA = "file metadata" |
Set meta data, for example:"creation-time=xxxxx;location=17.641347+160.931648;". More... | |
Error flags for capture device | |
static final int | CAPTURE_DEVICE_ERROR_UNKNOWN = 1 |
Unknown error with the capturing device. More... | |
static final int | CAPTURE_DEVICE_ERROR_SERVER_DIED = 2 |
Capture device's error, the server died. More... | |
static final int | CAPTURE_DEVICE_ERROR_FAIL_TO_START = 3 |
Capture device's error, the server died. More... | |
static final int | CAPTURE_DEVICE_ERROR_FAIL_TO_CONNECT = 4 |
Size mode for preview | |
static final int | VIDEO_PREVIEW_SIZEMODE_FULLSIZE = 0 |
Full-screen preview mode. More... | |
static final int | VIDEO_PREVIEW_SIZEMODE_LIVEWINDOW_SIZE = 1 |
Livewindow size preview mode. More... | |
Video capture flag | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_GRAB_CAPTURED_VIDEO_FRAME = 1 |
Grabs frame from captured video (turnning on this flag would affect performance, turn on only when neccessary) More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER = 4 |
Not using the system built-in recorder to record. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_STRICT_PREVIEW_VIDEO_SIZE = 8 |
Resticts the preview video's size to system's built-in preview video size. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_DONT_CAPTURE_AUDIO = 16 |
Does not record audio. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_CAPTURE_BUDDY_HOST_VIDEO_FRAME = 32 |
Records buddy video frame, used to detect face. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_FACE_ACTION_WITH_PARTICLE = 256 |
Uses face action to control particle special effects. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_LOW_PIPELINE_SIZE = 512 |
Decreases the size of pipeline when engine is capturing. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_DISABLE_FLIP_FOR_FRONT_CAMERA = 2048 |
Disable flip of front camera. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_INPUT_ASPECT_RATIO_USED = 4096 |
Capture preview size aspect ratio use user input. More... | |
static final int | STREAMING_ENGINE_CAPTURE_FLAG_ENABLE_TAKE_PICTURE = 8192 |
Enable takc picture. More... | |
Video anti-shake mode | |
static final int | VIDEO_STABILIZATION_MODE_OFF = 0 |
Turns off the video anti-shake mode. More... | |
static final int | VIDEO_STABILIZATION_MODE_AUTO = 1 |
Sets on/off of the video stabilization mode to auto. More... | |
static final int | VIDEO_STABILIZATION_MODE_STANDARD = 2 |
Standard mode for video anti-shake mode. More... | |
static final int | VIDEO_STABILIZATION_MODE_SUPER = 3 |
Anti-shake movie mode. More... | |
Recording flags | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_VIDEO_INTRA_FRAME_ONLY = 2 |
Records files that only include I-Frame. (Note: only works when using with STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER) More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_DISABLE_HARDWARE_ENCODER = 4 |
Records without hardware encoder. More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_SOFTWARE_VIDEO_INTRA_FRAME_ONLY_FAST_STOP = 8 |
Fast stop when recording I-Frame-only video with software encoder, this could result in a discard of video frame. More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_ONLY_RECORD_VIDEO = 16 |
Only records video streams to file, all audio streams would not be recorded. More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_IGNORE_VIDEO_ROTATION = 32 |
Video recorded is not rotated according to the capture device's orientation. (Note: only workds with STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER) More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_DONT_USE_INPUT_SURFACE = 64 |
Does not use input surface. More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_DISABLE_MEDIA_MUXER = 128 |
disable MediaMuxer More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_RECORDING_WITHOUT_FX = 256 |
recording without fx, Remarkļ¼it has only effects when using the flags of STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER More... | |
static final int | STREAMING_ENGINE_RECORDING_FLAG_FLIP_HORIZONTALLY = 512 |
Flip horizontally input video frame. More... | |
Take picture flags | |
static final int | CAMERA_FLASH_MODE_OFF = 1 |
Turns off flash. More... | |
static final int | CAMERA_FLASH_MODE_ON = 2 |
Turns On flash. More... | |
static final int | CAMERA_FLASH_MODE_AUTO = 4 |
Turns On flash to auto. More... | |
static final int | CAMERA_FLASH_MODE_TORCH = 8 |
Turns On torch. More... | |
Engine seek flag | |
static final int | STREAMING_ENGINE_SEEK_FLAG_SHOW_CAPTION_POSTER = 2 |
Shows the entire caption effects. More... | |
static final int | STREAMING_ENGINE_SEEK_FLAG_SHOW_ANIMATED_STICKER_POSTER = 4 |
Shows the entire animated sticker effects. More... | |
static final int | STREAMING_ENGINE_SEEK_FLAG_BUDDY_HOST_VIDEO_FRAME = 16 |
buddy video frame in host, used to detect face More... | |
static final int | STREAMING_ENGINE_SEEK_FLAG_NOT_CONNECT_TO_LIVEWINDOW = 128 |
Seek can be done without connecting to the LiveWindow. More... | |
static final int | STREAMING_ENGINE_SEEK_FLAG_BUDDY_ORIGIN_VIDEO_FRAME = 256 |
buddy video frame in host after decoding, used to detect face More... | |
static final int | STREAMING_ENGINE_SEEK_FLAG_DONT_DOWNLOAD_BUDDY_BUFFER_FOR_TIMELINE_EFFECT = 1024 |
Flag for detecting AR texture on timeline disable downloaded. More... | |
static final int | STREAMING_ENGINE_SEEK_FLAG_ALLOW_FAST_SCRUBBING = 2048 |
Flag for faster scrubbing at the expense of some accuracy. More... | |
Engine playback flag | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_LOW_PIPELINE_SIZE = 8 |
Decreases the pipeline size of playback engine. More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_DISABLE_FIXED_PREROLL_TIME = 16 |
Decreases the first frame lag of playback engine. More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_BUDDY_HOST_VIDEO_FRAME = 32 |
buddy video frame in host, used to detect face More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_DISABLE_PRELOADER_ON_SOURCE = 64 |
disable preloader on video source More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_AUTO_CACHE_ALL_CAF_FRAMES = 128 |
Cache all frames of caf file. More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_SPEED_COMP_MODE = 512 |
Playback with speed compensation. More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_BUDDY_ORIGIN_VIDEO_FRAME = 2048 |
buddy video frame in host after decoding, used to detect face More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_VARIABLE_FRAME_RATE_ENABLE = 4096 |
Enable variable frame rate playback, and the playback frame rate will change with the video frame rate. More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_DISABLE_DROP_FRAME_MODE = 16384 |
Disable the frame dropping mode for playback. If this flag is not added, the SDK will ensure continuous audio playback. If the video rendering is complex and so on, it will use the frame dropping mode to ensure video and audio synchronization. More... | |
static final int | STREAMING_ENGINE_PLAYBACK_FLAG_DONT_DOWNLOAD_BUDDY_BUFFER_FOR_TIMELINE_EFFECT = 1 << 17 |
Flag for detecting AR texture on timeline disable downloaded. More... | |
Engine compile flag | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_DISABLE_HARDWARE_ENCODER = 1 |
Disables the hardware encoder. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_DONT_USE_INPUT_SURFACE = 2 |
Not using input surface. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_ONLY_VIDEO = 4 |
Generate file only with video stream. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_ONLY_AUDIO = 8 |
Generate file only with audio stream. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_DISABLE_MEDIA_MUXER = 16 |
disable MediaMuxer More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_BUDDY_HOST_VIDEO_FRAME = 32 |
buddy video frame in host, used to detect face More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_DISABLE_PRELOADER_ON_SOURCE = 64 |
disable preloader on video source More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_TRUNCATE_AUDIO_STREAM = 128 |
Truncat audio stream make sure no longer than the length of the video. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_DISABLE_ALIGN_VIDEO_SIZE = 256 |
static final int | STREAMING_ENGINE_COMPILE_FLAG_USE_SOFTWARE_AUDIO_ENCODER = 1024 |
Software audio encoder used. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_IGNORE_TIMELINE_VIDEO_SIZE = 2048 |
The resolution of output video can be over timeline's resolution. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_LOW_PIPELINE_SIZE = 4096 |
Use low pipeline size to decrease CPU/GPU usage during compilation. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_BUDDY_ORIGIN_VIDEO_FRAME = 8192 |
buddy video frame in host after decoding, used to detect face More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_VARIABLE_FRAME_RATE_ENABLE = 16384 |
Enable variable frame rate export and the exported frame rate will change with the video frame rate. More... | |
static final int | STREAMING_ENGINE_COMPILE_FLAG_DONT_DOWNLOAD_BUDDY_BUFFER_FOR_TIMELINE_EFFECT = 1 << 15 |
Flag for detecting AR texture on timeline disable downloaded. More... | |
Engine stop flag | |
static final int | STREAMING_ENGINE_STOP_FLAG_FORCE_STOP_COMPILATION = 1 |
Forces stop of compilation, resulting compiled file incomplete. More... | |
static final int | STREAMING_ENGINE_STOP_FLAG_ASYNC = 2 |
Stops the engine asynchronously to avoid blocking main thread. More... | |
static final int | STREAMING_ENGINE_INTERRUPT_STOP = 4 |
Interrupting the decoding thread without waiting for the decoding to complete and stopping quickly will result in the final picture may be incorrect. More... | |
Engine playback exception type | |
static final int | STREAMING_ENGINE_PLAYBACK_EXCEPTION_TYPE_MEDIA_FILE_ERROR = 0 |
Media file error. More... | |
Hardware error type | |
static final int | STREAMING_ENGINE_HARDWARE_ERROR_TYPE_VIDEO_ENCODER_SETUP_ERROR = 0 |
static final int | STREAMING_ENGINE_HARDWARE_ERROR_TYPE_VIDEO_ENCODING_ERROR = 1 |
static final int | STREAMING_ENGINE_HARDWARE_ERROR_TYPE_VIDEO_DECODER_SETUP_ERROR = 2 |
static final int | STREAMING_ENGINE_HARDWARE_ERROR_TYPE_VIDEO_DECODING_ERROR = 3 |
Media error type | |
static final int | STREAMING_ENGINE_MEDIA_ERROR_TYPE_UNKNOWN_ERROR = -1 |
static final int | STREAMING_ENGINE_MEDIA_ERROR_TYPE_VIDEO_ENCODER_SETUP_ERROR = 0 |
static final int | STREAMING_ENGINE_MEDIA_ERROR_TYPE_VIDEO_ENCODING_ERROR = 1 |
static final int | STREAMING_ENGINE_MEDIA_ERROR_TYPE_VIDEO_DECODER_SETUP_ERROR = 2 |
static final int | STREAMING_ENGINE_MEDIA_ERROR_TYPE_VIDEO_DECODING_ERROR = 3 |
compile error type | |
static final int | COMPILE_ERROR_TYPE_NO_ERROR = 0 |
static final int | COMPILE_ERROR_TYPE_CANCELATION = 1 |
static final int | COMPILE_ERROR_TYPE_VIDEO_ENCODER_SETUP_ERROR = 2 |
static final int | COMPILE_ERROR_TYPE_VIDEO_ENCODING_ERROR = 3 |
static final int | COMPILE_ERROR_TYPE_VIDEO_DECODING_ERROR = 4 |
static final int | COMPILE_ERROR_TYPE_MUXING_ERROR = 5 |
Rotation angle of input buffer image | |
static final int | BUFFER_IMAGE_ROTATION_0 = 0 |
static final int | BUFFER_IMAGE_ROTATION_90 = 1 |
static final int | BUFFER_IMAGE_ROTATION_180 = 2 |
static final int | BUFFER_IMAGE_ROTATION_270 = 3 |
Human detection features | |
static final int | HUMAN_DETECTION_FEATURE_FACE_LANDMARK = 1 |
Landmarks on human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ACTION = 2 |
Actions of human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_AVATAR_EXPRESSION = 4 |
Avatar Expressions of human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_VIDEO_MODE = 8 |
Video detection mode. More... | |
static final int | HUMAN_DETECTION_FEATURE_IMAGE_MODE = 16 |
Image detection mode. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEMI_IMAGE_MODE = 32768 |
Semi-image detection mode. More... | |
static final int | HUMAN_DETECTION_FEATURE_MULTI_THREAD = 32 |
Multi thread detection. More... | |
static final int | HUMAN_DETECTION_FEATURE_SINGLE_THREAD = 64 |
Single thread detection. More... | |
static final int | HUMAN_DETECTION_FEATURE_EXTRA = 128 |
Extra features of human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEGMENTATION_BACKGROUND = 256 |
Background segmentation. More... | |
static final int | HUMAN_DETECTION_FEATURE_HAND_LANDMARK = 512 |
Hand landmarks. More... | |
static final int | HUMAN_DETECTION_FEATURE_HAND_ACTION = 1024 |
Hand actions. More... | |
static final int | HUMAN_DETECTION_FEATURE_HAND_BONE = 2048 |
Bone landmarks of hand. More... | |
static final int | HUMAN_DETECTION_FEATURE_EYEBALL_LANDMARK = 4096 |
Eyeball landmarks. More... | |
static final int | HUMAN_DETECTION_FEATURE_MULTI_DETECT = 8192 |
Multiple detect, say multiple rois detection. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEGMENTATION_SKY = 16384 |
Sky segmentation. More... | |
static final int | HUMAN_DETECTION_FEATURE_SEGMENTATION_HALF_BODY = 65536 |
Half body segmentation. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ATTR = 131072 |
Base face attributes. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ATTR_SHAPE = 262144 |
Human detection options | |
static final String | HUMAN_DETECTION_OPTIONS_FACE_DETECT_THREAD_NUM = "Face Detect Thread Num" |
Face detect thread number. More... | |
static final String | HUMAN_DETECTION_OPTIONS_FACE_LANDMARK_THREAD_NUM = "Face Landmark Thread Num" |
Face landmark thread number. More... | |
static final String | HUMAN_DETECTION_OPTIONS_FACE_TRACK_THREAD_NUM = "Face Track Thread Num" |
Face track thread number. More... | |
static final String | HUMAN_DETECTION_OPTIONS_SKY_SEGMENTATION_THREAD_NUM = "Sky Segmentation Thread Num" |
Type of human detection data pack | |
static final int | HUMAN_DETECTION_DATA_TYPE_FAKE_FACE = 0 |
Fake face data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_MAKEUP = 1 |
Makeup data pack type (deprecated) More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_SKIN_COLOR = 2 |
Skin color data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_PE106 = 3 |
PE 106 data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_PE240 = 4 |
PE 240 data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_CUSTOM_AVATAR = 5 |
Custom avatar data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_MAKEUP2 = 6 |
Makeup2 data pack type (deprecated, replaced by HUMAN_DETECTION_DATA_TYPE_FACE_COMMON) More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_FACE_COMMON = 7 |
Face common data pack type. More... | |
static final int | HUMAN_DETECTION_DATA_TYPE_ADVANCED_BEAUTY = 8 |
Advanced beauty data pack type. More... | |
Engine sends buffer flag | |
static final int | STREAMING_ENGINE_SEND_BUFFER_FLAG_ONLY_FOR_GRAB = 1 |
static final int | STREAMING_ENGINE_SEND_BUFFER_FLAG_ONLY_FOR_BUDDY = 2 |
Data only used for handeling buddy video captured's frame content. More... | |
Speical flags when capturing video and audio information | |
static final int | AV_FILEINFO_EXTRA_NULL = 0 |
static final int | AV_FILEINFO_EXTRA_PIXELFORMAT = 1 |
static final int | AV_FILEINFO_EXTRA_VIDEO_CODEC_ID = 2 |
static final int | AV_FILEINFO_EXTRA_INFO = AV_FILEINFO_EXTRA_PIXELFORMAT |
Aspect ratio supported by the resource package | |
static final int | ASSET_PACKAGE_ASPECT_RATIO_16v9 = 1 |
static final int | ASSET_PACKAGE_ASPECT_RATIO_1v1 = 2 |
static final int | ASSET_PACKAGE_ASPECT_RATIO_9v16 = 4 |
static final int | ASSET_PACKAGE_ASPECT_RATIO_4v3 = 8 |
static final int | ASSET_PACKAGE_ASPECT_RATIO_3v4 = 16 |
static final int | ASSET_PACKAGE_ASPECT_RATIO_18v9 = 32 |
static final int | ASSET_PACKAGE_ASPECT_RATIO_9v18 = 64 |
Create timeline flag | |
static final int | CREATE_TIMELINE_FLAG_LONGEST_DURATION_CONSIDER_ALL_TRACKS = 1 |
timeline's longest duration consider all tracks More... | |
static final int | CREATE_TIMELINE_FLAG_SYANC_AUDIO_VIDEO_TRANS_ON_VIDEO_TRACK = 2 |
Sync audio transition and video transiton on video track. More... | |
static final int | CREATE_TIMELINE_FLAG_USE_MIPMAP = 4 |
Use mipmap anti-aliasing. More... | |
static final int | CREATE_TIMELINE_FLAG_VARIANT_IMAGE_SIZE = 8 |
Automatically adapt timeline resolution when add images. More... | |
static final int | CREATE_TIMELINE_FLAG_DONT_ADD_DEFAULT_VIDEO_TRANSITION = 16 |
Do not add a default video transition. More... | |
static final int | CREATE_TIMELINE_FLAG_ORPHAN = 128 |
Orphan timeline flag, destroy the timeline after its parent timeline destroyed. More... | |
static final int | CREATE_TIMELINE_FLAG_TIMELINE_SIZE_USED_IN_VARIANT_SIZE_MODE = 256 |
Forced use of timeline resolution in automatically adapt timeline resolution model. More... | |
static final int | CREATE_TIMELINE_FLAG_OUTPUT_USE_TIMELINE_RESOLUTION = 1024 |
Output use timeline's audio resolution. More... | |
static final int | CREATE_TIMELINE_FLAG_ORIGINAL_SIZE_FOR_RAW_FILTER = 2048 |
Flag for Raw filter input uses the original size of the file. More... | |
HDR capability flags | |
static final int | HDR_CAPABILITY_FLAG_SUPPORTED_BY_IMPORTER = 1 |
Support importing HDR video. More... | |
static final int | HDR_CAPABILITY_FLAG_SUPPORTED_BY_EDITING = 2 |
Editing Support HDR. More... | |
static final int | HDR_CAPABILITY_FLAG_SUPPORTED_BY_EXPORTER = 4 |
Support exporting HDR video. More... | |
static final int | HDR_CAPABILITY_FLAG_SUPPORTED_BY_LIVEWINDOW = 8 |
Livewindow support HDR. More... | |
device power levelļ¼cpu and gpu | |
static final int | DEVICE_POWER_LEVEL_UNKNOWN = -1 |
unknown level More... | |
static final int | DEVICE_POWER_LEVEL_LOW = 0 |
low level More... | |
static final int | DEVICE_POWER_LEVEL_MEDIUM = 1 |
medium level More... | |
static final int | DEVICE_POWER_LEVEL_HIGH = 2 |
Protected Member Functions | |
void | setInternalObject (long internalObject) |
long | getInternalObject () |
boolean | isAuxiliaryContext () |
Streaming context.
The streaming context class(NvsStreamingContext) can be refered to as the entry point of the whole SDK framework. In the process of development, NvsStreamingContext provides the static sharedInstance interface, which is the only instance to create streaming context. Through this instantce object, we can turn on the recording device to record videos, adding effects to capture videos, set various parameters for recording, which include autofocus, automatic exposure adjustment, swtiching on/off of the light supplement and so on. Meanwhile, this instance can also create timelines, connecting timelines to real-time preview windows to view the recorded videos in real-time. When the whole video has been produced completely, please destroy the instances of streaming context. When recording with special effects or adding resources packages (recording effects package, scene resources package and so on), one has to first install the package and obtain packageID after installation. For built-in special effects, one only needs to obtain the name of the effect in order to use them.
In the SDK, users need to adopt the full pathway when importing resources or authorizations.
|
inline |
Add a custom animated sticker on capture.
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(It can be a jpg, png image, or a dynamic caf format image supported by Meishe sdk) |
|
inline |
Appends a beauty effect.
|
inline |
Appends a built-in capture audio effect.
audioFxName | audio effect name. To get the audio effect name, please refer to getAllBuiltinCaptureAudioFxNames() or The List of Built-in Effect Name. |
|
inline |
Appends a built-in capture video effect.
videoFxName | Video effect name. To get the video effect name, please refer to getAllBuiltinCaptureVideoFxNames() or The List of Built-in Effect Name. |
|
inline |
Appends a animated sticker.
offsetTime | animated sticker's offset time. |
duration | animated sticker's duration. |
animatedStickerPackageId | Animated sticker package Id. |
|
inline |
Appends a caption.
captionText | Text of caption |
offsetTime | catpion's offset time. |
duration | catpion's duration. |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
Appends a compound caption.
offsetTime | compound catpion's offset time. |
duration | compound catpion's duration. |
compoundCaptionPackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
Appends a modular caption.
captionText | Text of caption |
offsetTime | catpion's offset time. |
duration | catpion's duration. |
|
inline |
Appends a custom capture video effect.
customVideoFxRender | Interface of user-implemented custom video effect renderer |
|
inline |
Appends a package capture effectx.
videoFxPackageId | Video effect package ID |
|
inline |
Apply a capture scene resource package to the capture device.
captureSceneId | The ID of capture scene resource package |
|
inline |
Apply a capture scene resource package to the capture device.
captureSceneId | The ID of capture scene resource package |
info | Resource information to be replaced |
|
inline |
calc the duration after use curves variable speed.noteļ¼ the origin duration is the curves's last endpoint.x-first endpoint.x
curvesString | description of the variable speed curves. \string foramt : (endpoint1)(endpoint1.backward)(endpoint1.frontward)(endpoint2)(endpoint2.backward)(endpoint2.frontward)ā¦ā¦ \coords foramt : (x,y) \note1 : the y coords means the multiple speed. the range of y is 0.1 to 10 \note2 : all x coord values cannot be repeated. endpoint1.backward.x < endpoint1.x < endpoint1.frontward.x < endpoint2.backward.x <endpoint2.xā¦ā¦ \note3 : if you set an empty curvesString,it means you want to disable curves variable speed,the clip will back to const speed. \eg : curvesString = "(0,1)(-3,1)(3,1)(7,5)(6,5)(8,5)(10,0.4)(9,0.4)(11,0.4)(17,0.4)(16,0.4)(18,0.4)(20,5)(19,5)(21,5)(27,1)(24,1)(30,1)" curvesString included 6 group end point info . |
čæåē»čæę²ēŗæåéåēę¶éæć注ļ¼åå§ę¶éæäøŗę²ēŗæę®µäøå°¾ē«Æē¹äøé¦ē«Æē¹Xåę å¼ä¹å·®
curvesString | č“å”å°ę²ēŗæęčæ°å符串 \åē¬¦äø²ę ¼å¼ļ¼(端ē¹1åę )(端ē¹1åę§å¶ē¹åę )(端ē¹1åę§å¶ē¹åę )(端ē¹2åę )(端ē¹2åę§å¶ē¹åę )(端ē¹2åę§å¶ē¹åę )(端ē¹3åę )(端ē¹3åę§å¶ē¹åę )(端ē¹3åę§å¶ē¹åę )ā¦ā¦ \åę ę ¼å¼ļ¼(åę Xå¼ļ¼åę Yå¼) \注1ļ¼Yåę äøŗęę¾åéå¼ļ¼čå“åØ0.1-10ä¹é“ć \注2ļ¼ęÆäøŖē«Æē¹åę§å¶ē¹ēXåę åæ é”»äøč½ēøēć大å°č§å®äøŗļ¼ē«Æē¹1åę§å¶ē¹ēXåę < 端ē¹1ēXåę <端ē¹1ēåę§å¶ē¹ēXåę < 端ē¹2åę§å¶ē¹ēXåę < 端ē¹2ēXåę ā¦ā¦ \注3ļ¼å¦ę设置ēcurvesString为空å符串ļ¼å蔨示对评ēꮵåę¶ä¹åēę²ēŗæåéļ¼ę¢å¤å°åéē¶ęć \ä¾å¦ļ¼curvesString = "(0,1)(-3,1)(3,1)(7,5)(6,5)(8,5)(10,0.4)(9,0.4)(11,0.4)(17,0.4)(16,0.4)(18,0.4)(20,5)(19,5)(21,5)(27,1)(24,1)(30,1)"å å«äŗ6ē»ē«Æē¹åå ¶ę§å¶ē¹åę äæ”ęÆć |
|
inline |
Cancels the ongoing autofocus.
|
inline |
Checks if the camera's parameters cannot be set when recording with system recorder.
For certain Android mobile phones, when recording with system built-in recorders, if one set cameras' parameters (for instance the exposure compensation or autofocus), the recorded video will have problems or the recording cannot be stopped. To avoid this kind of problems, the Meishe SDK keeps a blacklist of unwantted Android phones. If a phone is in the blacklist, any setting of the parameters while recording will be ignored. This method is used to check if current phone used is in the blacklist. If yes, the user may have to make certain adjustment to the recording interface, say disabling the exposure compensation button. Note: if the user does not use the system built-in recorder when recording, then the blacklist will not work.
|
inline |
Clears cached resources.
asynchronous | Whether to set it to asynchronous mode |
|
inline |
Clears cached resources.
asynchronous | Whether to set it to asynchronous mode |
|
inlinestatic |
Destroys the streaming context object instance. note: it can be created again after destruction.
|
inlinestatic |
|
inline |
Compile passthrough the video clips on video track 0 in the timeline into a file without processing filter, multi track and nested timeline. If there are photos, it will fail.
timeline | Timeline |
outputFilePath | The path of output file. |
configurations | the timeline configurations, only supports COMPILE_CREATION_TIME, COMPILE_OPTIMIZE_FOR_NETWORK_USE and COMPILE_METADATADESCRIPTION |
flags | Special flags for output file. If there is no special requirements please input 0.only supports STREAMING_ENGINE_COMPILE_FLAG_ONLY_VIDEO |
|
inline |
Compiles timeline into a file.
timeline | Timeline |
startTime | Start time in microseconds. Start time should be in the range of [0, timeline.duration-1], other input value is invalid. |
endTime | End time in microseconds. End time should be within [startTime,timeline.duration], other values are invalid. |
outputFilePath | The path of output file. |
videoResolutionGrade | Resolution grade of the output file. This grade means the height of compiled video and it can not be greater than the height of timeline. please refer to compile video resolution grade |
videoBitrateGrade | Bitrate of the file compiled. Please refer to compile bitrate grade. The output bitrate can be low-bitrate, medium-bitrate or high-bitrate. The specific bitrate of video compiled is correlated with compiled file's resolution. Taking a 1280*720 pixels video for example, the approximate bitrate of low grade is 2.2Mbps, with 3.3Mbps for medium grade and 6.7Mbps for high grade. |
configurations | the timeline configurations. For key values in Hashtable please refer to Configuration of compiling timeline |
flags | Special flags for output file. If there is no special requirements please input 0. Please refer to streaning engine compile flag. |
|
inline |
Compiles timeline into a file.
timeline | Timeline |
startTime | Start time in microseconds. Start time should be in the range of [0, timeline.duration-1], other input value is invalid. |
endTime | End time in microseconds. End time should be within [startTime,timeline.duration], other values are invalid. |
outputFilePath | The path of output file. |
videoResolutionGrade | Resolution grade of the output file. This grade means the height of compiled video and it can not be greater than the height of timeline. please refer to compile video resolution grade |
videoBitrateGrade | Bitrate of the file compiled. Please refer to compile bitrate grade. The output bitrate can be low-bitrate, medium-bitrate or high-bitrate. The specific bitrate of video compiled is correlated with compiled file's resolution. Taking a 1280*720 pixels video for example, the approximate bitrate of low grade is 2.2Mbps, with 3.3Mbps for medium grade and 6.7Mbps for high grade. |
flags | Special flags for output file. If there is no special requirements please input 0. Please refer to streaning engine compile flag. |
|
inline |
Connects the captured preview with live window.
liveWindow | Live window for previewing |
|
inline |
Connects the captured preview with live windowļ¼based on TextureViewļ¼
liveWindow | Live window for previewing |
|
inline |
Connects a capture preview with a Surface object. The capture preview's rendering result will be output to this Surface object.
outputSurface | The Surface object which rendering result will be output. |
|
inline |
Connects a capture preview with a SurfaceTexture object. The capture preview's rendering result will be output to this SurfaceTexture object.
outputSurfaceTexture | The SurfaceTexture object which rendering result will be output. |
|
inline |
Connects timeline with the LiveWindow.
timeline | Timeline |
liveWindow | Preview image window in real time |
|
inline |
Connects timeline with the LiveWindow (based on TextureView)
timeline | Timeline |
liveWindow | Preview image window in real time |
|
inline |
Connects timeline with a Surface, of which the rendering outcome of the timeline will be output to this Surface.
timeline | Timeline |
outputSurface | The Surface object that rendering outcome output to |
|
inline |
Connects timeline with a SurfaceTexture, of which the rendering outcome of the timeline will be output to this SurfaceTexture.
timeline | Timeline |
outputSurfaceTexture | The SurfaceTexture object that rendering outcome output to |
|
inline |
Connects timeline with SurfaceTexture and set the proxy scale. The timeline's rendering outcome will be output to this SurfaceTexture.
timeline | Timeline |
outputSurfaceTexture | The SurfaceTexture object that rendering outcome output to |
proxyScale | Scale of proxy |
|
inline |
Connects timeline with video frame receiver and set the proxy scale.
timeline | Timeline |
receiver | Video frame receiver |
proxyScale | Scale of proxy |
flags | Flags for video frame receicer. For specific please refer to video frame receicer flags |
|
inline |
Creates an object of auxiliary streaming context.
lags | Flag field. If there is no special requirement, please fill in 0. |
|
inline |
Creates timeline.
videoEditRes | Video file's resolution (specified width to height ratio). For video editting resolution, when importing corresponding params, the imported image's width has to be a multiple of 4, the height has to be a multiple of 2. Note: if one creates NvsStreamingContext's instance that supports 4K video editting, then video editting's resolution cannot be higher then 3840*2160(imageWidth*imageHeight), otherwise the imageWidth*imageHeight cannot exceed 1920* 1080 pixels. |
videoFps | Frame rate |
audioEditRes | Audio file's resolution(specified file sampling rate, sampling format and number of channels. For audio editting resolution, imported audio only supports two types of sampling rate, 44100 or 48000.) |
|
inline |
Creates timeline.
videoEditRes | Video file's resolution (specified width to height ratio). For video editting resolution, when importing corresponding params, the imported image's width has to be a multiple of 4, the height has to be a multiple of 2. Note: if one creates NvsStreamingContext's instance that supports 4K video editting, then video editting's resolution cannot be higher then 3840*2160(imageWidth*imageHeight), otherwise the imageWidth*imageHeight cannot exceed 1920* 1080 pixels. |
videoFps | Frame rate |
audioEditRes | Audio file's resolution(specified file sampling rate, sampling format and number of channels. For audio editting resolution, imported audio only supports two types of sampling rate, 44100 or 48000.) |
flags | Special flags for create timeline. If there is no special requirements please input 0. Please refer to create timeline flag. |
|
inline |
Creates timeline.
templateId | template uuidļ¼template must be installed firstly |
templateFootages | footage information in the template asset |
|
inline |
Creates timeline.
templateId | template uuidļ¼template must be installed firstly |
templateFootages | footage information in the template asset |
flags | Special flags for create timeline. If there is no special requirements please input 0. Please refer to create timeline flag. |
|
inline |
Creates timeline.
templateId | template uuidļ¼template must be installed firstly |
templateFootages | footage information in the template asset |
flags | Special flags for create timeline. If there is no special requirements please input 0. Please refer to create timeline flag. |
videoFps | Frame rate |
audioEditRes | Audio file's resolution(specified file sampling rate, sampling format and number of channels. For audio editting resolution, imported audio only supports two types of sampling rate, 44100 or 48000.) |
|
inline |
Creates an object of video frame retriever.
videoFilePath | Path of the original video |
|
inline |
Creates an object of video frame retriever.
videoFilePath | Path of the original video |
|
inline |
destory auxiliary streaming context.
NvsStreamingContext. | destoryed auxiliary streaming context |
|
inline |
Get engine render fps, only valid after calling StartCapturePreview or PlaybackTimeline.
|
inline |
Detects video file's I-Frame interval.
videoFilePath | File path of the vidio file |
|
inline |
Export project information.
projectUuid | Project resource package ID |
timeline | Timeline Object |
requestedAspectRatio | Aspect ratio of project according to timelinećplease refer to Aspect ratio supported by the resource package |
|
inline |
Export template information.
templateUuid | Template resource package ID |
timeline | Timeline Object |
requestedAspectRatio | Aspect ratio of template according to timelinećplease refer to Aspect ratio supported by the resource package |
|
inline |
Generate project asset package.
projectUuid | project resource package ID |
innerAssetDir | Path of internal assets of template |
projectOutputDir | Output path of project asset package |
|
inline |
Generate template asset package.
templateUuid | Template resource package ID |
innerAssetDir | Path of internal assets of template |
templateOutputDir | Output path of template asset package |
|
inline |
Get whether AEC(Acoustic Echo Cancellation) is enabled.
|
inline |
Gets the list of all built-in audio effect names.
|
inline |
Gets the list of all built-in capture audio effect names.
|
inline |
Gets the list of all built-in capture video effectsā names.
|
inline |
Gets the list of all built-in video effect names.
|
inline |
Gets the list of all built-in video transitionsā names.
|
inline |
Gets resource package manager.
|
inline |
Gets the description of an audio effect.
fxName | Audio effectās name |
|
inline |
Gets detailed information of the audio/video file.
avFilePath | File path of the audio/video file |
|
inline |
Gets detailed information of the audio/video file.
avFilePath | File path of the audio/video file |
extraFlag | Get extra information of the audio/video file. please refer to AV_FILEINFO_EXTRA |
|
inline |
Gets detailed information of the audio/video file.
avFilePath | File path of the audio/video file |
extraFlag | Get extra information of the audio/video file. please refer to AV_FILEINFO_EXTRA |
errorString | Output param for error description is valid if current function return null. |
|
inlinestatic |
Gets detailed information of the audio/video file.
avFilePath | File path of the audio/video file |
extraFlag | Get extra information of the audio/video file. please refer to AV_FILEINFO_EXTRA |
|
inline |
Gets the name of beauty effect.
|
inline |
Gets a certain capture animated sticker.
captureStikcerIndex | audio effect index |
|
inline |
Gets the count of capture animated sticker.
|
inline |
Gets a certain capture audio effect.
captureVideoFxIndex | audio effect index |
|
inline |
Gets the count of audio effects.
|
inline |
Gets a certain capture caption.
captureCaptionIndex | caption index |
|
inline |
Gets the count of capture caption.
|
inline |
Gets a certain capture compound caption.
captureCaptionIndex | compound caption index |
|
inline |
Gets the count of capture compound caption.
|
inline |
Gets the capability description object of the capture device.
captureDeviceIndex | Index of capturing device |
|
inline |
Number of capture device.
|
inline |
Gets the capture preview resolution.
captureDeviceIndex | Index of capturing device |
|
inline |
Gets a certain capture video effect.
captureVideoFxIndex | Video effect index |
|
inline |
Gets the count of video effects.
|
inline |
gets the color gain during SDR to HDR conversion.
|
inline |
Gets configurations for compiling timeline.
|
inline |
|
inline |
Gets the ID of the current capture scene resource package.
|
inline |
Gets the customized video height.
|
inline |
Gets the file path of the default ending logo.
|
inline |
Gets the default video transitionās name.
|
inline |
Get Android camera device cpu power level.
|
inline |
Get Android camera device gpu power level.
|
inline |
Get HDR capability.
|
inline |
Gets exposure compensation.
|
inline |
get state of the flash light.
|
inline |
Gets font file's font information.
fontFilePath | Font file path |
|
inline |
Get GL max texture size.
|
inlinestatic |
|
inlineprotected |
|
inline |
|
inline |
Obtains Meishe SDK's version information.
|
inline |
Gets streaming engine's state.
|
inline |
Gets the current positon of the timeline (in microseconds)
timeline | Timeline |
|
inline |
Gets the description of a video effect.
fxName | Video effectās name |
|
inline |
Gets the current videoās stabilization flag.
|
inline |
|
inline |
Gets the specific frame in timeline with a specific timestamp. For details please refer to The video frame retriever .
timeline | The timeline that will be grabbed from. |
timestamp | The desired frame's timestamp(in microseconds). Timestamp should be within range [0,timeline.duration - 1]. Other inputs are invalid and will results grabImageFromTimeline returns null. |
proxyScale | Zoom scale of proxy |
|
inline |
Gets the specific frame in timeline with a specific timestamp. For details please refer to The video frame retriever.
timeline | The timeline that will be grabbed from. |
timestamp | The desired frame's timestamp(in microseconds). Timestamp should be within range [0,timeline.duration - 1]. Other inputs are invalid and will results grabImageFromTimeline returns null. |
proxyScale | Zoom scale of proxy |
flags | Flags for streaming engine seeking. For specific please refer to The seek flag of streaming engine. |
|
inline |
Gets the specific frame in timeline with a specific timestamp. For details please refer to The video frame retriever. This function is an internal asynchronous call. It is necessary to ensure that SeekTimeline () will not be invoked before getting the image. If the function that calls SeekTimeline after calling this function may not get the callback of the image, it can call Stop after this function to ensure that the Grab image can be executed successfully.
timeline | The timeline that will be grabbed from. |
timestamp | The desired frame's timestamp(in microseconds). Timestamp should be within range [0,timeline.duration - 1]. Other inputs are invalid and will results grabImageFromTimeline returns null. |
proxyScale | Zoom scale of proxy |
flags | Flags for streaming engine seeking. For specific please refer to The seek flag of streaming engine. |
|
inlinestatic |
Checks if current SDK has an AR module.
|
inlinestatic |
Initializes an instance of streaming context object.
mainActivity | Main activity object from android. |
sdkLicenseFilePath | Specified SDK license file path. |
|
inlinestatic |
Initializes the instance of streaming context object. for more please refer to (4k video editing).
mainActivity | Main activity object from android. |
sdkLicenseFilePath | Specified SDK license file path. |
flags | Flags filed, 0 if no special demand, please refer to [STREAMING_CONTEXT_FLAG]. |
|
inlinestatic |
Initializes streaming context instance.
ctx | Android context object. |
sdkLicenseFilePath | Specified SDK license file path. |
flags | Flags, 0 if no special requirement, please refer to (STREAMING_CONTEXT_FLAG). |
|
inlinestatic |
Initializes human detection. Only once needed.
ctx | The context object from android. |
modelFilePath | The path of modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
|
inlinestatic |
Initializes human detection. Only once needed.
ctx | The context object from android. |
modelFilePath | The path of modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
options | detect options, please refer to Human detection features. |
|
inlinestatic |
Human detection initialization extension. Must be called after calling initHumanDetection.
ctx | The context object from android. |
modelFilePath | The path of extra modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
|
inlinestatic |
Human detection initialization extension. Must be called after calling initHumanDetection.
ctx | The context object from android. |
modelFilePath | The path of extra modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to Human detection features. |
options | detect options, please refer to Human detection features. |
|
inline |
Inserts a skin beauty video effect.
insertPosition | Insertion position |
|
inline |
Inserts a built-in audio capture effect.
audioFxName | audio effect name. To get the audio effect name, please refer to getAllBuiltinCaptureAudioFxNames() or The List of Built-in Effect Name. |
insertPosition | Insertion position. |
|
inline |
Inserts a built-in video capture effect.
videoFxName | Video effect name. To get the video effect name, please refer to getAllBuiltinCaptureVideoFxNames() or The List of Built-in Effect Name. |
insertPosition | Insertion position. |
|
inline |
Appends a animated sticker.
offsetTime | animated sticker's offset time. |
duration | animated sticker's duration. |
animatedStickerPackageId | Animated sticker package Id. |
insertPosition | Insertion position. |
|
inline |
Insert a caption.
captionText | Text of caption |
offsetTime | catpion's offset time. |
duration | catpion's duration. |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
insertPosition | Insertion position. |
|
inline |
Insert a compound caption.
offsetTime | compound catpion's offset time. |
duration | compound catpion's duration. |
compoundCaptionPackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
insertPosition | Insertion position. |
|
inline |
Insert a modular caption.
captionText | Text of caption |
offsetTime | catpion's offset time. |
duration | catpion's duration. |
insertPosition | Insertion position. |
|
inline |
Insert a animated sticker.
offsetTime | animated sticker's offset time. |
duration | animated sticker's duration. |
animatedStickerPackageId | Animated sticker package Id. |
customImagePath | Path of custom animated sticker image(It can be a jpg, png image, or a dynamic caf format image supported by Meishe sdk) |
insertPosition | Insertion position. |
|
inline |
Inserts a custom capture video effect.
customVideoFxRender | Interface of user-implemented custom video effect renderer |
insertPosition | Insertion position |
|
inline |
Inserts a package capture effect.
videoFxPackageId | Video effect package ID |
insertPosition | Insertion position |
|
inline |
Get Android camera device tend to use dual buffer model to render AR.
|
inlineprotected |
|
inline |
Determining whether the incoming bitmap is a black image, and judging by the mean value and variance of the image pixels.
bitmap. | The bitmap you need |
|
inline |
Whether it's a rear capturing device.
captureDeviceIndex | Index of capturing device |
|
inline |
Check if compiling timeline is paused.
|
inline |
gets whether default caption mode is fade in and fade out.
|
inline |
get state of the flash light.
|
inline |
Check if playback timeline is paused.
|
inline |
Checks if the recording has been paused.
|
inline |
Checks if sdk is authorized.
|
inline |
Load project.
projectId | project uuidļ¼project must be installed firstly |
resourceDir | resource dir of the project asset |
flags | Special flags for create timeline. If there is no special requirements please input 0. Please refer to create timeline flag. |
|
inlinestatic |
Open main thread checker or not.
flag | checker switch. |
|
inline |
Pause compiling timeline.
|
inline |
Pause playback timeline.
|
inline |
Pause to record. Resuming recording after a pause will output the recorded video to the same file. Note: Recording can only be paused without using the built-in recorder!
|
inline |
Timeline playback.
timeline | Timeline |
startTime | Start time(in microseconds). Start time should be in the range [0,timeline.duration - 1], other inputs are invalid and playbackTimeline will return false resulting playback cannot be turned on. |
endTime | End time(in microseconds). If endtime input is a negative value, then the playback is defaultly set to play till the end. |
videoSizeMode | If no special requirements please input 0. Please refer to The video preview sizemode for reference. |
preload | Whether to preload |
flags | Flags for preview. If no special requirements please input 0. Please refer to The Streaming engine playback flags for reference. |
|
inline |
Timeline playback.
timeline | Timeline |
startTime | Start time(in microseconds). Start time should be in the range [0,timeline.duration - 1], other inputs are invalid and playbackTimeline will return false resulting playback cannot be turned on. |
endTime | End time(in microseconds). If endtime input is a negative value, then the playback is defaultly set to play till the end. |
proxyScale | Zoom scale of proxy |
preload | Whether to preload |
flags | Flags for preview. If no special requirements please input 0. Please refer to The Streaming engine playback flags |
|
inline |
Preload effect resources.
|
inline |
Gets font file's fontFamily.
fontFilePath | Font file path |
|
inline |
Removes all capture animated sticker.
|
inline |
|
inline |
Removes all capture caption.
|
inline |
Removes all capture compound caption.
|
inline |
Removes all capture video effects.
|
inline |
Removes a certain capture animated sticker indicated by its index.
captureAnimagedStickerIndex | animated sticker index |
|
inline |
Removes a certain capture audio effect indicated by its index.
captureAudioFxIndex | audio effect index |
|
inline |
Removes a certain capture caption indicated by its index.
captureCaptionIndex | caption index |
|
inline |
Removes a certain capture compound caption indicated by its index.
captureCompoundCaptionIndex | compound caption index |
|
inline |
Removes a certain capture video effect indicated by its index.
captureVideoFxIndex | Video effect index |
|
inline |
|
inline |
Removes timeline.
timeline | The timeline to be removed |
|
inline |
Removes custom watermark which added for capturing video.
|
inline |
Resume compiling timeline.
|
inline |
Resume playback timeline.
|
inline |
Continues to record. Continuing recording will output the recorded video to the same media file, to which the recording before suspend outputs contents.
|
inline |
Samples the capture device's video frame.
sampleRect | Rectangular area to sample, of which coordinates are in livewindow's coordinate system |
|
inline |
Seeking the frame at a specific timestamp.
timeline | Timeline |
timestamp | Timestamp (in microseconds). Timestamp should be in the range of [0,timeline.duration - 1]. Other input values are invalid and seekTimeline will return false, results can't targeting. |
videoSizeMode | Video preview mode. Please refer to video preview sizemode |
flags | Flags for streaming engine seeking. For specific please refer to seeking flags of streaming engine |
|
inline |
Seeking the frame at a specific timestamp.
timeline | Timeline |
timestamp | Timestamp(in microseconds). Timestamp should be in the range of [0,timeline.duration - 1]. Other input values are invalid and seeking timeline will return false, results seeking cannot be turned on. |
proxyScale | Zoom scale of proxy |
flags | Flags for streaming engine seeking. For specific please refer toseeking flags of streaming engine |
|
inline |
Transfers the input buffer to capture preivew.
data | The byte array to send to buffer, only NV21 is supported. |
streamTime | Timestamp of the input buffer |
|
inline |
Sends buffer to the capture preview.
data | The byte array to send to buffer, only NV21 is supported. |
streamTime | Timestamp of the input buffer |
flags | flag value |
|
inline |
Set whether to enable AEC(Acoustic Echo Cancellation).
whether | to enable AEC. |
|
inline |
Sets callback interface of audio output.
cb | Callback interface for audio output |
|
inline |
set volume to audio output device.
volume | new volume to device, value range[0, 1] |
|
inline |
Set audio sample information for callback of capturing.
info | audio sample information |
|
inline |
Set the auto exposure detection area.
exposureRect | Automatic exposure detection area, the coordinates are the real-time preview window's own coordinate system. |
|
inline |
Sets callback interface of audio output.
cb | Callback interface for audio output |
|
inline |
Sets callback interface for capturing device.
cb | Callback interface for capturing device. |
|
inline |
Sets callback interface for getting capture preview frame.
cb | Callback interface for getting capture preview frame |
|
inline |
Sets callback interface for getting capture preview frame.
cb | Callback interface for getting capture preview frame |
|
inline |
Sets callback interface of recording duration.
cb | Callback interface for recording duration |
|
inline |
Sets callback interface for recording frame reached.
cb | Callback interface for recording frame reached |
|
inline |
Sets callback interface for recording started.
cb | Callback interface for recording started |
|
inline |
Sets the color gain during SDR to HDR conversion.
gain | color gain. range is [1.0, 10.0] |
|
inline |
Sets callback interface for timeline file compilation.
cb | Callback interface for timeline file compilation |
|
inline |
Sets the second callback interface for timeline file compilation.
cb | The second callback socket for timeline file compilation |
|
inline |
Sets the third callback interface for timeline file compilation.
cb | The third callback socket for timeline file compilation |
|
inline |
Sets the timeline configurations, which stay valid once set.
compileConfigurations | Compile timeline configurations. For key values in Hashtable please refer to Configuration of compiling timeline.for exampleļ¼ Hashtable<String, Object> config = new Hashtable<>(); config.put(NvsStreamingContext.COMPILE_GOP_SIZE, 15); //If set to 1 then a I-frame-only video is compiled. (Note: some android phones cannot compile I-frame-only video. In this case,please use STREAMING_ENGINE_COMPILE_FLAG_DISABLE_HARDWARE_ENCODER to encode) config.put(NvsStreamingContext.COMPILE_BITRATE, 10000000); // 10M bps config.put(NvsStreamingContext.COMPILE_AUDIO_BITRATE, 320000); // Sets audio bitrate to 320Kbps. config.put(NvsStreamingContext.COMPILE_LOSSLESS_AUDIO, true); // Sets audio to lossless. config.put(NvsStreamingContext.COMPILE_OPTIMIZE_FOR_NETWORK_USE, true); // Sets index table to prepose. config.put(NvsStreamingContext.COMPILE_USE_OPERATING_RATE, true); // using operating rate config.put(NvsStreamingContext.COMPILE_FPS, new NvsRational(30, 1)); // using a customized fps m_streamingContext.setCompileConfigurations(config); |
Cancels configurations and returns to default settings:
config.put(NvsStreamingContext.COMPILE_GOP_SIZE, null);
|
inline |
|
inline |
Sets the callback interface for timeline slice file compilation.
cb | The callback socket for timeline slice file compilation |
|
inline |
Set the rate multiplier for compiling video.
compileVideoBitrateMultiplier | Multiplier |
|
inline |
Sets the customized height for video.
When compiling videos, set the bitrate grade for compiled video to COMPILE_VIDEO_RESOLUTION_GRADE_CUSTOM. Plesae note, to make sure the file is compiled successfully, Meishe SDK would calibrate the height accordingly, thus the final output file may not necessarily be the height set here.
videoHeight | Customized height value of the compiled video. |
|
inline |
Sets the default audio transitionās name.
audioTransitionName | audio transitionās name |
|
inline |
Sets whether default caption mode is fade in and fade out.
fade | whether is fade in and fade out. |
|
inline |
Sets the default image clip duration.
bitmap. | image clip duration |
|
inline |
Sets default theme's ending logo.
logoImageFilePath | File path of the ending logo image |
|
inline |
Set exposure compensation.
exposureCompensation | Exposure compensation value |
|
inline |
Sets callback interface for hardware error.
cb | Callback interface for hardware error |
|
inline |
Sets callback interface for timeline image grabber.
cb | Callback interface for timeline image grabber |
|
inline |
Sets second callback interface for timeline image grabber.
cb | The second callback interface for timeline image grabber |
|
inlineprotected |
|
inline |
Sets callback interface for media error.
cb | Callback interface for media error |
|
inline |
Sets the callback interface for timeline playback.
cb | Callback interface for timeline playback |
|
inline |
Sets second callback interface for timeline playback.
cb | The second callback interface for timeline playback |
|
inline |
Sets callback interface for delay playback.
cb | Callback interface for delay playback |
|
inline |
Sets callback interface for playback exception.
cb | Callback interface for playback exception |
|
inline |
Set the rate multiplier for recording video.
recordVideoBitrateMultiplier | Multiplier |
|
inline |
Sets the timeline search callback interface.
cb | Callback interface for search |
|
inline |
Sets callback interface for streaming engine.
cb | Callback interface for streaming engine |
|
inline |
set templates/project custom resource folders
templateUuid | project/template resource package ID |
customResourceDir | Path of assets of project/template |
|
inline |
Sets whether to display theme ending's special effects.
|
inline |
Set scale in seconds per pixel of a timeline to detect scrubbing. You should do this before each seek operation that sets the (STREAMING_ENGINE_SEEK_FLAG_ALLOW_FAST_SCRUBBING) flag.
timeline | Timeline |
secondsPerPixel | Scale in seconds per pixel |
|
inline |
Sets callback interface for timeline timestamp.
cb | Callback interface for timeline timestamp |
|
inlinestatic |
Initializes human detection data pack.
dataType | Type of human detection data pack, please refer to [HUMAN_DETECTION_DATA_TYPE]. |
dataFilePath | The path of data file. |
|
inline |
Adds a custom watermark for capturing video.
watermarkFilePath | Path of the watermark file, which should be a .PNG or .JPG file. |
displayWidth | The width of the watermark displayed in the preview. If it is 0, the original width of the image is used. |
displayHeight | The height of the watermark displayed in the preview. If it is 0, the original height of the image is used. |
opacity | Watermark opacity, the range of which is 0~1 |
position | Position of the watermark, please refer to NvsTimelineWatermarkPosition. |
marginX | Watermark horizontal margin |
marginY | Watermark vertical margin |
|
inline |
Sets video stabilization.
flags | Video stabilization value.Please refer to Flag of stabilization. |
|
inline |
Streaming context web-based application callbacks.
Web-based | application interfaces is one of the most important features. It provides users with multiple channels for operations. Considering users covering various type of applications, Meishe SDK provides feasible web-based UIs for end-users. |
|
inline |
|
inline |
Starts autofocus.
focusRect | The target area for autofocus, of which coordinates are in live-window's coordinate system |
|
inline |
Starts the capture preview with inputting buffer mode.
width | Input buffer width. |
heidht | Input buffer height. |
fps | Input buffer framerate. |
rotation | Input buffer rotation angle. Please refer to Image rotation angle of input buffer |
flipHorizontally | whether to flip the buffer horizontally. |
|
inline |
Starts the capture preview.
captureDeviceIndex | Index of the capture device |
videoResGrade | Grade for video capture resolution. Please refer to Grade for video capture resolution. The video resolution grade means the shorter edge's resolution value when capturing video (could be the height or the width). According to the aspectRatio (if null then system's capturing device will determine aspect ratio), another edge's resolution value will be calculated (could be the height or the width). Four grades include LOW, MEDIUM, HIGH and SUPER_HIGH, of which correspond to 360p, 480p, 720p and 1080p. Android SDK's front-faced and back-faced cameras should be of the same resolution grade. There are two ways to record, recording with special effects and without. When recording with special effects (not using the system's built-in recorder), the SDK will evaluate user's phone's processing ability. If the phone is capable of process the recorded video, then the video will be recorded in resolution grade as set. If not, the SDK will lower the resolution grade to a level that the user's phone are capable of. For example: when using certain model of phone and setting to SUPER_HIGH grade, of which the phone are not capable of supporting, the SDK will lower the grade to HIGH or MEDIUM, thus resulting the grade recorded is not same as the grade user sets. Likewise, if recording without special effects (using the system's built-in camera), then the resolution grade will be determined according to camera's capability. If the camera cannot satisfy the grade setted, the SDK would lower the resolution grade when recording. If the user wants to customize the recording resolution, say 540*960 pixels, then the user will need to record a video with identical aspect ratio, create a timeline with aspect ratio of 540*960 and compile it to file. When compiling, there is no grade corresponding to a height of 960p, thus the user needs to call setCustomCompileVideoHeight() to customize the height before compilation. Then the user needs to call compileTimeline(), with the height grade set to COMPILE_VIDEO_RESOLUTION_GRADE_CUSTOM. The code may be used as follows: NvsVideoResolution videoEditRes = new NvsVideoResolution(); videoEditRes.imageWidth = 540; videoEditRes.imageHeight = 960; videoEditRes.imagePAR = new NvsRational(1, 1); NvsRational videoFps = new NvsRational(25, 1); NvsAudioResolution audioEditRes = new NvsAudioResolution(); audioEditRes.sampleRate = 44100; audioEditRes.channelCount = 2; mTimeline = mStreamingContext.createTimeline(videoEditRes, videoFps, audioEditRes); mStreamingContext.setCustomCompileVideoHeight(960); mStreamingContext.compileTimeline(mTimeline, 0, mTimeline.getDuration(), m_compilePath, NvsStreamingContext.COMPILE_VIDEO_RESOLUTION_GRADE_CUSTOM, NvsStreamingContext.COMPILE_BITRATE_GRADE_HIGH, 0); |
flags | Flag field, if there is no special requirement, please fill in 0. Please refer to Flag of capturing. The application scene for each flag is as follows: STREAMING_ENGINE_CAPTURE_FLAG_GRAB_CAPTURED_VIDEO_FRAME which is used in grabing video frameļ¼ STREAMING_ENGINE_CAPTURE_FLAG_STRICT_PREVIEW_VIDEO_SIZE is used for face detection combination STREAMING_ENGINE_CAPTURE_FLAG_CAPTURE_BUDDY_HOST_VIDEO_FRAME; STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER which used for recording video with special effects. NvsStreamingEngineCaptureFlag_DontCaptureAudio Used for live video without audio stream. Usually not used. |
aspectRatio | Aspect ratio for previewing, setting null means that it will be determined by the system capture device. |
|
inline |
Starts the capture preview.
captureDeviceIndex | Index of the capture device |
videoResGrade | Grade for video capture resolution. |
flags | Flag field, if there is no special requirement, please fill in 0. |
previewSize | video preview size. |
|
inline |
Starts continuous focus.
|
inline |
Starts dual buffer mode for capture preview, one input is from SurfaceTexture and another is from cpu buffer. Two input must be of the same size when rotated to positive direction.
surfaceTexture | Surface texture object |
surfaceTextureWidth | Width of the input SurfaceTexture buffer |
surfaceTextureHeight | Height of the input SurfaceTexture buffer |
surfaceTextureRotation | Rotation angle of input SurfaceTexture buffer (clockwise). Please refer to Input the image rotation angle of the buffer. |
cpuBufferWidth | Width of input cpu buffer |
cpuBufferHeight | Height of input cpu buffer |
cpuBufferFlipHorizontally | Whether input cpu buffer is flipped horizontally (prior to rotation) |
cpuBufferRotation | Rotation angle of input cpu buffer (clockwise). please refer to Input the image rotation angle of the buffer |
fps | fps of input buffer |
flags | Flag value, if no special requirements please input 0. Please refer to STREAMING_ENGINE_CAPTURE_FLAG. |
|
inline |
Starts recording. Please refer to Method of Recording Video.
outputFilePath | The path to the recording file. |
|
inline |
Starts recording. Please refer to Method of Recording Video.
outputFilePath | The path to the recording file. |
flags | Flag field, if there is no special requirement, please fill in 0. Please refer to Flag of recording. |
|
inline |
Starts recording. Please refer to Method of Recording Video.
outputFilePath | The path to the recording file. Note: .mov is recommended as the output format. |
flags | Flag field, if there is no special requirement, please fill in 0. Please refer to Flag of recording. |
recordConfigurations | Configurations for recording videos. For key values in Hashtable,please refer to Configurations of recording video. For instanceļ¼ Hashtable<String, Object> config = new Hashtable<>(); config.put(NvsStreamingContext.RECORD_GOP_SIZE, 15); //If set to 1 then a I-frame-only video is compiled. (Note: some android phones cannot compile I-frame-only video. In this case,please use STREAMING_ENGINE_COMPILE_FLAG_DISABLE_HARDWARE_ENCODER to encode) config.put(NvsStreamingContext.RECORD_BITRATE, 10000000); // 10M bps |
|
inline |
Stops the engine.
|
inline |
|
inline |
Stops recording.
|
inline |
|
inline |
take a picture with the max resolution of camera which matches the preview resolution best
flags | take picture flag. value is 0 |
|
inline |
Sets which the flash light is on/off.
flashOn | whether the flash light is on or not |
|
inline |
Sets the flash mode.
mode | flash mode value, please refer to Flash Mode |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Turns On flash to auto.
|
static |
Turns off flash.
|
static |
Turns On flash.
|
static |
Turns On torch.
|
static |
Capture device's error, the server died
|
static |
Capture device's error, the server died.
|
static |
Capture device's error, the server died.
|
static |
Unknown error with the capturing device.
|
static |
Cache of avfile infors.
|
static |
Cache of video's key frame infos.
|
static |
Cache of font infos.
|
static |
Cache of icon engine.
|
static |
Cache of streaming engine.
|
static |
Cache of waveform engine.
|
static |
Compile audio bitrate in bps, type: int, such as 128000 for 128k bitrate.
|
static |
Set up audio channels, currently supporting "mixtomono", with default and timeline settings consistent.
|
static |
Assigned audio encoding format, "amr-wb", "vorbis" and "mp3" are supported, default is "aac".
|
static |
Set the audio sampling rate, currently supporting a minimum of 16K and a maximum of 128K.
|
static |
Compile bitrate in bpsļ¼type: int, such as 3000000 for 3M biterate.
|
static |
High bitrate for video compiled.
|
static |
Low bitrate for video compiled.
|
static |
Medium bitrate for video compiled.
|
static |
Set creation time for this file. Foramt:"YYYY-MM-DDTHH:MM:SS",eg:2010-12-24T12:00:00(use location time)
|
static |
base line profile for video encode
|
static |
High profile for video encode.
|
static |
main profile for video encode
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Set meta data, for example:"creation-time=xxxxx;location=17.641347+160.931648;".
|
static |
frames per second when compiling, type: NvsRational
|
static |
Compile GOP size, type: int, default is 30.
|
static |
Set location for this file. eg:17.641347+160.931648.
|
static |
Whether to compile lossless audio, type: booleanļ¼default is false.
|
static |
sets the metadata description of the video files
|
static |
Whether to prepose the index table, type: booleanļ¼default is false.
|
static |
Preset crf parameters for software encoder, type: int, range is [1, 99], less is betterļ¼default is 23.
|
static |
Preset maximum bitrate for software encoder in crf mode, type: int.
|
static |
Software encoder mode, type: string, support āabrāćācrfāļ¼default is crf.
|
static |
Preset parameters for software encoder, type: string, default is "faster", can support "ultrafast"ļ¼"superfast"ļ¼"veryfast"ļ¼"faster"ļ¼ "fast"ļ¼"medium"ļ¼"slow"ļ¼"slower"ļ¼"veryslow"ļ¼"placebo".
|
static |
Whether to use this config, type: boolean.
|
static |
Whether to use operating rate, type: boolean.
|
static |
Compile bitrate mode, Currently supported "cbr" and "vbr".
|
static |
Breakpoint continuation cache file durationļ¼in microseconds. The minimum duration is 1,000,000 microseconds. The default value is 10,000,000 microseconds.
|
static |
Breakpoint continuation cache file path.
|
static |
Breakpoint continuation cache file size. The minimum size is 1,000,000 bytes. The default value is 0.
|
static |
Set whether enable breakpoint continuation.
|
static |
Set the statistical mode for GIF export. Currently, it supports diff, single, and defaults to single mode. If set to diff mode, it is best to export GIF for no more than 10 seconds. In this mode, memory requirements are relatively high.
|
static |
Assigned video encoding level, type: int, Please refer to andorid CodecProfileLevel.
|
static |
Assigned video encoding format, "hevc"(h.265), "vp8"(The audio encoder must be Vorbis and the file format must be WebM) is supported, default is "h.264".
|
static |
Assigned video encoding profile, type: int, values are 0 means none, 1 means baseline, 2 means main, 3 means high.
|
static |
Alpah channel is supported. Now, only VP8 format is supported.
|
static |
Set color transfer for HDR to encode, curve: string, default is "none", can support "st2084" and "hlg", and "hdr10plus",.
|
static |
Compiles the video with height 1080.
|
static |
Compiles the video with height 2160.
|
static |
Compiles the video with height 360(the width of video is determined by height and the selected width when creating timeline, caculated by resolution ratio)
|
static |
Compiles the video with height 480.
|
static |
Compiles the video with height 720.
|
static |
Customizes the height of video compiledļ¼must be used with the API named setCustomCompileVideoHeight.
|
static |
Do not add a default video transition.
|
static |
timeline's longest duration consider all tracks
|
static |
Flag for Raw filter input uses the original size of the file.
|
static |
Orphan timeline flag, destroy the timeline after its parent timeline destroyed.
|
static |
Output use timeline's audio resolution.
|
static |
Sync audio transition and video transiton on video track.
|
static |
Forced use of timeline resolution in automatically adapt timeline resolution model.
|
static |
Use mipmap anti-aliasing.
|
static |
Automatically adapt timeline resolution when add images.
|
static |
high level
|
static |
low level
|
static |
medium level
|
static |
unknown level
|
static |
Set color transfer for HDR to encode, curve: string, default is "none", can support "st2084" and "hlg",.
|
static |
Editing Support HDR.
|
static |
Support exporting HDR video.
|
static |
Support importing HDR video.
|
static |
Livewindow support HDR.
|
static |
Advanced beauty data pack type.
|
static |
Custom avatar data pack type.
|
static |
Face common data pack type.
|
static |
Fake face data pack type.
|
static |
Makeup data pack type (deprecated)
|
static |
Makeup2 data pack type (deprecated, replaced by HUMAN_DETECTION_DATA_TYPE_FACE_COMMON)
|
static |
PE 106 data pack type.
|
static |
PE 240 data pack type.
|
static |
Skin color data pack type.
|
static |
Avatar Expressions of human face.
|
static |
Extra features of human face.
|
static |
Eyeball landmarks.
|
static |
Actions of human face.
|
static |
Base face attributes.
|
static |
Face shape attribute
|
static |
Landmarks on human face.
|
static |
Hand actions.
|
static |
Bone landmarks of hand.
|
static |
Hand landmarks.
|
static |
Image detection mode.
|
static |
Multiple detect, say multiple rois detection.
|
static |
Multi thread detection.
|
static |
Background segmentation.
|
static |
Half body segmentation.
|
static |
Sky segmentation.
|
static |
Semi-image detection mode.
|
static |
Single thread detection.
|
static |
Video detection mode.
|
static |
Face detect thread number.
|
static |
Face landmark thread number.
|
static |
Face track thread number.
|
static |
Face track thread number
|
static |
Record bitrate in bpsļ¼type: int, such as 3000000 for 3M biterate.
|
static |
Record GOP size, type: int, default is 30.
|
static |
Switches engine states asynchronously to reduce main thread's jam.
|
static |
Streaming Context is initialized asynchronously.
|
static |
Minimizes the memory occupation.
|
static |
Disable camera2 used.
|
static |
Disable capture.
|
static |
Turn on HDR display mode, if the device supports.
|
static |
Enable max cache cont limit of caption.
|
static |
Interrupt stop is used for all internal stop, such as stop between seek state and playback state.
|
static |
GIF file use motion mode.
|
static |
Disable hardware decoding.
|
static |
Drop frame mode in playback timeline (abandon)
|
static |
Supports 16K editting(only for pictures)
|
static |
Supports 4K video editting.
|
static |
Supports 8K edittingting(only for pictures)
|
static |
Create default caption context with 1280 * 720 resolution.
|
static |
Use system image reader.
|
static |
Decoding not using the SurfaceTexture.
|
static |
Records buddy video frame, used to detect face.
|
static |
Disable flip of front camera.
|
static |
Does not record audio.
|
static |
Not using the system built-in recorder to record.
|
static |
Enable takc picture.
|
static |
Uses face action to control particle special effects.
|
static |
Grabs frame from captured video (turnning on this flag would affect performance, turn on only when neccessary)
|
static |
Capture preview size aspect ratio use user input.
|
static |
Decreases the size of pipeline when engine is capturing.
|
static |
Resticts the preview video's size to system's built-in preview video size.
|
static |
buddy video frame in host, used to detect face
|
static |
buddy video frame in host after decoding, used to detect face
|
static |
|
static |
Disables the hardware encoder.
|
static |
disable MediaMuxer
|
static |
disable preloader on video source
|
static |
Flag for detecting AR texture on timeline disable downloaded.
|
static |
Not using input surface.
|
static |
The resolution of output video can be over timeline's resolution.
|
static |
Use low pipeline size to decrease CPU/GPU usage during compilation.
|
static |
Generate file only with audio stream.
|
static |
Generate file only with video stream.
|
static |
Truncat audio stream make sure no longer than the length of the video.
|
static |
Software audio encoder used.
|
static |
Enable variable frame rate export and the exported frame rate will change with the video frame rate.
|
static |
|
static |
|
static |
|
static |
|
static |
Interrupting the decoding thread without waiting for the decoding to complete and stopping quickly will result in the final picture may be incorrect.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Media file error.
|
static |
Cache all frames of caf file.
|
static |
buddy video frame in host, used to detect face
|
static |
buddy video frame in host after decoding, used to detect face
|
static |
Disable the frame dropping mode for playback. If this flag is not added, the SDK will ensure continuous audio playback. If the video rendering is complex and so on, it will use the frame dropping mode to ensure video and audio synchronization.
|
static |
Decreases the first frame lag of playback engine.
|
static |
disable preloader on video source
|
static |
Flag for detecting AR texture on timeline disable downloaded.
|
static |
Decreases the pipeline size of playback engine.
|
static |
Playback with speed compensation.
|
static |
Enable variable frame rate playback, and the playback frame rate will change with the video frame rate.
|
static |
Records without hardware encoder.
|
static |
disable MediaMuxer
|
static |
Does not use input surface.
|
static |
Flip horizontally input video frame.
|
static |
Video recorded is not rotated according to the capture device's orientation. (Note: only workds with STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER)
|
static |
Only records video streams to file, all audio streams would not be recorded.
|
static |
recording without fx, Remarkļ¼it has only effects when using the flags of STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER
|
static |
Fast stop when recording I-Frame-only video with software encoder, this could result in a discard of video frame.
|
static |
Records files that only include I-Frame. (Note: only works when using with STREAMING_ENGINE_CAPTURE_FLAG_DONT_USE_SYSTEM_RECORDER)
|
static |
Flag for faster scrubbing at the expense of some accuracy.
|
static |
buddy video frame in host, used to detect face
|
static |
buddy video frame in host after decoding, used to detect face
|
static |
Flag for detecting AR texture on timeline disable downloaded.
|
static |
Seek can be done without connecting to the LiveWindow.
|
static |
Shows the entire animated sticker effects.
|
static |
Shows the entire caption effects.
|
static |
Data only used for handeling buddy video captured's frame content.
|
static |
|
static |
Capture preview.
|
static |
Capture recording.
|
static |
Compiling file.
|
static |
Playback.
|
static |
Seeking.
|
static |
Engine stopped.
|
static |
Stops the engine asynchronously to avoid blocking main thread.
|
static |
Forces stop of compilation, resulting compiled file incomplete.
|
static |
Extremely high resolution for video capture.
|
static |
High resolution for video capture.
|
static |
Low resolution for video capture.
|
static |
Medium resolution for video capture.
|
static |
Super high resolution for video capture.
|
static |
Assigned video encoding format, hevc(h.256) is supported, default is h.264.
|
static |
Force RGBA pixel format on output buffer.
|
static |
Full-screen preview mode.
|
static |
Livewindow size preview mode.
|
static |
Sets on/off of the video stabilization mode to auto.
|
static |
Turns off the video anti-shake mode.
|
static |
Standard mode for video anti-shake mode.
|
static |
Anti-shake movie mode.