MeiCam SDK For Android
1.0.0
|
Streaming context. More...
Classes | |
interface | CaptureDeviceCallback |
Capture device callback interface. More... | |
class | CaptureDeviceCapability |
Description of capturing device's capabilities. More... | |
interface | CapturedVideoFrameGrabberCallback |
Gets callback interface of the captured preview. More... | |
interface | CaptureRecordingDurationCallback |
Callback interface for recording duration. More... | |
interface | CaptureRecordingStartedCallback |
Callback interface for starting capturing. More... | |
interface | CompileCallback |
Callback interface for timeline's compiling file. More... | |
interface | CompileCallback2 |
The second callback interface for timeline file compilation. More... | |
interface | HardwareErrorCallback |
Hardware error callback interface. 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... | |
interface | TimelineTimestampCallback |
Callback interface for timeline timestamp (note: Do not use this interface unless neccessary). More... | |
class | VerifyLicenseResult |
Public Member Functions | |
boolean | isSdkAuthorised () |
Checks if sdk is authorized. More... | |
float | detectEngineRenderFramePerSecond () |
从流媒体上下文中获取引擎当前的渲染速度,只在StartCapturePreview和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 | setCaptureRecordingStartedCallback (CaptureRecordingStartedCallback cb) |
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 | setPlaybackCallback2 (PlaybackCallback2 cb) |
Sets callback interface for timeline playback. 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... | |
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... | |
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... | |
boolean | setThemeEndingEnabled (boolean enable) |
Sets whether to display theme ending's special effects. More... | |
NvsTimeline | createTimeline (NvsVideoResolution videoEditRes, NvsRational videoFps, NvsAudioResolution audioEditRes) |
Creates timeline. More... | |
boolean | removeTimeline (NvsTimeline timeline) |
Removes timeline. 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... | |
void | setCustomCompileVideoHeight (int videoHeight) |
Sets the customized height for video. More... | |
int | getCustomCompileVideoHeight () |
Gets the customized video height. 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 | 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 | seekTimeline (NvsTimeline timeline, long timestamp, int videoSizeMode, int flags) |
定位某一时间戳的图像 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... | |
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... | |
void | stop () |
Stops the engine. More... | |
void | stop (int flags) |
Stops the engine. More... | |
void | clearCachedResources (boolean asynchronous) |
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... | |
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 | 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... | |
boolean | applyCaptureScene (String captureSceneId) |
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... | |
NvsAREffectContext | getAREffectContext () |
Gets the face effect context. 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... | |
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... | |
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 > | 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... | |
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... | |
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... | |
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 boolean | initHumanDetection (Context ctx, String modelFilePath, String licenseFilePath, int features) |
Initializes human detection mechanism. 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 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 |
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... | |
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. 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... | |
Configurations for recording | |
static final String | RECORD_BITRATE = "bitrate" |
Record bitrate. More... | |
static final String | RECORD_GOP_SIZE = "gopsize" |
Record GOP size. More... | |
Configurations for creating the timeline | |
static final String | COMPILE_BITRATE = "bitrate" |
Compile bitrate. More... | |
static final String | COMPILE_GOP_SIZE = "gopsize" |
Compile GOP size. More... | |
static final String | COMPILE_AUDIO_BITRATE = "audio bitrate" |
Compile audio bitrate. More... | |
static final String | COMPILE_LOSSLESS_AUDIO = "lossless audio" |
Whether to compile lossless audio. More... | |
static final String | COMPILE_OPTIMIZE_FOR_NETWORK_USE = "optimize-for-network-use" |
Whether to prepose the index table. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_PRESET = "software encorder preset" |
Preset parameters for software encoder. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_CRF = "software encorder crf" |
Preset crf parameters for software encoder. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_CRF_BITRATE_MAX = "software encorder crf bitrate max" |
Preset maximum bitrate for software encoder in crf mode. More... | |
static final String | COMPILE_SOFTWARE_ENCODER_MODE = "software encorder mode" |
Software encoder mode. More... | |
static final String | COMPILE_VIDEO_ENCODER_NAME = "video encoder name" |
Assigned video encoding format, hevc(h.256) is supported. More... | |
static final String | COMPILE_USE_OPERATING_RATE = "use operating rate" |
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... | |
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. 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 |
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 |
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 |
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... | |
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 |
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... | |
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 |
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 |
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 characteristics | |
static final int | HUMAN_DETECTION_FEATURE_FACE_LANDMARK = 1 |
Landmarks on human face. More... | |
static final int | HUMAN_DETECTION_FEATURE_FACE_ACTION = 2 |
Type of human detection data pack | |
static final int | HUMAN_DETECTION_DATA_TYPE_FAKE_FACE = 0 |
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 |
Speical flags when capturing video and audio information | |
static final int | AV_FILEINFO_EXTRA_NULL = 0 |
static final int | AV_FILEINFO_EXTRA_PIXELFORMAT = 1 |
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 |
Appends a beauty effect.
|
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 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 |
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 |
|
inlinestatic |
Destroys the streaming context object instance. note: it can be created again after destruction.
|
inlinestatic |
Turns off the human detection mechanism.
|
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. 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 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 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 |
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 an object of video frame retriever.
videoFilePath | Path of the original video |
|
inline |
从流媒体上下文中获取引擎当前的渲染速度,只在StartCapturePreview和PlaybackTimeline之后有效
|
inline |
Detects video file's I-Frame interval.
videoFilePath | File path of the vidio file |
|
inline |
Gets the list of all built-in 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 the face effect context.
|
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 the name of beauty effect.
|
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 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 |
Gets exposure compensation.
|
inlinestatic |
|
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. |
|
inlinestatic |
Checks if current SDK has an AR module.
|
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 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 an instance of streaming context object.
mainActivity | Main activity object from android. |
sdkLicenseFilePath | Specified SDK license file path. |
|
inlinestatic |
Initializes human detection mechanism.
ctx | The context object from android. |
modelFilePath | The path of face modle file. |
licenseFilePath | The path of authorization file. |
features | Human detection features field, please refer to [HUMAN_DETECTION_FEATURE_FACE_LANDMARK]. |
|
inline |
Inserts a skin beauty video effect.
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 |
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 |
Whether it's a rear capturing device.
captureDeviceIndex | Index of capturing device |
|
inline |
gets whether default caption mode is fade in and fade out.
|
inline |
get state of the flash light.
|
inline |
Checks if the recording has been paused.
|
inline |
Checks if sdk is authorized.
|
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 |
Gets font file's fontFamily.
fontFilePath | Font file path |
|
inline |
Removes all capture video effects.
|
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 |
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 |
定位某一时间戳的图像
timeline | 时间线 |
timestamp | 时间戳(单位微秒)。timestamp取值范围在[0,timeline.duration - 1]。传入其他值无效,seekTimeline会返回false,导致无法开启定位。 |
videoSizeMode | 图像预览模式。请参见视频大小预览模式 |
flags | 引擎定位的特殊标志。具体参见引擎定位标识 |
|
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 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 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 of recording duration.
cb | Callback interface for recording duration |
|
inline |
|
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 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 m_streamingContext.setCompileConfigurations(config); |
Cancels configurations and returns to default settings:
config.put(NvsStreamingContext.COMPILE_GOP_SIZE, null);
|
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 whether default caption mode is fade in and fade out.
fade | whether is fade in and fade out. |
|
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 the callback interface for timeline playback.
cb | Callback interface for timeline playback |
|
inline |
Sets callback interface for timeline playback.
cb | 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 |
Sets whether to display theme ending's special effects.
|
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 |
|
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 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. Note: .mov is recommended as the output format. |
|
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. |
|
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 |
Sets which the flash light is on/off.
flashOn | whether the flash light is on or not |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Capture device's error, the server died.
|
static |
Unknown error with the capturing device.
|
static |
Compile audio bitrate.
|
static |
Compile bitrate.
|
static |
High bitrate for video compiled.
|
static |
Low bitrate for video compiled.
|
static |
Medium bitrate for video compiled.
|
static |
Compile GOP size.
|
static |
Whether to compile lossless audio.
|
static |
Whether to prepose the index table.
|
static |
Preset crf parameters for software encoder.
|
static |
Preset maximum bitrate for software encoder in crf mode.
|
static |
Software encoder mode.
|
static |
Preset parameters for software encoder.
|
static |
使用operating rate
|
static |
Assigned video encoding format, hevc(h.256) is supported.
|
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.
|
static |
Fake face data pack type
|
static |
Actions of human face
|
static |
Landmarks on human face.
|
static |
Record bitrate.
|
static |
Record GOP size.
|
static |
Switches engine states asynchronously to reduce main thread's jam.
|
static |
Minimizes the memory occupation.
|
static |
Disable hardware decoding.
|
static |
Supports 4K video editting.
|
static |
Supports 8K edittingting(only for pictures)
|
static |
Decoding not using the SurfaceTexture
|
static |
Records buddy video frame.
|
static |
Does not record audio.
|
static |
Not using the system built-in recorder to record.
|
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 |
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 |
Disables the hardware encoder.
|
static |
Not using input surface.
|
static |
Generate file only with audio stream.
|
static |
Generate file only with video stream.
|
static |
|
static |
|
static |
|
static |
|
static |
Media file error.
|
static |
Decreases the first frame lag of playback engine
|
static |
Decreases the pipeline size of playback engine.
|
static |
Records without hardware encoder.
|
static |
Does not use input surface
|
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 |
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 |
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 |
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 |
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