MeiCam SDK For iOS  3.11.2
Instance Methods | Class Methods | Properties | List of all members
NvsStreamingContext Class Reference

Streaming context. More...

#import <NvsStreamingContext.h>

Inheritance diagram for NvsStreamingContext:

Instance Methods

(BOOL) - preloadEffectResources
 Preload effect resources. More...
 
(EAGLSharegroup *) - getEAGLSharegroup
 Gets the EAGLSharegroup object used by the engine from the streaming context. More...
 
(float) - detectEngineRenderFramePerSecond
 Get the current rendering speed of the engine from the streaming context that it's only valid after startCapturePreview and playbackTimeline. More...
 
(NvsAVFileInfo *) - getAVFileInfo:
 Gets audio and video informations of a file. More...
 
(NvsAVFileInfo *) - getAVFileInfoExtra:extraFlag:
 Gets audio and video information of a file. More...
 
(NvsAVFileInfo *) - getAVFileInfo:extraFlag:withError:
 Gets detailed information of the audio/video file. More...
 
(int) - detectVideoFileKeyframeInterval:
 Detects the I frame interval of video files. More...
 
(BOOL) - setDefaultThemeEndingLogoImageFilePath:
 Sets the default theme logo image path. More...
 
(NSString *) - getDefaultThemeEndingLogoImageFilePath
 Gets the default theme logo image path. More...
 
(BOOL) - setThemeEndingEnabled:
 Sets whether the logo effect at the end of the theme is displayed or not. More...
 
(int) - getEngineHDRCaps
 Get HDR capability. More...
 
(void) - setAudioVUMeterEnabled:
 Enable DB value of audio output. More...
 
(void) - setEnableAudioSampleNotify:
 Enable DB value of audio output. More...
 
(NSString *) - registerFontByFilePath:
 Gets the fontFamily of the font file. More...
 
(NSArray *) - getFontInfoByFilePath:
 Gets font file's font information. More...
 
(void) - setColorGainForSDRToHDR:
 Sets the color gain during SDR to HDR conversion. More...
 
(float) - getColorGainForSDRToHDR
 gets the color gain during SDR to HDR conversion. More...
 
(BOOL) - exportTemplateInfo:timeline:requestedAspectRatio:
 Export template information. More...
 
(BOOL) - generateTemplatePackage:innerAssetDir:templateOutputDir:
 Generate template asset package. More...
 
(void) - setTemplate:customResourceDir:
 set templates custom resource folders More...
 
(BOOL) - exportProjectInfo:timeline:requestedAspectRatio:
 Export project information. More...
 
(BOOL) - generateProjectPackage:innerAssetDir:projectOutputDir:
 Generate project asset package. More...
 
(NvsTimeline *) - createTimeline:videoFps:audioEditRes:
 Creates timeline. More...
 
(NvsTimeline *) - createTimeline:videoFps:audioEditRes:flags:
 Creates timeline. More...
 
(NvsTimeline *) - createTimeline:videoFps:audioEditRes:bitDepth:flags:
 Creates timeline. More...
 
(NvsTimeline *) - createTimeline:templateFootages:
 Creates timeline. More...
 
(NvsTimeline *) - createTimeline:templateFootages:flags:
 Creates timeline. More...
 
(NvsTimeline *) - createTimeline:templateFootages:flags:videoFps:audioEditRes:
 Creates timeline. More...
 
(NvsTimeline *) - loadProject:resourceDir:
 Creates timeline. More...
 
(BOOL) - removeTimeline:
 Removes timeline. More...
 
(NvsStreamingEngineState- getStreamingEngineState
 Gets the engine state. More...
 
(int64_t) - getTimelineCurrentPosition:
 Gets the current position of the timeline (in microseconds). More...
 
(BOOL) - compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:flags:
 Compiles the video files by the timeline. More...
 
(BOOL) - compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:compileConfigurations:flags:
 Compiles the video files by the timeline. More...
 
(BOOL) - compilePassthroughTimeline:outputFilePath:compileConfigurations: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...
 
(BOOL) - pauseCompiling
 Pause compiling timeline. More...
 
(BOOL) - resumeCompiling
 Resume compiling timeline. More...
 
(BOOL) - isCompilingPaused
 Check if compiling timeline is paused. More...
 
(BOOL) - pausePlayback
 Pause playback timeline. More...
 
(BOOL) - resumePlayback
 Resume playback timeline. More...
 
(BOOL) - isPlaybackPaused
 Check if playback timeline is paused. More...
 
(void) - setCustomCompileVideoHeight:
 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. More...
 
(unsigned int) - getCustomCompileVideoHeight
 Gets the custom video height. More...
 
(BOOL) - connectTimeline:withLiveWindow:
 Connects timeline with live window. More...
 
(BOOL) - connectTimeline:withVideoFrameReceiver:
 Connects timeline with video frame receiver. More...
 
(BOOL) - seekTimeline:timestamp:videoSizeMode:flags:
 Seeks to a certain timestamp of images. More...
 
(BOOL) - seekTimeline:timestamp:proxyScale:flags:
 Seeks to a certain timestamp of images. More...
 
(UIImage *) - grabImageFromTimeline:timestamp:proxyScale:
 Gets the image in the timeline of a certain timestamp. For details, refer to The Topic of Video Frame Image Extraction. More...
 
(UIImage *) - grabImageFromTimeline:timestamp:proxyScale:flags:
 Gets the image in the timeline of a certain timestamp. For details, refer to The Topic of Video Frame Image Extraction. More...
 
(BOOL) - grabImageFromTimelineAsync:timestamp:proxyScale: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...
 
(BOOL) - playbackTimeline:startTime:endTime:videoSizeMode:preload:flags:
 Playback timeline. More...
 
(BOOL) - playbackTimeline:startTime:endTime:proxyScale:preload:flags:
 Playback timeline. More...
 
(void) - stop
 Stops the engine. More...
 
(void) - stop:
 tops the engine More...
 
(void) - clearCachedResources:
 Clears the cached resources. More...
 
(void) - clearCachedResources:flags:
 Clears the cached resources. More...
 
(unsigned int) - captureDeviceCount
 Count of captureing devices. More...
 
(BOOL) - isCaptureDeviceBackFacing:
 Whether it's a rear capturing device. More...
 
(NvsCaptureDeviceCapability *) - getCaptureDeviceCapability:
 Obtains the capability description object of the capture device. More...
 
(BOOL) - connectCapturePreviewWithLiveWindow:
 Connects the captured preview with live window. More...
 
(BOOL) - connectCapturePreviewWithVideoFrameReceiver:
 Connects the captured preview with video frame receiver. More...
 
(void) - setUserWatermarkForCapture:displayWidth:displayHeight:opacity:position:marginX:marginY:
 Adds a custom watermark for capturing video. More...
 
(void) - removeUserWatermarkForCapture
 Removes custom watermark which added for capturing video. More...
 
(BOOL) - startCapturePreview:videoResGrade:flags:aspectRatio:
 Starts the capture preview. More...
 
(BOOL) - startBufferCapturePreview:height:fps:rotation:flipHorizontally:
 Starts the capture preview with inputting buffer mode. More...
 
(BOOL) - sendBufferToCapturePreview:
 Transfers the input buffer to capture preivew. More...
 
(BOOL) - sendAudioSamplesToCapturePreview:
 Transfers the input buffer to capture preivew. More...
 
(NvsSize- getCapturePreviewVideoSize:
 Gets the capture preview resolution. More...
 
(NvsColor- sampleColorFromCapturedVideoFrame:
 Samples the capture device's video frame. More...
 
(void) - startAutoFocus:
 Starts autofocus. More...
 
(void) - cancelAutoFocus
 Cancels the ongoing autofocus. More...
 
(void) - startContinuousFocus
 Starts continuous focus. More...
 
(void) - startAutoExposure:
 Starts automatic exposure adjustment. More...
 
(void) - setZoomFactor:
 Sets the zoom factor. More...
 
(float) - getZoomFactor
 Gets the zoom factor. More...
 
(void) - toggleFlash:
 Sets which the flash light is on/off. More...
 
(BOOL) - isFlashOn
 get state of the flash light. More...
 
(void) - toggleFlashMode:
 Sets the flash mode. More...
 
(NvsCameraFlashMode- getFlashMode
 get state of the flash light. More...
 
(VideoStabilizationFlag- getVideoStabilization
 Gets the current video’s stabilization flag. More...
 
(void) - setVideoStabilization:
 Sets video stabilization. More...
 
(void) - setExposureBias:
 Set exposure compensation. More...
 
(float) - getExposureBias
 Gets exposure compensation. More...
 
(NvsCaptureVideoFx *) - appendBuiltinCaptureVideoFx:
 Appends a built-in capture video effect. More...
 
(NvsCaptureVideoFx *) - insertBuiltinCaptureVideoFx:withInsertPosition:
 Inserts a built-in video capture effect. More...
 
(NvsCaptureVideoFx *) - appendPackagedCaptureVideoFx:
 Appends a package capture effectx. More...
 
(NvsCaptureVideoFx *) - insertPackagedCaptureVideoFx:withInsertPosition:
 Inserts a package capture effect. More...
 
(NvsCaptureVideoFx *) - appendCustomCaptureVideoFx:
 Appends a custom capture video effect. More...
 
(NvsCaptureVideoFx *) - insertCustomCaptureVideoFx:withInsertPosition:
 Inserts a custom capture video effect. More...
 
(NvsCaptureVideoFx *) - appendBeautyCaptureVideoFx
 Appends a beauty effect. More...
 
(NvsCaptureVideoFx *) - insertBeautyCaptureVideoFx:
 Inserts a skin beauty video effect. More...
 
(BOOL) - removeCaptureVideoFx:
 Removes a certain capture video effect indicated by its index. More...
 
(void) - removeAllCaptureVideoFx
 Removes all capture video effects. More...
 
(unsigned int) - getCaptureVideoFxCount
 Gets the count of video effects. More...
 
(NvsCaptureVideoFx *) - getCaptureVideoFxByIndex:
 Gets a certain capture video effect. More...
 
(NvsCaptureAudioFx *) - appendBuiltinCaptureAudioFx:
 Appends a built-in capture audio effect. More...
 
(NvsCaptureAudioFx *) - insertBuiltinCaptureAudioFx:withInsertPosition:
 Inserts a built-in audio capture effect. More...
 
(BOOL) - removeCaptureAudioFx:
 Removes a certain capture audio effect indicated by its index. More...
 
(void) - removeAllCaptureAudioFx
 Removes all capture audio effects. More...
 
(unsigned int) - getCaptureAudioFxCount
 Gets the count of audio effects. More...
 
(NvsCaptureAudioFx *) - getCaptureAudioFxByIndex:
 Gets a certain capture audio effect. More...
 
(NvsCaptureAnimatedSticker *) - appendCaptureAnimatedSticker:duration:animatedStickerPackageId:
 Appends a animated sticker. More...
 
(NvsCaptureAnimatedSticker *) - insertCaptureAnimatedSticker:duration:animatedStickerPackageId:insertPosition:
 Appends a animated sticker. More...
 
(NvsCaptureAnimatedSticker *) - addCustomCaptureAnimatedSticker:duration:animatedStickerPackageId:customImagePath:
 Add a custom animated sticker on capture. More...
 
(NvsCaptureAnimatedSticker *) - insertCustomCaptureAnimatedSticker:duration:animatedStickerPackageId:customImagePath:insertPosition:
 Insert a animated sticker. More...
 
(BOOL) - removeCaptureAnimatedSticker:
 Removes a certain capture animated sticker indicated by its index. More...
 
(void) - removeAllCaptureAnimatedSticker
 Removes all capture animated sticker. More...
 
(unsigned int) - getCaptureAnimatedStickerCount
 Gets the count of capture animated sticker. More...
 
(NvsCaptureAnimatedSticker *) - getCaptureAnimatedStickerByIndex:
 Gets a certain capture animated sticker. More...
 
(NvsCaptureCompoundCaption *) - appendCaptureCompoundCaption:duration:compoundCaptionPackageId:
 Appends a compound caption. More...
 
(NvsCaptureCompoundCaption *) - insertCaptureCompoundCaption:duration:compoundCaptionPackageId:insertPosition:
 Insert a compound caption. More...
 
(BOOL) - removeCaptureCompoundCaption:
 Removes a certain capture compound caption indicated by its index. More...
 
(void) - removeAllCaptureCompoundCaption
 Removes all capture compound caption. More...
 
(unsigned int) - getCaptureCompoundCaptionCount
 Gets the count of capture compound caption. More...
 
(NvsCaptureCompoundCaption *) - getCaptureCompoundCaptionByIndex:
 Gets a certain capture compound caption. More...
 
(NvsCaptureCaption *) - appendCaptureCaption:offsetTime:duration:captionStylePackageId:
 Appends a caption. More...
 
(NvsCaptureCaption *) - insertCaptureCaption:offsetTime:duration:captionStylePackageId:insertPosition:
 Insert a caption. More...
 
(NvsCaptureCaption *) - appendCaptureModularCaption:offsetTime:duration:
 Appends a modular caption. More...
 
(NvsCaptureCaption *) - insertCaptureModularCaption:offsetTime:duration:insertPosition:
 Insert a modular caption. More...
 
(BOOL) - removeCaptureCaption:
 Removes a certain capture caption indicated by its index. More...
 
(void) - removeAllCaptureCaption
 Removes all capture caption. More...
 
(unsigned int) - getCaptureCaptionCount
 Gets the count of capture caption. More...
 
(NvsCaptureCaption *) - getCaptureCaptionByIndex:
 Gets a certain capture caption. More...
 
(BOOL) - applyCaptureScene:
 Apply a capture scene resource package to the capture device. More...
 
(BOOL) - applyCaptureScene:captureSceneInfo:
 Apply a capture scene resource package to the capture device. More...
 
(NSString *) - getCurrentCaptureSceneId
 Gets the ID of the current capture scene resource package. More...
 
(void) - removeCurrentCaptureScene
 Removes the current capture scene. More...
 
(BOOL) - startRecording:
 Starts recording. Please refer to Method of Recording Video. More...
 
(BOOL) - startRecording:withFlags:
 Starts recording. Please refer to Method of Recording Video. More...
 
(BOOL) - startRecording:withFlags:withRecordConfigurations:
 Starts recording. Please refer to Method of Recording Video. More...
 
(BOOL) - startRecordingWithFx:
 Starts to record, and the recorded content contains all the special effects which applied. More...
 
(BOOL) - startRecordingWithFx:withFlags:
 Starts to record, and the recorded content contains all the special effects which applied. More...
 
(BOOL) - startRecordingWithFx:withFlags:withRecordConfigurations:
 Starts recording. Please refer to Method of Recording Video. More...
 
(void) - setAudioSampleInfoForCallback:
 Set audio sample information for callback of capturing. More...
 
(void) - stopRecording
 Stops recording. More...
 
(BOOL) - 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...
 
(BOOL) - 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...
 
(BOOL) - isRecordingPaused
 Checks if the recording has been paused. More...
 
(BOOL) - takePicture:
 take a picture with the max resolution of camera which matches the preview resolution best More...
 
(NSArray *) - getAllBuiltinVideoFxNames
 Gets the list of all built-in video effect names. More...
 
(NSArray *) - getAllBuiltinAudioFxNames
 Gets the list of all built-in audio effect names. More...
 
(NSArray *) - getAllBuiltinVideoTransitionNames
 Gets the list of all built-in video transitions’ names. More...
 
(NSArray *) - getAllBuiltinCaptureVideoFxNames
 Gets the list of all built-in capture video effects’ names. More...
 
(NSString *) - getBeautyVideoFxName
 Gets the name of beauty effect. More...
 
(NSString *) - getDefaultVideoTransitionName
 Gets the default video transition’s name. More...
 
(void) - setDefaultAudioTransitionName:
 Sets the default audio transition’s name. More...
 
(NvsFxDescription *) - getVideoFxDescription:
 Gets the description of a video effect. More...
 
(NvsFxDescription *) - getAudioFxDescription:
 Gets the description of an audio effect. More...
 
(NvsVideoFrameRetriever *) - createVideoFrameRetriever:
 Creates an object of video frame retriever. More...
 
(NvsStreamingContext *) - createAuxiliaryStreamingContext:
 Creates an object of auxiliary streaming context. More...
 
(void) - destoryAuxiliaryStreamingContext:
 destory auxiliary streaming context. More...
 
(void) - setAudioOutputDeviceVolume:
 set volume to audio output device. More...
 
(void) - setCaptureFps:
 set camera device capture fps. More...
 
(void) - setImageReaderCount:
 set image reader count. More...
 
(void) - setDefaultImageClipDuration:
 Sets the default image clip duration. More...
 
(long) - calcDurationAfterCurvesVariableSpeed:
 calc the duration after use curves variable speed.note: the origin duration is the curves's last endpoint.x-first endpoint.x More...
 
(BOOL) - isBlackFrame:
 check the image is a black image or not. More...
 
(BOOL) - getAECEnabled
 Get whether AEC(Acoustic Echo Cancellation) is enabled. More...
 
(void) - setAECEnabled:
 Set whether to enable AEC(Acoustic Echo Cancellation).Note: Each time you startCapturePreview, this will be set to off, which means that if you want to use echo cancellation, you will need to enable it again after each preview. More...
 

Class Methods

(void) + getSdkVersion:minorVersion:revisionNumber:
 Gets the version information of Meishe SDK. More...
 
(void) + setDebugLevel:
 Sets Debug level. More...
 
(void) + setSaveDebugMessagesToFile:
 Sets whether to write debugging information of the SDK to the file. More...
 
(BOOL) + verifySdkLicenseFile:
 Verifies the SDK license file. Note: The license file interface must be called before the NvsStreamingContext is initialized. More...
 
(NvsStreamingContext *) + sharedInstance
 Gets a unique instance of the streaming context. More...
 
(NvsStreamingContext *) + sharedInstanceWithFlags:
 Gets a unique instance of the streaming context. For details, please refer to 4k Video Editing. More...
 
(void) + destroyInstance
 Destroys the streaming context instance. More...
 
(int) + hasARModule
 Checks if the current SDK contains an AR module. More...
 
(BOOL) + initHumanDetection:licenseFilePath:features:
 Initializes the human body detection mechanism.Only once needed. More...
 
(BOOL) + initHumanDetectionExt:licenseFilePath:features:
 Human detection initialization extension. must called after initHumanDetection. More...
 
(BOOL) + setupHumanDetectionData:dataFilePath:
 Initializes human detection data packets. More...
 
(void) + closeHumanDetection
 Close the human detection mechanism. More...
 
(NSString *) + getLogFileDirectory
 Gets the directory path of log file. More...
 
(BOOL) + functionalityAuthorised:
 Verifies whether a feature is available or not. More...
 
(void) + setSpecialCameraDeviceType:
 set special camera device type to sdk. More...
 
(void) + setMaxCafCacheMemorySize:
 set the maximum cache for CAF. More...
 
(void) + setMaxImageReaderCount:
 set max image reader count. More...
 
(void) + setFxPluginBundlePathList:
 set the path of the effects plug-in. More...
 
(void) + setMaxAudioReaderCount:
 set max audio reader count. More...
 
(void) + setMaxReaderCount:
 set max file reader count. More...
 
(void) + setMaxSoftReaderCount:
 set max soft file reader count. More...
 
(void) + setMaxIconReaderCount:
 set max icon reader count. More...
 
(void) + setStreamingPoolSizeInByte:
 set max image reader count. More...
 
(void) + setMaxEditCaptionCachedContextCount:
 Set the maximum number of caption context cached during editing. More...
 
(void) + setMaxCompileCaptionCachedContextCount:
 Set the maximum number of caption context cached during compile. More...
 

Properties

id< NvsStreamingContextDelegatedelegate
 
NvsAssetPackageManagerassetPackageManager
 Package manager. More...
 
float compileVideoBitrateMultiplier
 Bitrate multiplier of compiling video. More...
 
float recordVideoBitrateMultiplier
 Bitrate multiplier of recording video. More...
 
BOOL defaultCaptionFade
 Whether the default caption effect is fade in and out. More...
 
id< NvsImageGrabberDelegateimageGrabberDelegate
 
NSMutableDictionary * compileConfigurations
 Sets the timeline configurations, which stay valid once set. For key values in NSMutableDictionary, please refer to Configuration of Compilation Timeline For instance: NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_COMPILE_GOP_SIZE]; //If set to 1 then a I-frame-only video is compiled. [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_COMPILE_BITRATE]; // 10M bps [config setValue:[NSNumber numberWithInteger:256000] forKey:NVS_COMPILE_AUDIO_BITRATE]; // Sets the audio bitrate to 256Kbps [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_LOSSLESS_AUDIO]; //Sets to generate lossless audio [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_OPTIMIZE_FOR_NETWORK_USE]; //Sets index table to prepose _streamingContext.compileConfigurations = config; Cancels configurations and returns to default settings:[_streamingContext.compileConfigurations setValue:nil forKey:NVS_COMPILE_GOP_SIZE];. More...
 

Detailed Description

Streaming context.

The streaming context class is considered as the entry of the entire SDK framework. During development, the NvsStreamingContext class uses the static sharedInstance (NvsStreamingContext) interface to create an unique streaming context instance. Through this instantce object, we can turn on the recording device to record videos, adding effects to recorded 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 the real-time preview window which 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,users have to first install the package and obtain packageID after installation,before adding resources packages (recording effects package, scene resources package and so on),. For built-in special effects, users only need to obtain the name of the effect when using it.
In SDK interfaces, users need to use the full pathway when importing resources or authorizations.

Warning
For NvsStreamingContext class, all public APIs must be used in the UI thread except getAVFileInfo(), detectVideoFileKeyframeInterval(),createVideoFrameRetriever(), which can be used across threads.

Method Documentation

◆ addCustomCaptureAnimatedSticker:duration:animatedStickerPackageId:customImagePath:

- (NvsCaptureAnimatedSticker *) addCustomCaptureAnimatedSticker: (int64_t)  inPoint
duration: (int64_t)  duration
animatedStickerPackageId: (NSString *)  animatedStickerPackageId
customImagePath: (NSString *)  customImagePath 

Add a custom animated sticker on capture.

Parameters
inPointThe in point of custom animated sticker on the timeline (in microseconds)
durationThe duration of custom animation sticker which displayed (in microseconds)
animatedStickerPackageIdAnimated sticker package Id
customImagePathPath of custom animated sticker image(It can be a jpg, png image, or a dynamic caf format image supported by Meishe sdk)
Returns
Return the NvsCaptureAnimatedSticker object.
It will return nil in the following situations:
1. No animated sticker function authorization;
2. The animatedStickerPackageId is empty or nil;
3. The animatedSticker has not install successed;
4. If inPoint is less than 0, or duration is not greater than 0.
Note: If the return value is not nil, you still cannot see the sticker effect, you need to check whether the customImagePath actually exists.
See also
- removeCaptureAnimatedSticker:
Since
3.2.0

◆ appendBeautyCaptureVideoFx

- (NvsCaptureVideoFx *) appendBeautyCaptureVideoFx

Appends a beauty effect.

Returns
Returns the Appended NvsCaptureVideoFx object.
See also
- insertBeautyCaptureVideoFx:

◆ appendBuiltinCaptureAudioFx:

- (NvsCaptureAudioFx *) appendBuiltinCaptureAudioFx: (NSString *)  audioFxName

Appends a built-in capture audio effect.

Parameters
audioFxNameaudio effect name. To get the audio effect name, please refer to getAllBuiltinCaptureAudioFxNames() or The List of Built-in Effect Name.
Returns
Returns the appended NvsCaptureAudioFx object.
See also
insertBuiltinCaptureVideoFx
Since
2.21.0

◆ appendBuiltinCaptureVideoFx:

- (NvsCaptureVideoFx *) appendBuiltinCaptureVideoFx: (NSString *)  videoFxName

Appends a built-in capture video effect.

Parameters
videoFxNameVideo effect name. To get the video effect name, please refer to getAllBuiltinCaptureVideoFxNames() or The List of Built-in Effect Name.
Returns
Returns the appended NvsCaptureVideoFx object.
See also
- insertBuiltinCaptureVideoFx:withInsertPosition:

◆ appendCaptureAnimatedSticker:duration:animatedStickerPackageId:

- (NvsCaptureAnimatedSticker *) appendCaptureAnimatedSticker: (int64_t)  offsetTime
duration: (int64_t)  duration
animatedStickerPackageId: (NSString *)  animatedStickerPackageId 

Appends a animated sticker.

Parameters
offsetTimeanimated sticker's offset time.
durationanimated sticker's duration.
animatedStickerPackageIdAnimated sticker package Id.
Returns
Returns the appended NvsCaptureAnimatedSticker object.
It will return null in the following situations:
1. No animated sticker function authorization;
2. The animatedStickerPackageId is empty or null;
3. The animatedSticker has not install successed;
See also
insertCaptureAnimatedSticker
Since
2.21.0

◆ appendCaptureCaption:offsetTime:duration:captionStylePackageId:

- (NvsCaptureCaption *) appendCaptureCaption: (NSString *)  captionText
offsetTime: (int64_t)  offsetTime
duration: (int64_t)  duration
captionStylePackageId: (NSString *)  captionStylePackageId 

Appends a caption.

Parameters
captionTextText of caption
offsetTimecatpion's offset time.
durationcatpion's duration.
captionStylePackageIdCaption style package Id.If it does not exist, you can pass an empty string or null.
Returns
Returns the appended NvsCaptureCaption object.
It will return null in the following situations:
1. No compound caption function authorization;
See also
insertCaptureCompoundCaption
Since
2.21.0

◆ appendCaptureCompoundCaption:duration:compoundCaptionPackageId:

- (NvsCaptureCompoundCaption *) appendCaptureCompoundCaption: (int64_t)  offsetTime
duration: (int64_t)  duration
compoundCaptionPackageId: (NSString *)  compoundCaptionPackageId 

Appends a compound caption.

Parameters
offsetTimecompound catpion's offset time.
durationcompound catpion's duration.
compoundCaptionPackageIdCaption style package Id.If it does not exist, you can pass an empty string or null.
Returns
Returns the appended NvsCaptureCompoundCaption object.
It will return null in the following situations:
1. No compound caption function authorization;
See also
insertCaptureCompoundCaption
Since
2.21.0

◆ appendCaptureModularCaption:offsetTime:duration:

- (NvsCaptureCaption *) appendCaptureModularCaption: (NSString *)  captionText
offsetTime: (int64_t)  offsetTime
duration: (int64_t)  duration 

Appends a modular caption.

Parameters
captionTextText of caption
offsetTimecatpion's offset time.
durationcatpion's duration.
Returns
Returns the appended NvsCaptureCaption object.
It will return null in the following situations:
1. No compound caption function authorization;
See also
insertCaptureCompoundCaption
Since
2.21.0

◆ appendCustomCaptureVideoFx:

- (NvsCaptureVideoFx *) appendCustomCaptureVideoFx: (id< NvsCustomVideoFxRenderer >)  customVideoFxRender

Appends a custom capture video effect.

Parameters
customVideoFxRenderInterface of user-implemented custom video effect renderer
Returns
Returns the appended NvsCaptureVideoFx object.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
Since
1.7.0

◆ appendPackagedCaptureVideoFx:

- (NvsCaptureVideoFx *) appendPackagedCaptureVideoFx: (NSString *)  videoFxPackageId

Appends a package capture effectx.

Parameters
videoFxPackageIdVideo effect package ID
Returns
Returns the appended NvsCaptureVideoFx object.
See also
- insertPackagedCaptureVideoFx:withInsertPosition:

◆ applyCaptureScene:

- (BOOL) applyCaptureScene: (NSString *)  captureSceneId

Apply a capture scene resource package to the capture device.

Parameters
captureSceneIdThe ID of capture scene resource package
Returns
Returns a BOOL value. A value of YES will result in a successful application and NO means it fails to apply.
Since
1.2.0
See also
- getCurrentCaptureSceneId
- removeCurrentCaptureScene

◆ applyCaptureScene:captureSceneInfo:

- (BOOL) applyCaptureScene: (NSString *)  captureSceneId
captureSceneInfo: (NvsCaptureSceneInfo *)  info 

Apply a capture scene resource package to the capture device.

Parameters
captureSceneIdThe ID of capture scene resource package
infoResource information to be replaced
Returns
Returns a BOOL value. A value of YES will result in a successful application and NO means it fails to apply.
Since
3.2.0
See also
- getCurrentCaptureSceneId
- removeCurrentCaptureScene

◆ calcDurationAfterCurvesVariableSpeed:

- (long) calcDurationAfterCurvesVariableSpeed: (NSString *)  curvesString

calc the duration after use curves variable speed.note: the origin duration is the curves's last endpoint.x-first endpoint.x

Parameters
curvesStringdescription 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坐标值之差

Parameters
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组端点及其控制点坐标信息。
Since
2.17.0

◆ cancelAutoFocus

- (void) cancelAutoFocus

Cancels the ongoing autofocus.

See also
- startAutoFocus:

◆ captureDeviceCount

- (unsigned int) captureDeviceCount

Count of captureing devices.

Returns
Returns the count of captureing devices.

◆ clearCachedResources:

- (void) clearCachedResources: (BOOL)  asynchronous

Clears the cached resources.

Parameters
asynchronousWhether it's Asynchronous or not.

◆ clearCachedResources:flags:

- (void) clearCachedResources: (BOOL)  asynchronous
flags: (int)  flags 

Clears the cached resources.

Parameters
asynchronousWhether it's Asynchronous or not.

◆ closeHumanDetection

+ (void) closeHumanDetection

Close the human detection mechanism.

Since
2.5.0
See also
initHumanDetection

◆ compilePassthroughTimeline:outputFilePath:compileConfigurations:flags:

- (BOOL) compilePassthroughTimeline: (NvsTimeline *)  timeline
outputFilePath: (NSString *)  outputFilePath
compileConfigurations: (NSMutableDictionary *)  configurations
flags: (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.

Parameters
timelineTimeline
outputFilePathThe path of output file.
configurationsthe timeline configurations,only supports NVS_COMPILE_CREATION_TIME, NVS_COMPILE_OPTIMIZE_FOR_NETWORK_USE, NVS_COMPILE_METADATADESCRIPTION
flagsSpecial flags for output file. If there is no special requirements please input 0.
Returns
Returns a boolean value. Note: compiling timeline to file is an asynchronous operation. Returns true if compile successful and false if compile failed.
Warning
This interface will trigger streaming engine to jump to stop state. For detailed situations please refer to the state changes of engine.
Since
3.4.0
See also
seekTimeline
playbackTimeline
compileTimeline

◆ compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:compileConfigurations:flags:

- (BOOL) compileTimeline: (NvsTimeline *)  timeline
startTime: (int64_t)  startTime
endTime: (int64_t)  endTime
outputFilePath: (NSString *)  outputFilePath
videoResolutionGrade: (NvsCompileVideoResolutionGrade videoResolutionGrade
videoBitrateGrade: (NvsCompileVideoBitrateGrade videoBitrateGrade
compileConfigurations: (NSMutableDictionary *)  compileConfigurations
flags: (int)  flags 

Compiles the video files by the timeline.

Parameters
timelineTimeline
startTimeStart time (in microseconds). The start time value ranges from [0, timeline.duration - 1], and other values are invalid.
endTimeEnd time (in microseconds). The value of endTime is in (startTime, timeline.duration], and the other values are invalid.
outputFilePathThe output video file path. Note: Currently only .mov format is supported.
videoResolutionGradeResolution level of video output.
videoBitrateGradeThe bitrate of the video output. The video output bitrate level is divided into low bitrate, medium bitrate, and 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 bitrates are as follows:
Bitrates for NvsCompileBitrateGradeLow, NvsCompileBitrateGradeMedium, NvsCompileBitrateGradeHigh are 2.2Mbps, 3.3Mbps and 6Mbps separately.s
configurationsthe timeline configurations. For key values in NSMutableDictionary please refer to Configuration of compiling timeline
flagsSpecial flag for video output (temporarily set to 0 only).Please refer to NvsStreamingEngineCompileFlag] (NvsStreamingEngineCompileFlag).
Returns
Returns the BOOL value. Note: Compiling timeline to video files is an asynchronous operation. If the return value is YES, compiling video startups successfully, otherwise it fails to startup.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
Since
3.1.0
See also
- seekTimeline:timestamp:videoSizeMode:flags:
- playbackTimeline:startTime:endTime:videoSizeMode:preload:flags:

◆ compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:flags:

- (BOOL) compileTimeline: (NvsTimeline *)  timeline
startTime: (int64_t)  startTime
endTime: (int64_t)  endTime
outputFilePath: (NSString *)  outputFilePath
videoResolutionGrade: (NvsCompileVideoResolutionGrade videoResolutionGrade
videoBitrateGrade: (NvsCompileVideoBitrateGrade videoBitrateGrade
flags: (int)  flags 

Compiles the video files by the timeline.

Parameters
timelineTimeline
startTimeStart time (in microseconds). The start time value ranges from [0, timeline.duration - 1], and other values are invalid.
endTimeEnd time (in microseconds). The value of endTime is in (startTime, timeline.duration], and the other values are invalid.
outputFilePathThe output video file path. Note: Currently only .mov format is supported.
videoResolutionGradeResolution level of video output.
videoBitrateGradeThe bitrate of the video output. The video output bitrate level is divided into low bitrate, medium bitrate, and 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 bitrates are as follows:
Bitrates for NvsCompileBitrateGradeLow, NvsCompileBitrateGradeMedium, NvsCompileBitrateGradeHigh are 2.2Mbps, 3.3Mbps and 6Mbps separately.s
flagsSpecial flag for video output (temporarily set to 0 only).Please refer to NvsStreamingEngineCompileFlag] (NvsStreamingEngineCompileFlag).
Returns
Returns the BOOL value. Note: Compiling timeline to video files is an asynchronous operation. If the return value is YES, compiling video startups successfully, otherwise it fails to startup.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- seekTimeline:timestamp:videoSizeMode:flags:
- playbackTimeline:startTime:endTime:videoSizeMode:preload:flags:

◆ connectCapturePreviewWithLiveWindow:

- (BOOL) connectCapturePreviewWithLiveWindow: (NvsLiveWindow *)  liveWindow

Connects the captured preview with live window.

Parameters
liveWindowLive window for previewing
Returns
Returns the BOOL value. YES indicates a successful connection, and NO means the opposite.
See also
- connectTimeline:withLiveWindow:

◆ connectCapturePreviewWithVideoFrameReceiver:

- (BOOL) connectCapturePreviewWithVideoFrameReceiver: (NvsVideoFrameReceiver *)  receiver

Connects the captured preview with video frame receiver.

Parameters
receiverVideo frame receiver
Returns
Returns the BOOL value. YES indicates a successful connection, and NO means the opposite.
Since
1.7.1

◆ connectTimeline:withLiveWindow:

- (BOOL) connectTimeline: (NvsTimeline *)  timeline
withLiveWindow: (NvsLiveWindow *)  liveWindow 

Connects timeline with live window.

Parameters
timelineTimeline
liveWindowLive window
Returns
Returns BOOL value. YES means a successful connection, and NO means the opposite.

◆ connectTimeline:withVideoFrameReceiver:

- (BOOL) connectTimeline: (NvsTimeline *)  timeline
withVideoFrameReceiver: (NvsVideoFrameReceiver *)  receiver 

Connects timeline with video frame receiver.

Parameters
timelineTimeline
receiverVideo frame receiver
Returns
Returns BOOL value. YES means a successful connection, and NO means the opposite.

◆ createAuxiliaryStreamingContext:

- (NvsStreamingContext *) createAuxiliaryStreamingContext: (int)  flags

Creates an object of auxiliary streaming context.

Parameters
lagsFlag field. If there is no special requirement, please fill in 0.
Returns
Returns an NvsStreamingContext object .
Since
2.12.0

◆ createTimeline:templateFootages:

- (NvsTimeline *) createTimeline: (NSString *)  templateId
templateFootages: (NSArray< NvsTemplateFootageInfo * > *)  templateFootages 

Creates timeline.

Parameters
templateIdtemplate uuid
templateFootagesfootage information in the template asset
Returns
Returns created timeline object
See also
removeTimeline

◆ createTimeline:templateFootages:flags:

- (NvsTimeline *) createTimeline: (NSString *)  templateId
templateFootages: (NSArray< NvsTemplateFootageInfo * > *)  templateFootages
flags: (int)  flags 

Creates timeline.

Parameters
templateIdtemplate uuid
templateFootagesfootage information in the template asset
flagsSpecial flags for create timeline. If there is no special requirements please input 0. Please refer to NvsCreateTimelineTypeFlag.
Returns
Returns created timeline object
Since
2.21.0
See also
removeTimeline

◆ createTimeline:templateFootages:flags:videoFps:audioEditRes:

- (NvsTimeline *) createTimeline: (NSString *)  templateId
templateFootages: (NSArray< NvsTemplateFootageInfo * > *)  templateFootages
flags: (int)  flags
videoFps: (NvsRational *)  videoFps
audioEditRes: (NvsAudioResolution *)  audioEditRes 

Creates timeline.

Parameters
templateIdtemplate uuid,template must be installed firstly
templateFootagesfootage information in the template asset
flagsSpecial flags for create timeline. If there is no special requirements please input 0. Please refer to create timeline flag.
videoFpsFrame rate
audioEditResAudio 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.)
Returns
Returns created timeline object
Since
3.5.0
See also
removeTimeline

◆ createTimeline:videoFps:audioEditRes:

- (NvsTimeline *) createTimeline: (NvsVideoResolution *)  videoEditRes
videoFps: (NvsRational *)  videoFps
audioEditRes: (NvsAudioResolution *)  audioEditRes 

Creates timeline.

Parameters
videoEditResVideo file's resolution (specify the width,height and 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.
videoFpsVideo frame rate, max fps is 60
audioEditResAudio editing resolution (specify the sampling rate, sampling format, and count of channels). For audio editing resolution, the incoming sample rate values support two types: 44100 and 48000.and support mono&stereo
Returns
Returns the created NvsTimeline object. return null if params are invalid
See also
- removeTimeline:

◆ createTimeline:videoFps:audioEditRes:bitDepth:flags:

- (NvsTimeline *) createTimeline: (NvsVideoResolution *)  videoEditRes
videoFps: (NvsRational *)  videoFps
audioEditRes: (NvsAudioResolution *)  audioEditRes
bitDepth: (NvsVideoResolutionBitDepth depth
flags: (int)  flags 

Creates timeline.

Parameters
videoEditResVideo file's resolution (specify the width,height and 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.
videoFpsVideo frame rate, max fps is 60
audioEditResAudio editing resolution (specify the sampling rate, sampling format, and count of channels). For audio editing resolution, the incoming sample rate values support two types: 44100 and 48000.and support mono&stereo
flagsSpecial flags for create timeline. If there is no special requirements please input 0. Please refer to NvsCreateTimelineTypeFlag.
Returns
Returns the created NvsTimeline object. return null if params are invalid
Since
2.24.0
See also
- removeTimeline:

◆ createTimeline:videoFps:audioEditRes:flags:

- (NvsTimeline *) createTimeline: (NvsVideoResolution *)  videoEditRes
videoFps: (NvsRational *)  videoFps
audioEditRes: (NvsAudioResolution *)  audioEditRes
flags: (int)  flags 

Creates timeline.

Parameters
videoEditResVideo file's resolution (specify the width,height and 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.
videoFpsVideo frame rate, max fps is 60
audioEditResAudio editing resolution (specify the sampling rate, sampling format, and count of channels). For audio editing resolution, the incoming sample rate values support two types: 44100 and 48000.and support mono&stereo
flagsSpecial flags for create timeline. If there is no special requirements please input 0. Please refer to NvsCreateTimelineTypeFlag.
Returns
Returns the created NvsTimeline object. return null if params are invalid
Since
2.21.0
See also
- removeTimeline:

◆ createVideoFrameRetriever:

- (NvsVideoFrameRetriever *) createVideoFrameRetriever: (NSString *)  videoFilePath

Creates an object of video frame retriever.

Parameters
videoFilePathPath of the original video
Returns
Returns an NvsVideoFrameRetriever object representing the video frame retriever object.
Since
1.2.0

◆ destoryAuxiliaryStreamingContext:

- (void) destoryAuxiliaryStreamingContext: (NvsStreamingContext *)  auxContext

destory auxiliary streaming context.

Parameters
NvsStreamingContext.destoryed auxiliary streaming context
Since
2.12.0

◆ destroyInstance

+ (void) destroyInstance

Destroys the streaming context instance.

See also
+ sharedInstance

◆ detectEngineRenderFramePerSecond

- (float) detectEngineRenderFramePerSecond

Get the current rendering speed of the engine from the streaming context that it's only valid after startCapturePreview and playbackTimeline.

Since
2.8.0

◆ detectVideoFileKeyframeInterval:

- (int) detectVideoFileKeyframeInterval: (NSString *)  videoFilePath

Detects the I frame interval of video files.

Parameters
videoFilePathVideo file path
Returns
Returns the detected I frame interval, and returning 0 means the detection failed.
Since
1.6.0

◆ exportProjectInfo:timeline:requestedAspectRatio:

- (BOOL) exportProjectInfo: (NSString *)  projectUuid
timeline: (NvsTimeline *)  timeline
requestedAspectRatio: (int)  requestedAspectRatio 

Export project information.

Parameters
projectUuidProject resource package ID
timelineTimeline Object
requestedAspectRatioAspect ratio of project according to timeline。please refer to Aspect ratio supported by the resource package
Returns
Returns suc or not

◆ exportTemplateInfo:timeline:requestedAspectRatio:

- (BOOL) exportTemplateInfo: (NSString *)  templateUuid
timeline: (NvsTimeline *)  timeline
requestedAspectRatio: (int)  requestedAspectRatio 

Export template information.

Parameters
templateUuidTemplate resource package ID
timelineTimeline Object
requestedAspectRatioAspect ratio of template according to timeline。please refer to Aspect ratio supported by the resource package
Returns
Returns suc or not

◆ functionalityAuthorised:

+ (BOOL) functionalityAuthorised: (NSString *)  sdkFunctionName

Verifies whether a feature is available or not.

Parameters
sdkFunctionNameThe name of the SDK’s function
Returns
Returns a BOOL value. YES indicates that the authorization verification is successful, and NO indicates that the verification fails.

◆ generateProjectPackage:innerAssetDir:projectOutputDir:

- (BOOL) generateProjectPackage: (NSString *)  projectUuid
innerAssetDir: (NSString *)  innerAssetDir
projectOutputDir: (NSString *)  projectOutputDir 

Generate project asset package.

Parameters
projectUuidproject resource package ID
innerAssetDirPath of internal assets of project
projectOutputDirOutput path of project asset package
Returns
Returns suc or not

◆ generateTemplatePackage:innerAssetDir:templateOutputDir:

- (BOOL) generateTemplatePackage: (NSString *)  templateUuid
innerAssetDir: (NSString *)  innerAssetDir
templateOutputDir: (NSString *)  templateOutputDir 

Generate template asset package.

Parameters
templateUuidTemplate resource package ID
innerAssetDirPath of internal assets of template
templateOutputDirOutput path of template asset package
Returns
Returns suc or not

◆ getAECEnabled

- (BOOL) getAECEnabled

Get whether AEC(Acoustic Echo Cancellation) is enabled.

Returns
Returns whether AEC(Acoustic Echo Cancellation) is enabled.
Since
3.11.0

◆ getAllBuiltinAudioFxNames

- (NSArray *) getAllBuiltinAudioFxNames

Gets the list of all built-in audio effect names.

Returns
Returns an array object containing all the built-in audio effects’ names.
See also
- getAllBuiltinVideoFxNames

◆ getAllBuiltinCaptureVideoFxNames

- (NSArray *) getAllBuiltinCaptureVideoFxNames

Gets the list of all built-in capture video effects’ names.

Returns
Returns an array object containing all built-in capture video effects’ names.
See also
- getBeautyVideoFxName
- getAllBuiltinVideoFxNames

◆ getAllBuiltinVideoFxNames

- (NSArray *) getAllBuiltinVideoFxNames

Gets the list of all built-in video effect names.

Returns
Returns an array object containing all the built-in video effects’ names.
See also
- getAllBuiltinAudioFxNames

◆ getAllBuiltinVideoTransitionNames

- (NSArray *) getAllBuiltinVideoTransitionNames

Gets the list of all built-in video transitions’ names.

Returns
Returns an array object containing all built-in video transitions’ names.
See also
- getAllBuiltinCaptureVideoFxNames
- getBeautyVideoFxName
- getDefaultVideoTransitionName

◆ getAudioFxDescription:

- (NvsFxDescription *) getAudioFxDescription: (NSString *)  fxName

Gets the description of an audio effect.

Parameters
fxNameAudio effect’s name
Returns
Returns the object of the audio effect description.
See also
- getVideoFxDescription:

◆ getAVFileInfo:

- (NvsAVFileInfo *) getAVFileInfo: (NSString *)  avFilePath

Gets audio and video informations of a file.

Parameters
avFilePathFile path
Returns
Returns the NvsAVFileInfo Object

◆ getAVFileInfo:extraFlag:withError:

- (NvsAVFileInfo *) getAVFileInfo: (NSString *)  avFilePath
extraFlag: (int)  extraFlag
withError: (NSMutableString *)  errString 

Gets detailed information of the audio/video file.

Parameters
avFilePathFile path of the audio/video file
extraFlagGet extra information of the audio/video file. please refer to AV_FILEINFO_EXTRA
errStringOutput param for error description is valid if current function return null.
Returns
Returns the audio/video file information object,return null if file format is not supported
Since
2.20.0

◆ getAVFileInfoExtra:extraFlag:

- (NvsAVFileInfo *) getAVFileInfoExtra: (NSString *)  avFilePath
extraFlag: (int)  extraFlag 

Gets audio and video information of a file.

Parameters
avFilePathFile path
extraFlagSpecial flag for Audio and video information. Please refer to Special identifier when acquiring audio and video information..
Returns
返回音视频文件信息的对象

◆ getBeautyVideoFxName

- (NSString *) getBeautyVideoFxName

Gets the name of beauty effect.

Returns
Returns the name of beauty effect.
See also
- getAllBuiltinVideoFxNames
- getAllBuiltinCaptureVideoFxNames

◆ getCaptureAnimatedStickerByIndex:

- (NvsCaptureAnimatedSticker *) getCaptureAnimatedStickerByIndex: (unsigned int)  captureStikcerIndex

Gets a certain capture animated sticker.

Parameters
captureStikcerIndexaudio effect index
Returns
Returns the NvsCaptureAudioFx object.
See also
removeCaptureAnimatedSticker
Since
2.21.0

◆ getCaptureAnimatedStickerCount

- (unsigned int) getCaptureAnimatedStickerCount

Gets the count of capture animated sticker.

Returns
Returns the count of capture animated sticker.
Since
2.21.0

◆ getCaptureAudioFxByIndex:

- (NvsCaptureAudioFx *) getCaptureAudioFxByIndex: (unsigned int)  captureAudioFxIndex

Gets a certain capture audio effect.

Parameters
captureVideoFxIndexaudio effect index
Returns
Returns the NvsCaptureAudioFx object.
See also
removeCaptureAudioFx
Since
2.21.0

◆ getCaptureAudioFxCount

- (unsigned int) getCaptureAudioFxCount

Gets the count of audio effects.

Returns
Returns the count of audio effects.
Since
2.21.0

◆ getCaptureCaptionByIndex:

- (NvsCaptureCaption *) getCaptureCaptionByIndex: (unsigned int)  captureCaptionIndex

Gets a certain capture caption.

Parameters
captureCaptionIndexcaption index
Returns
Returns the NvsCaptureCaption object.
Since
2.21.0

◆ getCaptureCaptionCount

- (unsigned int) getCaptureCaptionCount

Gets the count of capture caption.

Returns
Returns the count of capture caption.
Since
2.21.0

◆ getCaptureCompoundCaptionByIndex:

- (NvsCaptureCompoundCaption *) getCaptureCompoundCaptionByIndex: (unsigned int)  captureCaptionIndex

Gets a certain capture compound caption.

Parameters
captureCaptionIndexcompound caption index
Returns
Returns the NvsCaptureCompoundCaption object.
Since
2.21.0

◆ getCaptureCompoundCaptionCount

- (unsigned int) getCaptureCompoundCaptionCount

Gets the count of capture compound caption.

Returns
Returns the count of capture compound caption.
Since
2.21.0

◆ getCaptureDeviceCapability:

- (NvsCaptureDeviceCapability *) getCaptureDeviceCapability: (unsigned int)  catpureDeviceIndex

Obtains the capability description object of the capture device.

Parameters
catpureDeviceIndexIndex of capturing device
Returns
Returns the NvsCaptureDeviceCapability object.

◆ getCapturePreviewVideoSize:

- (NvsSize) getCapturePreviewVideoSize: (unsigned int)  catpureDeviceIndex

Gets the capture preview resolution.

Parameters
catpureDeviceIndexIndex of capturing device
Returns
Gets the capture preview resolution.
Since
1.7.1

◆ getCaptureVideoFxByIndex:

- (NvsCaptureVideoFx *) getCaptureVideoFxByIndex: (unsigned int)  captureVideoFxIndex

Gets a certain capture video effect.

Parameters
captureVideoFxIndexVideo effect index
Returns
Returns the NvsCaptureVideoFx object.
See also
- removeCaptureVideoFx:

◆ getCaptureVideoFxCount

- (unsigned int) getCaptureVideoFxCount

Gets the count of video effects.

Returns
Returns the count of video effects.

◆ getColorGainForSDRToHDR

- (float) getColorGainForSDRToHDR

gets the color gain during SDR to HDR conversion.

Returns
Returns color gain. range is [1.0, 10.0]
Since
2.23.0
See also
setColorGainForSDRToHDR

◆ getCurrentCaptureSceneId

- (NSString *) getCurrentCaptureSceneId

Gets the ID of the current capture scene resource package.

Returns
Retruns the current ID of the capture scene resource package. nil indicates that there is no capture scene resource package for now.
Since
1.2.0
See also
- applyCaptureScene:
- removeCurrentCaptureScene

◆ getCustomCompileVideoHeight

- (unsigned int) getCustomCompileVideoHeight

Gets the custom video height.

Returns
Returns the custom video height
Since
1.6.1

◆ getDefaultThemeEndingLogoImageFilePath

- (NSString *) getDefaultThemeEndingLogoImageFilePath

Gets the default theme logo image path.

Returns
Returns the image path
See also
- setDefaultThemeEndingLogoImageFilePath:

◆ getDefaultVideoTransitionName

- (NSString *) getDefaultVideoTransitionName

Gets the default video transition’s name.

Returns
Returns a string representing the default transition’s name.
See also
- getAllBuiltinVideoTransitionNames

◆ getEAGLSharegroup

- (EAGLSharegroup *) getEAGLSharegroup

Gets the EAGLSharegroup object used by the engine from the streaming context.

Since
1.5.0

◆ getEngineHDRCaps

- (int) getEngineHDRCaps

Get HDR capability.

Returns
Returns a int value, Please refer to HDR capability flags.

◆ getExposureBias

- (float) getExposureBias

Gets exposure compensation.

Returns
Returns exposure compensation value
See also
- setExposureBias:

◆ getFlashMode

- (NvsCameraFlashMode) getFlashMode

get state of the flash light.

Returns
Returns flash mode value, please refer to Flash Mode
See also
toggleFlashMode

◆ getFontInfoByFilePath:

- (NSArray*) getFontInfoByFilePath: (NSString *)  fontFilePath

Gets font file's font information.

Parameters
fontFilePathFont file path
Returns
Returns file's all font information

◆ getLogFileDirectory

+ (NSString *) getLogFileDirectory

Gets the directory path of log file.

Since
2.14.0

◆ getSdkVersion:minorVersion:revisionNumber:

+ (void) getSdkVersion: (int *)  majorVersion
minorVersion: (int *)  minorVersion
revisionNumber: (int *)  revisionNumber 

Gets the version information of Meishe SDK.

Parameters
majorVersionMajor version number
minorVersionMinor version number
revisionNumberRevision number
Since
1.4.1

◆ getStreamingEngineState

- (NvsStreamingEngineState) getStreamingEngineState

Gets the engine state.

Returns
Returns the engine state.

◆ getTimelineCurrentPosition:

- (int64_t) getTimelineCurrentPosition: (NvsTimeline *)  timeline

Gets the current position of the timeline (in microseconds).

Parameters
timelineTimeline
Returns
Returns the current position value of the timeline.

◆ getVideoFxDescription:

- (NvsFxDescription *) getVideoFxDescription: (NSString *)  fxName

Gets the description of a video effect.

Parameters
fxNameVideo effect’s name
Returns
Returns the object of the video effect description.
See also
- getAudioFxDescription:

◆ getVideoStabilization

- (VideoStabilizationFlag) getVideoStabilization

Gets the current video’s stabilization flag.

Returns
Returns the current flag.
See also
- setVideoStabilization:

◆ getZoomFactor

- (float) getZoomFactor

Gets the zoom factor.

Returns
Returns zoom factor value.
See also
- setZoomFactor:

◆ grabImageFromTimeline:timestamp:proxyScale:

- (UIImage *) grabImageFromTimeline: (NvsTimeline *)  timeline
timestamp: (int64_t)  timestamp
proxyScale: (const NvsRational *)  proxyScale 

Gets the image in the timeline of a certain timestamp. For details, refer to The Topic of Video Frame Image Extraction.

Parameters
timelineThe timeline object which gets the image
timestampThe timestamp (in microseconds) for the image. The range of timestamp is [0, timeline.duration - 1]. Other values are invalid, and grabImageFromTimeline will return nil.
proxyScaleProxy scale.Setting nil indicates the default ratio of 1:1.
Returns
Returns the UIImage object of the image, it will return nil if grabbing image is failed.
Since
1.1.2

◆ grabImageFromTimeline:timestamp:proxyScale:flags:

- (UIImage *) grabImageFromTimeline: (NvsTimeline *)  timeline
timestamp: (int64_t)  timestamp
proxyScale: (const NvsRational *)  proxyScale
flags: (int)  flags 

Gets the image in the timeline of a certain timestamp. For details, refer to The Topic of Video Frame Image Extraction.

Parameters
timelineThe timeline object which gets the image
timestampThe timestamp (in microseconds) for the image. The range of timestamp is [0, timeline.duration - 1]. Other values are invalid, and grabImageFromTimeline will return nil.
proxyScaleProxy scale.Setting nil indicates the default ratio of 1:1.
flagsSpecial flag for seeking engine. Please refer to NvsStreamingEngineSeekFlag.
Returns
Returns the UIImage object of the image, it will return nil if grabbing image is failed.
Since
1.16.0

◆ grabImageFromTimelineAsync:timestamp:proxyScale:flags:

- (BOOL) grabImageFromTimelineAsync: (NvsTimeline *)  timeline
timestamp: (int64_t)  timestamp
proxyScale: (const NvsRational *)  proxyScale
flags: (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.

Parameters
timelineThe timeline that will be grabbed from.
timestampThe 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.
proxyScaleZoom scale of proxy
flagsFlags for streaming engine seeking. For specific please refer to The seek flag of streaming engine.
Returns
Returns a boolean value.
Since
2.15.0

◆ hasARModule

+ (int) hasARModule

Checks if the current SDK contains an AR module.

Returns
The return value of 0 means no AR module, and greater than 0 means that the AR module is included.
Since
2.5.0

◆ initHumanDetection:licenseFilePath:features:

+ (BOOL) initHumanDetection: (NSString *)  modelFilePath
licenseFilePath: (NSString *)  licenseFilePath
features: (int)  features 

Initializes the human body detection mechanism.Only once needed.

Parameters
modelFilePathPath of the model file
licenseFilePathPath of the license file
featureshuman detection flag field. Please refer to Flag of human detection.
Since
2.5.0
See also
+ closeHumanDetection

◆ initHumanDetectionExt:licenseFilePath:features:

+ (BOOL) initHumanDetectionExt: (NSString *)  modelFilePath
licenseFilePath: (NSString *)  licenseFilePath
features: (int)  features 

Human detection initialization extension. must called after initHumanDetection.

Parameters
modelFilePathPath of the model file
licenseFilePathPath of the license file
featureshuman detection flag field. Please refer to Flag of human detection.
Since
2.5.0

◆ insertBeautyCaptureVideoFx:

- (NvsCaptureVideoFx *) insertBeautyCaptureVideoFx: (unsigned int)  insertPosition

Inserts a skin beauty video effect.

Parameters
insertPositionInsertion position
Returns
Returns the inserted NvsCaptureVideoFx object.
See also
- appendBeautyCaptureVideoFx:

◆ insertBuiltinCaptureAudioFx:withInsertPosition:

- (NvsCaptureAudioFx *) insertBuiltinCaptureAudioFx: (NSString *)  audioFxName
withInsertPosition: (unsigned int)  insertPosition 

Inserts a built-in audio capture effect.

Parameters
audioFxNameaudio effect name. To get the audio effect name, please refer to getAllBuiltinCaptureAudioFxNames() or The List of Built-in Effect Name.
insertPositionInsertion position.
Returns
Returns the inserted NvsCaptureVideoFx object.
See also
appendBuiltinCaptureAudioFx
Since
2.21.0

◆ insertBuiltinCaptureVideoFx:withInsertPosition:

- (NvsCaptureVideoFx *) insertBuiltinCaptureVideoFx: (NSString *)  videoFxName
withInsertPosition: (unsigned int)  insertPosition 

Inserts a built-in video capture effect.

Parameters
videoFxNameVideo effect name. To get the video effect name, please refer to getAllBuiltinCaptureVideoFxNames() or The List of Built-in Effect Name.
insertPositionInsertion position.
Returns
Returns the inserted NvsCaptureVideoFx object.
See also
- appendBuiltinCaptureVideoFx:

◆ insertCaptureAnimatedSticker:duration:animatedStickerPackageId:insertPosition:

- (NvsCaptureAnimatedSticker *) insertCaptureAnimatedSticker: (int64_t)  offsetTime
duration: (int64_t)  duration
animatedStickerPackageId: (NSString *)  animatedStickerPackageId
insertPosition: (unsigned int)  insertPosition 

Appends a animated sticker.

Parameters
offsetTimeanimated sticker's offset time.
durationanimated sticker's duration.
animatedStickerPackageIdAnimated sticker package Id.
insertPositionInsertion position.
Returns
Returns the appended NvsCaptureAnimatedSticker object.
It will return null in the following situations:
1. No animated sticker function authorization;
2. The animatedStickerPackageId is empty or null;
3. The animatedSticker has not install successed;
See also
appendCaptureAnimatedSticker
Since
2.21.0

◆ insertCaptureCaption:offsetTime:duration:captionStylePackageId:insertPosition:

- (NvsCaptureCaption *) insertCaptureCaption: (NSString *)  captionText
offsetTime: (int64_t)  offsetTime
duration: (int64_t)  duration
captionStylePackageId: (NSString *)  captionStylePackageId
insertPosition: (unsigned int)  insertPosition 

Insert a caption.

Parameters
captionTextText of caption
offsetTimecatpion's offset time.
durationcatpion's duration.
captionStylePackageIdCaption style package Id.If it does not exist, you can pass an empty string or null.
insertPositionInsertion position.
Returns
Returns the appended NvsCaptureCompoundCaption object.
It will return null in the following situations:
1. No caption function authorization;
See also
appendCaptureCompoundCaption
Since
2.21.0

◆ insertCaptureCompoundCaption:duration:compoundCaptionPackageId:insertPosition:

- (NvsCaptureCompoundCaption *) insertCaptureCompoundCaption: (int64_t)  offsetTime
duration: (int64_t)  duration
compoundCaptionPackageId: (NSString *)  compoundCaptionPackageId
insertPosition: (unsigned int)  insertPosition 

Insert a compound caption.

Parameters
offsetTimecompound catpion's offset time.
durationcompound catpion's duration.
compoundCaptionPackageIdCaption style package Id.If it does not exist, you can pass an empty string or null.
insertPositionInsertion position.
Returns
Returns the appended NvsCaptureCompoundCaption object.
It will return null in the following situations:
1. No compound caption function authorization;
See also
appendCaptureCompoundCaption
Since
2.21.0

◆ insertCaptureModularCaption:offsetTime:duration:insertPosition:

- (NvsCaptureCaption *) insertCaptureModularCaption: (NSString *)  captionText
offsetTime: (int64_t)  offsetTime
duration: (int64_t)  duration
insertPosition: (unsigned int)  insertPosition 

Insert a modular caption.

Parameters
captionTextText of caption
offsetTimecatpion's offset time.
durationcatpion's duration.
insertPositionInsertion position.
Returns
Returns the appended NvsCaptureCompoundCaption object.
It will return null in the following situations:
1. No caption function authorization;
See also
appendCaptureCompoundCaption
Since
2.21.0

◆ insertCustomCaptureAnimatedSticker:duration:animatedStickerPackageId:customImagePath:insertPosition:

- (NvsCaptureAnimatedSticker *) insertCustomCaptureAnimatedSticker: (int64_t)  offsetTime
duration: (int64_t)  duration
animatedStickerPackageId: (NSString *)  animatedStickerPackageId
customImagePath: (NSString *)  customImagePath
insertPosition: (unsigned int)  insertPosition 

Insert a animated sticker.

Parameters
offsetTimeanimated sticker's offset time.
durationanimated sticker's duration.
animatedStickerPackageIdAnimated sticker package Id.
customImagePathPath of custom animated sticker image(It can be a jpg, png image, or a dynamic caf format image supported by Meishe sdk)
insertPositionInsertion position.
Returns
Returns the appended NvsCaptureAnimatedSticker object.
It will return null in the following situations:
1. No animated sticker function authorization;
2. The animatedStickerPackageId is empty or null;
3. The animatedSticker has not install successed;
See also
appendCaptureAnimatedSticker
Since
3.2.0

◆ insertCustomCaptureVideoFx:withInsertPosition:

- (NvsCaptureVideoFx *) insertCustomCaptureVideoFx: (id< NvsCustomVideoFxRenderer >)  customVideoFxRender
withInsertPosition: (int)  insertPosition 

Inserts a custom capture video effect.

Parameters
customVideoFxRenderInterface of user-implemented custom video effect renderer
insertPositionInsertion position
Returns
Returns the inserted NvsCaptureVideoFx object.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
Since
1.7.0

◆ insertPackagedCaptureVideoFx:withInsertPosition:

- (NvsCaptureVideoFx *) insertPackagedCaptureVideoFx: (NSString *)  videoFxPackageId
withInsertPosition: (unsigned int)  insertPosition 

Inserts a package capture effect.

Parameters
videoFxPackageIdVideo effect package ID
insertPositionInsertion position
Returns
Returns the inserted NvsCaptureVideoFx object.
See also
- appendPackagedCaptureVideoFx:

◆ isBlackFrame:

- (BOOL) isBlackFrame: (UIImage *)  image

check the image is a black image or not.

Parameters
theimage to be checked

◆ isCaptureDeviceBackFacing:

- (BOOL) isCaptureDeviceBackFacing: (unsigned int)  catpureDeviceIndex

Whether it's a rear capturing device.

Parameters
catpureDeviceIndexIndex of capturing device
Returns
Returns BOOL value. YES means it is a rear capture device, and NO means the opposite.

◆ isCompilingPaused

- (BOOL) isCompilingPaused

Check if compiling timeline is paused.

Returns
Returns a boolean value indicating whether compiling timeline is paused
Since
2.9.0
See also
- pauseCompiling

◆ isFlashOn

- (BOOL) isFlashOn

get state of the flash light.

Returns
Returns a BOOL value, true means flash light is on and false means off.
See also
- toggleFlash:

◆ isPlaybackPaused

- (BOOL) isPlaybackPaused

Check if playback timeline is paused.

Returns
Returns a boolean value indicating whether compiling timeline is paused
Since
2.18.0
See also
- pauseCompiling

◆ isRecordingPaused

- (BOOL) isRecordingPaused

Checks if the recording has been paused.

Returns
Returns a boolean value. If the value is YES, the recording has been paused, and NO means it's not paused.
Since
1.17.0
See also
- pauseRecording
- resumeRecording

◆ loadProject:resourceDir:

- (NvsTimeline *) loadProject: (NSString *)  projectId
resourceDir: (NSString *)  resourceDir 

Creates timeline.

Parameters
projectIdproject uuid
resourceDirPath of assets of project
Returns
Returns created timeline object
See also
removeTimeline

◆ pauseCompiling

- (BOOL) pauseCompiling

Pause compiling timeline.

Returns
Returns a BOOL value indicating whether the pause was successful
Since
2.9.0
See also
- resumeCompiling

◆ pausePlayback

- (BOOL) pausePlayback

Pause playback timeline.

Returns
Returns a boolean value indicating whether the pause was successful
Since
2.18.0
See also
- resumeCompiling

◆ pauseRecording

- (BOOL) 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!

Returns
Returns a boolean value. A value of YES pause to record successfully and NO means it fails to pause.
Since
1.17.0
See also
- resumeRecording

◆ playbackTimeline:startTime:endTime:proxyScale:preload:flags:

- (BOOL) playbackTimeline: (NvsTimeline *)  timeline
startTime: (int64_t)  startTime
endTime: (int64_t)  endTime
proxyScale: (const NvsRational *)  proxyScale
preload: (BOOL)  preload
flags: (int)  flags 

Playback timeline.

Parameters
timelineTimeline
startTimeStart time (in microseconds). The value range of startTime is [0, timeline.duration - 1]. Any other value is invalid, and the playbackTimeline will return NO, resulting in startuping unsuccessfully for the playback video.
endTimeEnd time (in microseconds). If the input endTime value is negative, it will play to the end of the video by default.
proxyScaleProxy scale
preloadWhether it preloads or not
flagsSpecial flag for previewing. If there is no special need, please fill in 0. Please refer to NvsStreamingEnginePlaybackFlag.
Returns
Returns BOOL value. Note: The timeline playback is an asynchronous operation. Returning YES will start the timeline playback, and NO will not.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- playbackTimeline:startTime:endTime:videoSizeMode:preload:flags:
- seekTimeline:timestamp:proxyScale:flags:
- compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:flags:

◆ playbackTimeline:startTime:endTime:videoSizeMode:preload:flags:

- (BOOL) playbackTimeline: (NvsTimeline *)  timeline
startTime: (int64_t)  startTime
endTime: (int64_t)  endTime
videoSizeMode: (NvsVideoPreviewSizeMode videoSizeMode
preload: (BOOL)  preload
flags: (int)  flags 

Playback timeline.

Parameters
timelineTimeline
startTimeStart time (in microseconds). The value range of startTime is [0, timeline.duration - 1]. Any other value is invalid, and the playbackTimeline will return NO, resulting in startuping unsuccessfully for the playback video.
endTimeEnd time (in microseconds). If the input endTime value is negative, it will play to the end of the video by default.
videoSizeModeMode of previewing image
preloadWhether it preloads or not
flagsSpecial flag for previewing. If there is no special need, please fill in 0. Please refer to NvsStreamingEnginePlaybackFlag.
Returns
Returns BOOL value. Note: The timeline playback is an asynchronous operation. Returning YES will start the timeline playback, and NO will not.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- playbackTimeline:startTime:endTime:proxyScale:preload:flags:
- compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:flags:
- seekTimeline:timestamp:videoSizeMode:flags:

◆ preloadEffectResources

- (BOOL) preloadEffectResources

Preload effect resources.

Since
2.18.1

◆ registerFontByFilePath:

- (NSString*) registerFontByFilePath: (NSString *)  fontFilePath

Gets the fontFamily of the font file.

Parameters
fontFilePathFont file path
Returns
Returns the fontFamily of the font.

◆ removeAllCaptureAnimatedSticker

- (void) removeAllCaptureAnimatedSticker

Removes all capture animated sticker.

See also
removeCaptureAnimatedSticker
- getCaptureAnimatedStickerCount
Since
2.21.0

◆ removeAllCaptureAudioFx

- (void) removeAllCaptureAudioFx

Removes all capture audio effects.

See also
removeCaptureAudioFx
- getCaptureAudioFxCount
Since
2.21.0

◆ removeAllCaptureCaption

- (void) removeAllCaptureCaption

Removes all capture caption.

Since
2.21.0

◆ removeAllCaptureCompoundCaption

- (void) removeAllCaptureCompoundCaption

Removes all capture compound caption.

Since
2.21.0

◆ removeAllCaptureVideoFx

- (void) removeAllCaptureVideoFx

Removes all capture video effects.

See also
- removeCaptureVideoFx:
- getCaptureVideoFxCount

◆ removeCaptureAnimatedSticker:

- (BOOL) removeCaptureAnimatedSticker: (unsigned int)  captureAnimagedStickerIndex

Removes a certain capture animated sticker indicated by its index.

Parameters
captureAnimagedStickerIndexanimated sticker index
Returns
Returns a boolean value. If it is YES, the removal is successful, and NO means failure.
See also
appendCaptureAnimatedSticker
Since
2.21.0

◆ removeCaptureAudioFx:

- (BOOL) removeCaptureAudioFx: (unsigned int)  captureAudioFxIndex

Removes a certain capture audio effect indicated by its index.

Parameters
captureAudioFxIndexaudio effect index
Returns
Returns a boolean value. If it is YES, the removal is successful, and NO means failure.
See also
appendBuiltinCaptureAudioFx
Since
2.21.0

◆ removeCaptureCaption:

- (BOOL) removeCaptureCaption: (unsigned int)  captureCaptionIndex

Removes a certain capture caption indicated by its index.

Parameters
captureCaptionIndexcaption index
Returns
Returns a boolean value. If it is YES, the removal is successful, and NO means failure.
Since
2.21.0

◆ removeCaptureCompoundCaption:

- (BOOL) removeCaptureCompoundCaption: (unsigned int)  captureCompoundCaptionIndex

Removes a certain capture compound caption indicated by its index.

Parameters
captureCompoundCaptionIndexcompound caption index
Returns
Returns a boolean value. If it is YES, the removal is successful, and NO means failure.
Since
2.21.0

◆ removeCaptureVideoFx:

- (BOOL) removeCaptureVideoFx: (unsigned int)  captureVideoFxIndex

Removes a certain capture video effect indicated by its index.

Parameters
captureVideoFxIndexVideo effect index
Returns
Returns a BOOL value. If it is YES, the removal is successful, and NO means failure.
See also
- appendBuiltinCaptureVideoFx:
- appendPackagedCaptureVideoFx:
- appendBeautyCaptureVideoFx

◆ removeCurrentCaptureScene

- (void) removeCurrentCaptureScene

Removes the current capture scene.

Since
1.2.0
See also
- applyCaptureScene:
- getCurrentCaptureSceneId

◆ removeTimeline:

- (BOOL) removeTimeline: (NvsTimeline *)  timeline

Removes timeline.

Parameters
timelineThe timeline which will be removed
Returns
Returns the BOOL value. YES means removal succeeds, NO means removal fails.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- createTimeline:videoFps:audioEditRes:

◆ removeUserWatermarkForCapture

- (void) removeUserWatermarkForCapture

Removes custom watermark which added for capturing video.

Since
2.0.1

◆ resumeCompiling

- (BOOL) resumeCompiling

Resume compiling timeline.

Returns
Returns a boolean value indicating whether the resume was successful
Since
2.9.0
See also
- pauseCompiling

◆ resumePlayback

- (BOOL) resumePlayback

Resume playback timeline.

Returns
Returns a boolean value indicating whether the resume was successful
Since
2.18.0
See also
- pausePlayback

◆ resumeRecording

- (BOOL) resumeRecording

Continues to record. Continuing recording will output the recorded video to the same media file, to which the recording before suspend outputs contents.

Returns
Returns a boolean value. A value of YES means it continues recording successfully and NO means it fails to continue.
Since
1.17.0
See also
- pauseRecording

◆ sampleColorFromCapturedVideoFrame:

- (NvsColor) sampleColorFromCapturedVideoFrame: (CGRect)  sampleRect

Samples the capture device's video frame.

Parameters
sampleRectRectangular area to sample, of which coordinates are in livewindow's coordinate system
Returns
Returns the NvsColor object. This color value is the average color value of all pixels in sampled rectangular area.
Since
1.2.0

◆ seekTimeline:timestamp:proxyScale:flags:

- (BOOL) seekTimeline: (NvsTimeline *)  timeline
timestamp: (int64_t)  timestamp
proxyScale: (const NvsRational *)  proxyScale
flags: (int)  flags 

Seeks to a certain timestamp of images.

Parameters
timelineTimeline
timestampTimestamp (in microseconds). The range of timestamp value is [0, timeline.duration - 1]. And any other input value is invalid, seekTimeline will return No, resulting in seek failure.
proxyScaleProxy scale value
flagsSpecial seek flag for engine. Please refer to NvsStreamingEngineSeekFlag
Returns
Returns BOOL value. Note: Seeking to a timestamp is an asynchronous operation. A return value of YES means that seeking video startups successfully, otherwise it fails to startup.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- seekTimeline:timestamp:videoSizeMode:flags:
- playbackTimeline:startTime:endTime:videoSizeMode:preload:flags:
- compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:flags:

◆ seekTimeline:timestamp:videoSizeMode:flags:

- (BOOL) seekTimeline: (NvsTimeline *)  timeline
timestamp: (int64_t)  timestamp
videoSizeMode: (NvsVideoPreviewSizeMode videoSizeMode
flags: (int)  flags 

Seeks to a certain timestamp of images.

Parameters
timelineTimeline
timestampTimestamp (in microseconds). The range of timestamp value is [0, timeline.duration - 1]. And any other input value is invalid, seekTimeline will return No, resulting in seek failure.
videoSizeModeMode of previewing image
flagsSpecial seek flag for engine. Please refer to NvsStreamingEngineSeekFlag
Returns
Returns BOOL value. Note: Seeking to a timestamp is an asynchronous operation. A return value of YES means that seeking video startups successfully, otherwise it fails to startup.
Warning
This interface will cause the streaming engine state to jump to the state of stopping engine. For details, please refer to The Topic of Changing Engine.
See also
- compileTimeline:startTime:endTime:outputFilePath:videoResolutionGrade:videoBitrateGrade:flags:
- playbackTimeline:startTime:endTime:proxyScale:preload:flags:
- seekTimeline:timestamp:proxyScale:flags:

◆ sendAudioSamplesToCapturePreview:

- (BOOL) sendAudioSamplesToCapturePreview: (CMSampleBufferRef)  data

Transfers the input buffer to capture preivew.

Parameters
dataData and information of the input buffer. Only NV12 format is supported.
Returns
Returns BOOL value.
See also
startBufferCapturePreview

◆ sendBufferToCapturePreview:

- (BOOL) sendBufferToCapturePreview: (const NvsVideoFrameInfo *)  data

Transfers the input buffer to capture preivew.

Parameters
dataData and information of the input buffer. Only NV12 format is supported.
Returns
Returns BOOL value.
See also
startBufferCapturePreview

◆ setAECEnabled:

- (void) setAECEnabled: (BOOL)  enable

Set whether to enable AEC(Acoustic Echo Cancellation).Note: Each time you startCapturePreview, this will be set to off, which means that if you want to use echo cancellation, you will need to enable it again after each preview.

Parameters
whetherto enable AEC.
Returns
No return value.
Since
3.11.0

◆ setAudioOutputDeviceVolume:

- (void) setAudioOutputDeviceVolume: (float)  volume

set volume to audio output device.

Parameters
volumenew volume to device, value range[0, 1]
Since
2.14.0

◆ setAudioSampleInfoForCallback:

- (void) setAudioSampleInfoForCallback: (NvsCapturedAudioSampleInfo *)  info

Set audio sample information for callback of capturing.

Parameters
infoaudio sample information

◆ setAudioVUMeterEnabled:

- (void) setAudioVUMeterEnabled: (BOOL)  enable

Enable DB value of audio output.

Parameters
enableEnable
Since
2.20.0

◆ setCaptureFps:

- (void) setCaptureFps: (int)  fps

set camera device capture fps.

Parameters
fpsthe frame count of per second

◆ setColorGainForSDRToHDR:

- (void) setColorGainForSDRToHDR: (float)  gain

Sets the color gain during SDR to HDR conversion.

Parameters
gaincolor gain. range is [1.0, 10.0]
Since
2.23.0
See also
- getColorGainForSDRToHDR

◆ setCustomCompileVideoHeight:

- (void) setCustomCompileVideoHeight: (unsigned int)  videoHeight

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.

Parameters
videoHeightCustom height of the compiled video
Since
1.6.1
See also
compileTimeline

◆ setDebugLevel:

+ (void) setDebugLevel: (NvsDebugLevel debugLevel

Sets Debug level.

Parameters
debugLeveldebug‘s level.
Since
3.6.0

◆ setDefaultAudioTransitionName:

- (void) setDefaultAudioTransitionName: (NSString *)  name

Sets the default audio transition’s name.

Parameters
nameaudio transition’s name
See also
- getAllBuiltinVideoTransitionNames

◆ setDefaultImageClipDuration:

- (void) setDefaultImageClipDuration: (int64_t)  defaultImageClipDuration

Sets the default image clip duration.

Parameters
bitmap.image clip duration
Since
3.4.0
3.4.0

◆ setDefaultThemeEndingLogoImageFilePath:

- (BOOL) setDefaultThemeEndingLogoImageFilePath: (NSString *)  logoImageFilePath

Sets the default theme logo image path.

Parameters
logoImageFilePathPath of logo image file
Returns
Returns the BOOL value. YES means the setting is successful, NO means it fails.
See also
- getDefaultThemeEndingLogoImageFilePath

◆ setEnableAudioSampleNotify:

- (void) setEnableAudioSampleNotify: (BOOL)  enable

Enable DB value of audio output.

Parameters
enableEnable
Since
3.2.0

◆ setExposureBias:

- (void) setExposureBias: (float)  exposureBias

Set exposure compensation.

Parameters
exposureBiasExposure compensation value
See also
- getExposureBias

◆ setFxPluginBundlePathList:

+ (void) setFxPluginBundlePathList: (NSArray *)  list

set the path of the effects plug-in.

Parameters
effectsplug-in path array

◆ setImageReaderCount:

- (void) setImageReaderCount: ("Use +setMaxImageReaderCount:") 
(macos(10.3, 10.11)) 
(ios(7.0, 8.0))  API_DEPRECATED 

set image reader count.

Parameters
countthe image reader

◆ setMaxAudioReaderCount:

+ (void) setMaxAudioReaderCount: (int)  count

set max audio reader count.

Parameters
maxcount the audio reader

◆ setMaxCafCacheMemorySize:

+ (void) setMaxCafCacheMemorySize: (int)  maxMemorySize

set the maximum cache for CAF.

Parameters
maxMemorySizemaximum cache

◆ setMaxCompileCaptionCachedContextCount:

+ (void) setMaxCompileCaptionCachedContextCount: (int)  count

Set the maximum number of caption context cached during compile.

Parameters
Maximumnumber of cached caption contexts

◆ setMaxEditCaptionCachedContextCount:

+ (void) setMaxEditCaptionCachedContextCount: (int)  count

Set the maximum number of caption context cached during editing.

Parameters
Maximumnumber of cached caption contexts

◆ setMaxIconReaderCount:

+ (void) setMaxIconReaderCount: (int)  count

set max icon reader count.

Parameters
maxcount the icon reader

◆ setMaxImageReaderCount:

+ (void) setMaxImageReaderCount: (int)  count

set max image reader count.

Parameters
countthe max image reader

◆ setMaxReaderCount:

+ (void) setMaxReaderCount: (int)  count

set max file reader count.

Parameters
maxcount the file reader

◆ setMaxSoftReaderCount:

+ (void) setMaxSoftReaderCount: (int)  count

set max soft file reader count.

Parameters
maxcount the soft file reader

◆ setSaveDebugMessagesToFile:

+ (void) setSaveDebugMessagesToFile: (BOOL)  saveDebugMessagesToFile

Sets whether to write debugging information of the SDK to the file.

Parameters
saveDebugMessagesToFileWhether to write debugging information of the SDK to the file.In the /Library/Application Support/log/ path, a file will be generated every day, for example:meishesdklog(2023-01-17).log. If you need to delete the file, you need to delete this directory by yourself, and the Meishesdk will not delete it actively.
Since
1.17.0

◆ setSpecialCameraDeviceType:

+ (void) setSpecialCameraDeviceType: (NSString *)  specialCameraType

set special camera device type to sdk.

Parameters
specialCameraTypespecial device type

◆ setStreamingPoolSizeInByte:

+ (void) setStreamingPoolSizeInByte: (int)  maxMemorySize

set max image reader count.

Parameters
countthe max image reader

◆ setTemplate:customResourceDir:

- (void) setTemplate: (NSString *)  templateUuid
customResourceDir: (NSString *)  customResourceDir 

set templates custom resource folders

Parameters
templateUuidtemplate resource package ID
innerAssetDirPath of assets of project/template

◆ setThemeEndingEnabled:

- (BOOL) setThemeEndingEnabled: (BOOL)  enable

Sets whether the logo effect at the end of the theme is displayed or not.

Returns
Returns BOOL value. YES means setting is successful, NO means it fails.
See also
- setDefaultThemeEndingLogoImageFilePath:

◆ setupHumanDetectionData:dataFilePath:

+ (BOOL) setupHumanDetectionData: (int)  dataType
dataFilePath: (NSString *)  dataFilePath 

Initializes human detection data packets.

Parameters
dataTypeType of human detection packet. Please refer to Type of human detection packete
dataFilePathPath of the data file
Returns
The return value indicates whether it is successful.
Since
2.6.0

◆ setUserWatermarkForCapture:displayWidth:displayHeight:opacity:position:marginX:marginY:

- (void) setUserWatermarkForCapture: (NSString *)  watermarkFilePath
displayWidth: (int)  displayWidth
displayHeight: (int)  displayHeight
opacity: (float)  opacity
position: (NvsTimelineWatermarkPosition position
marginX: (int)  marginX
marginY: (int)  marginY 

Adds a custom watermark for capturing video.

Parameters
watermarkFilePathPath of the watermark file, which should be a .PNG or .JPG file.
displayWidthThe width of the watermark displayed in the preview. If it is 0, the original width of the image is used.
displayHeightThe height of the watermark displayed in the preview. If it is 0, the original height of the image is used.
opacityWatermark opacity, the range of which is 0~1
positionPosition of the watermark, please refer to NvsTimelineWatermarkPosition.
marginXWatermark horizontal margin
marginYWatermark vertical margin
Since
2.0.1

◆ setVideoStabilization:

- (void) setVideoStabilization: (VideoStabilizationFlag flags

Sets video stabilization.

Parameters
flagsVideo stabilization value
See also
- getVideoStabilization

◆ setZoomFactor:

- (void) setZoomFactor: (float)  zoomFactor

Sets the zoom factor.

Parameters
zoomFactorZoom ratio
See also
- getZoomFactor

◆ sharedInstance

+ (NvsStreamingContext *) sharedInstance

Gets a unique instance of the streaming context.

Returns
Returns an object instance of the streaming context.
See also
+ destroyInstance

◆ sharedInstanceWithFlags:

+ (NvsStreamingContext *) sharedInstanceWithFlags: (NvsStreamingContextFlag flags

Gets a unique instance of the streaming context. For details, please refer to 4k Video Editing.

Parameters
flagsFlag field. If there is no special requirement, please fill in 0.
Returns
Returns the NvsStreamingContext object.
Since
1.5.0
See also
+ destroyInstance

◆ startAutoExposure:

- (void) startAutoExposure: (CGPoint)  pointOfInterest

Starts automatic exposure adjustment.

Parameters
pointOfInterestExposure adjustment point

◆ startAutoFocus:

- (void) startAutoFocus: (CGPoint)  focusPointOfInterest

Starts autofocus.

Parameters
focusPointOfInterestThe target area for autofocus, of which coordinates are in live-window's coordinate system
See also
- cancelAutoFocus

◆ startBufferCapturePreview:height:fps:rotation:flipHorizontally:

- (BOOL) startBufferCapturePreview: (unsigned int)  width
height: (unsigned int)  height
fps: (const NvsRational *)  fps
rotation: (int)  rotation
flipHorizontally: (BOOL)  flipHorizontally 

Starts the capture preview with inputting buffer mode.

Parameters
widthInput buffer width.
heightInput buffer height.
fpsInput buffer framerate.
rotationInput buffer rotation angle. Please refer to Image rotation angle of input buffer
flipHorizontallywhether to flip the buffer horizontally.
Returns
Returns BOOL value. YES indicates that the preview is started successfully, and NO means the opposite.
See also
sendBufferToCapturePreview

◆ startCapturePreview:videoResGrade:flags:aspectRatio:

- (BOOL) startCapturePreview: (unsigned int)  captureDeviceIndex
videoResGrade: (NvsVideoCaptureResolutionGrade videoResGrade
flags: (int)  flags
aspectRatio: (const NvsRational *)  aspectRatio 

Starts the capture preview.

Parameters
captureDeviceIndexIndex of the capture device
videoResGradeVideo capture resolution level. The video resolution is defined by the short side (width or height) of the captured video. Value of the other side (width or height) is calculated according to the video aspect ratio (nil means the aspect ratio will be determined by the system capture device). It includes three levels, namely low, medium and high, the front camera corresponds to 480P, 540P, 720P, and the rear camera corresponds to 540P, 720P, 1080P. If the user wants to customize the recording resolution, such as 540*960 pixels, then it will need to record a video with equal 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 call compileTimeline(), and the compiled level should be set to NvsCompileVideoResolutionGradeCustom. The example code is as follows:
    NvsVideoResolution videoEditRes;
    videoEditRes.imageWidth = 540;
    videoEditRes.imageHeight = 960;
    videoEditRes.imagePAR = (NvsRational){1, 1};
    NvsRational videoFps = {25, 1};
    NvsAudioResolution audioEditRes;
    audioEditRes.sampleRate = 48000;
    audioEditRes.channelCount = 2;
    audioEditRes.sampleFormat = NvsAudSmpFmt_S16;
    self.timeline = [_context createTimeline:&videoEditRes videoFps:&videoFps audioEditRes:&audioEditRes];
    [_context setCustomCompileVideoHeight:960];
    [self.context compileTimeline:self.timeline startTime:0 endTime:self.timeline.duration outputFilePath:videoPath
    videoResolutionGrade:NvsCompileVideoResolutionGradeCustom videoBitrateGrade:NvsCompileBitrateGradeMedium flags:0];
flagsFlag field, if there is no special requirement, please fill in 0. Please refer to NvsStreamingEngineCaptureFlag. The application scene for each flag is as follows:
NvsStreamingEngineCaptureFlag_GrabCapturedVideoFrame which is used in grabing video frame;
NvsStreamingEngineCaptureFlag_StrictPreviewVideoSize is used for face detection combination with NvsStreamingEngineCaptureFlag_CaptureBuddyHostVideoFrame;
NvsStreamingEngineCaptureFlag_DontCaptureAudio Used for live video without audio stream. Usually not used.
aspectRatioAspect ratio for previewing, setting nil means that it will be determined by the system capture device.
Returns
Returns BOOL value. YES indicates that the preview is started successfully, and NO means the opposite.

◆ startContinuousFocus

- (void) startContinuousFocus

Starts continuous focus.

◆ startRecording:

- (BOOL) startRecording: (NSString *)  outputFilePath

Starts recording. Please refer to Method of Recording Video.

Parameters
outputFilePathThe path to the recording file. Note: .mov is recommended as the output format.
Returns
Returns a BOOL value. Returning YES means it starts recording successfully, and NO means it fails to start.
See also
- stopRecording

◆ startRecording:withFlags:

- (BOOL) startRecording: (NSString *)  outputFilePath
withFlags: (int)  flags 

Starts recording. Please refer to Method of Recording Video.

Parameters
outputFilePathThe path to the recording file. Note: .mov is recommended as the output format.
flagsFlag field, if there is no special requirement, please fill in 0. Please refer to NvsStreamingEngineRecordingFlag
Returns
Returns a BOOL value. Returning YES means it starts recording successfully, and NO means it fails to start.
Since
1.5.1
See also
- stopRecording

◆ startRecording:withFlags:withRecordConfigurations:

- (BOOL) startRecording: (NSString *)  outputFilePath
withFlags: (int)  flags
withRecordConfigurations: (NSMutableDictionary *)  withRecordConfigurations 

Starts recording. Please refer to Method of Recording Video.

Parameters
outputFilePathThe path to the recording file. Note: .mov is recommended as the output format.
flagsFlag field, if there is no special requirement, please fill in 0. Please refer to NvsStreamingEngineRecordingFlag
withRecordConfigurationsRecording configuration. For the key values in NSMutableDictionary, please refer to Recording Video Configuration:
For instance:NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_RECORD_GOP_SIZE]; // setting 1 means it will generate an I-frame video. [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_RECORD_BITRATE]; // 10M bps
Returns
Returns a BOOL value. Returning YES means it starts recording successfully, and NO means it fails to start.
Since
1.16.0
See also
- stopRecording

◆ startRecordingWithFx:

- (BOOL) startRecordingWithFx: (NSString *)  outputFilePath

Starts to record, and the recorded content contains all the special effects which applied.

Note: If the effect processed is too complicated, it may cause the recorded video to drop frames. Therefore, users must be careful when using this method. Make sure that the effects can be processed in real time for the current phone. Please refer to Method of Recording Video.

Parameters
outputFilePathThe path to the recording file. Note: .mov is recommended as the output format.
Returns
Returns a BOOL value. Returning YES means it starts recording successfully, and NO means it fails to start.
See also
- stopRecording

◆ startRecordingWithFx:withFlags:

- (BOOL) startRecordingWithFx: (NSString *)  outputFilePath
withFlags: (int)  flags 

Starts to record, and the recorded content contains all the special effects which applied.

Note: If the effect processed is too complicated, it may cause the recorded video to drop frames. Therefore, users must be careful when using this method. Make sure that the effects can be processed in real time for the current phone. Please refer to Method of Recording Video.

Parameters
outputFilePathThe path to the recording file. Note: .mov is recommended as the output format.
flagsFlag field, if there is no special requirement, please fill in 0. Please refer to NvsStreamingEngineRecordingFlag
Returns
Returns a BOOL value. Returning YES means it starts recording successfully, and NO means it fails to start.
Since
1.5.1
See also
- stopRecording

◆ startRecordingWithFx:withFlags:withRecordConfigurations:

- (BOOL) startRecordingWithFx: (NSString *)  outputFilePath
withFlags: (int)  flags
withRecordConfigurations: (NSMutableDictionary *)  withRecordConfigurations 

Starts recording. Please refer to Method of Recording Video.

Parameters
outputFilePathThe path to the recording file. Note: .mov is recommended as the output format.
flagsFlag field, if there is no special requirement, please fill in 0. Please refer to NvsStreamingEngineRecordingFlag
withRecordConfigurationsRecording configuration. For the key values in NSMutableDictionary, please refer to Recording Video Configuration:
For instance:NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_RECORD_GOP_SIZE]; // setting 1 means it will generate an I-frame video. [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_RECORD_BITRATE]; // 10M bps
Returns
Returns a BOOL value. Returning YES means it starts recording successfully, and NO means it fails to start.
Since
1.16.0
See also
- stopRecording

◆ stop

- (void) stop

Stops the engine.

◆ stop:

- (void) stop: (int)  flags

tops the engine

Parameters
flagsFlag of stopping the engine. Please refer to NvsStreamingEngineStopFlag.
Since
2.3.0

◆ stopRecording

- (void) stopRecording

Stops recording.

See also
- startRecording:

◆ takePicture:

- (BOOL) takePicture: (int)  flags

take a picture with the max resolution of camera which matches the preview resolution best

Parameters
flagstake picture flag. value is 0

◆ toggleFlash:

- (void) toggleFlash: (BOOL)  on

Sets which the flash light is on/off.

Parameters
onwhether the flash light is on or not
See also
- isFlashOn

◆ toggleFlashMode:

- (void) toggleFlashMode: (NvsCameraFlashMode mode

Sets the flash mode.

Parameters
modeflash mode value, please refer to Flash Mode
See also
- getFlashMode

◆ verifySdkLicenseFile:

+ (BOOL) verifySdkLicenseFile: (NSString *)  sdkLicenseFilePath

Verifies the SDK license file. Note: The license file interface must be called before the NvsStreamingContext is initialized.

Parameters
sdkLicenseFilePathPath of SDK license file
Returns
Returns the BOOL value. YES indicates that the authorization verification is successful, and NO indicates that it fails. If the verification fails, a subsequent watermark will appear in the video preview and the compiled video.

Property Documentation

◆ assetPackageManager

- (NvsAssetPackageManager*) assetPackageManager
readatomicassign

Package manager.

◆ compileConfigurations

- (NSMutableDictionary*) compileConfigurations
readwritenonatomicassign

Sets the timeline configurations, which stay valid once set. For key values in NSMutableDictionary, please refer to Configuration of Compilation Timeline For instance: NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_COMPILE_GOP_SIZE]; //If set to 1 then a I-frame-only video is compiled. [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_COMPILE_BITRATE]; // 10M bps [config setValue:[NSNumber numberWithInteger:256000] forKey:NVS_COMPILE_AUDIO_BITRATE]; // Sets the audio bitrate to 256Kbps [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_LOSSLESS_AUDIO]; //Sets to generate lossless audio [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_OPTIMIZE_FOR_NETWORK_USE]; //Sets index table to prepose _streamingContext.compileConfigurations = config; Cancels configurations and returns to default settings:[_streamingContext.compileConfigurations setValue:nil forKey:NVS_COMPILE_GOP_SIZE];.

Since
1.8.0

◆ compileVideoBitrateMultiplier

- (float) compileVideoBitrateMultiplier
readwritenonatomicassign

Bitrate multiplier of compiling video.

Since
1.5.0

◆ defaultCaptionFade

- (BOOL) defaultCaptionFade
readwritenonatomicassign

Whether the default caption effect is fade in and out.

Since
1.8.0

◆ delegate

- (id<NvsStreamingContextDelegate>) delegate
readwritenonatomicweak

◆ imageGrabberDelegate

- (id<NvsImageGrabberDelegate>) imageGrabberDelegate
readwritenonatomicweak

◆ recordVideoBitrateMultiplier

- (float) recordVideoBitrateMultiplier
readwritenonatomicassign

Bitrate multiplier of recording video.

Since
1.5.0

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