| 
    美摄SDK For iOS
    3.7.2
    
   | 
 
流媒体上下文 更多...
#import <NvsStreamingContext.h>
 属性 | |
| id< NvsStreamingContextDelegate > | delegate | 
| NvsAssetPackageManager * | assetPackageManager | 
| 包管理器  更多... | |
| float | compileVideoBitrateMultiplier | 
| 生成视频码率倍乘系数  更多... | |
| float | recordVideoBitrateMultiplier | 
| 录制视频码率倍乘系数  更多... | |
| BOOL | defaultCaptionFade | 
| 默认字幕是否为淡入淡出  更多... | |
| id< NvsImageGrabberDelegate > | imageGrabberDelegate | 
| NSMutableDictionary * | compileConfigurations | 
| 生成时间线配置,设置一次即一直生效。NSMutableDictionary中关键字的值请参见 生成时间线的配置 例如:NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_COMPILE_GOP_SIZE]; // 设置为1即是生成全I帧视频 [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_COMPILE_BITRATE]; // 10M bps [config setValue:[NSNumber numberWithInteger:256000] forKey:NVS_COMPILE_AUDIO_BITRATE]; // 设置音频码率为256Kbps [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_LOSSLESS_AUDIO]; // 设置生成无损音频 [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_OPTIMIZE_FOR_NETWORK_USE]; // 设置索引表前置 NvsRational videoFps = {12, 1}; [config setValue:[NSData dataWithBytes:&videoFps length:sizeof(NvsRational)] forKey:NVS_COMPILE_VIDEO_FPS]; // 设置帧速率FPS _streamingContext.compileConfigurations = config; 取消设置并恢复默认方式例如:[_streamingContext.compileConfigurations setValue:nil forKey:NVS_COMPILE_GOP_SIZE];  更多... | |
流媒体上下文
流媒体上下文类可视作整个SDK框架的入口。开发过程中,NvsStreamingContext类提供了静态sharedInstance()接口创建流上下文的唯一实例。 通过这个实例对象,我们可以开启采集设备录制视频,添加采集视频特效,设置拍摄时的各项参数,包括自动聚焦,自动曝光调节,开关换补光灯等。 同时,还能够创建时间线,并将时间线与实时预览窗口(Live Window)连接起来,实时预览播放已经拍摄完成的视频。整个视频制作完成后,要销毁流媒体上下文的对象实例。 带特效拍摄时,添加素材资源包(采集特效包,场景资源包等),都得先安装,安装成功后获取packageId才能使用,而内建采集特效(builtin)只需获取特效名称即可使用。 
sdk接口中凡是需要传入资源、授权等文件路径时一定是全路径。 
| - (NvsCaptureAnimatedSticker *) addCustomCaptureAnimatedSticker: | (int64_t) | inPoint | |
| duration: | (int64_t) | duration | |
| animatedStickerPackageId: | (NSString *) | animatedStickerPackageId | |
| customImagePath: | (NSString *) | customImagePath | |
在拍摄上添加自定义动画贴纸
| inPoint | 自定义动画贴纸在时间线上的入点(单位微秒) | 
| duration | 自定义动画贴纸的显示时长(单位微秒) | 
| animatedStickerPackageId | 自定义动画贴纸包Id | 
| customImagePath | 自定义动画贴纸图像路径(可以是jpg、png图像,或者美摄sdk内部支持的动态caf格式图像) | 
| - (NvsCaptureVideoFx *) appendBeautyCaptureVideoFx | 
| - (NvsCaptureAudioFx *) appendBuiltinCaptureAudioFx: | (NSString *) | audioFxName | 
追加一个内建音频特效
| audioFxName | 音频特效名。获取音频特效名称,请参见getAllBuiltinCaptureAudioFxNames()或内建特效名称列表。 | 
| - (NvsCaptureVideoFx *) appendBuiltinCaptureVideoFx: | (NSString *) | videoFxName | 
追加一个内建视频特效
| videoFxName | 视频特效名。获取视频特效名称,请参见getAllBuiltinCaptureVideoFxNames()或内建特效名称列表。 | 
| - (NvsCaptureAnimatedSticker *) appendCaptureAnimatedSticker: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| animatedStickerPackageId: | (NSString *) | animatedStickerPackageId | |
追加一个动画贴纸
| offsetTime | 动画贴纸的偏移时间。 | 
| duration | 动画贴纸的持续时间。 | 
| animatedStickerPackageId | 动画贴纸包Id。 | 
| - (NvsCaptureCaption *) appendCaptureCaption: | (NSString *) | captionText | |
| offsetTime: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| captionStylePackageId: | (NSString *) | captionStylePackageId | |
追加一个字幕
| captionText | 字幕的文字 | 
| offsetTime | 字幕的偏移时间。 | 
| duration | 字幕的持续时间。 | 
| captionStylePackageId | 字幕样式包Id,不存在的话,可以传空字符串或者null | 
| - (NvsCaptureCompoundCaption *) appendCaptureCompoundCaption: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| compoundCaptionPackageId: | (NSString *) | compoundCaptionPackageId | |
追加一个复合字幕
| offsetTime | 复合字幕的偏移时间。 | 
| duration | 复合字幕的持续时间。 | 
| compoundCaptionPackageId | 复合字幕包Id。 | 
| - (NvsCaptureCaption *) appendCaptureModularCaption: | (NSString *) | captionText | |
| offsetTime: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
追加一个模块字幕
| captionText | 字幕的文字 | 
| offsetTime | 字幕的偏移时间。 | 
| duration | 字幕的持续时间。 | 
| - (NvsCaptureVideoFx *) appendCustomCaptureVideoFx: | (id< NvsCustomVideoFxRenderer >) | customVideoFxRender | 
追加自定义采集视频特效
| customVideoFxRender | 用户实现的自定义视频特效渲染器接口 | 
| - (NvsCaptureVideoFx *) appendPackagedCaptureVideoFx: | (NSString *) | videoFxPackageId | 
追加一个包裹视频特效
| videoFxPackageId | 视频特效包裹ID | 
| - (BOOL) applyCaptureScene: | (NSString *) | captureSceneId | 
对采集设备应用拍摄场景资源包
| captureSceneId | 拍摄场景资源包的ID | 
| - (BOOL) applyCaptureScene: | (NSString *) | captureSceneId | |
| captureSceneInfo: | (NvsCaptureSceneInfo *) | info | |
对采集设备应用拍摄场景资源包
| captureSceneId | 拍摄场景资源包的ID | 
| info | 待替换的资源信息 | 
| - (long) calcDurationAfterCurvesVariableSpeed: | (NSString *) | curvesString | 
| - (void) cancelAutoFocus | 
取消正在进行中的自动聚焦
| - (unsigned int) captureDeviceCount | 
采集设备的数量
| - (void) clearCachedResources: | (BOOL) | asynchronous | 
清除缓存资源
| asynchronous | 是否异步 | 
| - (void) clearCachedResources: | (BOOL) | asynchronous | |
| flags: | (int) | flags | |
清除缓存资源
| asynchronous | 是否异步 | 
| flags | 清除缓存标志,如无特殊需求请填写0。请参见 NvsClearCacheFlag。 | 
| + (void) closeHumanDetection | 
关闭人体检测机制
| - (BOOL) compilePassthroughTimeline: | (NvsTimeline *) | timeline | |
| outputFilePath: | (NSString *) | outputFilePath | |
| compileConfigurations: | (NSMutableDictionary *) | configurations | |
| flags: | (int) | flags | |
将时间线中视频轨道0上的视频片段直通生成一个视频,不处理滤镜、多轨和嵌套时间线,如果有图片则失败
| timeline | 时间线对象 | 
| outputFilePath | 生成输出的文件路径 | 
| configurations | 时间线配置,只支持添加NVS_COMPILE_CREATION_TIME、NVS_COMPILE_OPTIMIZE_FOR_NETWORK_USE、NVS_COMPILE_METADATADESCRIPTION | 
| flags | 生成文件输出的特殊标志,如果没有特殊需求,请填写0。 | 
| - (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 | |
时间线生成视频文件
| timeline | 时间线 | 
| startTime | 开始时间(单位微秒)。startTime取值范围在[0,timeline.duration - 1],传入其他值无效。 | 
| endTime | 结束时间(单位微秒)。endTime取值范围在(startTime,timeline.duration],同样传入其他值无效。 | 
| outputFilePath | 生成视频输出的文件路径。注意: 目前只支持输出.mov格式的文件 | 
| videoResolutionGrade | 生成视频输出的分辨率级别 | 
| videoBitrateGrade | 生成视频输出的码率。视频输出码率级别分为低码率,中等码率,高等码率。视频生成具体码率值跟生成视频的分辨率有关,这里以1280 * 720p为例,计算出不同码率级别对应的近似值, NvsCompileBitrateGradeLow级别值为2.2Mbps,NvsCompileBitrateGradeMedium级别值为3.3Mbps,NvsCompileBitrateGradeHigh级别值为6Mbps。 | 
| compileConfigurations | 时间线配置 NSMutableDictionary中关键字的值请参见 生成时间线的配置 | 
| flags | 生成视频输出的特殊标志。请参见 NvsStreamingEngineCompileFlag | 
| - (BOOL) compileTimeline: | (NvsTimeline *) | timeline | |
| startTime: | (int64_t) | startTime | |
| endTime: | (int64_t) | endTime | |
| outputFilePath: | (NSString *) | outputFilePath | |
| videoResolutionGrade: | (NvsCompileVideoResolutionGrade) | videoResolutionGrade | |
| videoBitrateGrade: | (NvsCompileVideoBitrateGrade) | videoBitrateGrade | |
| flags: | (int) | flags | |
时间线生成视频文件
| timeline | 时间线 | 
| startTime | 开始时间(单位微秒)。startTime取值范围在[0,timeline.duration - 1],传入其他值无效。 | 
| endTime | 结束时间(单位微秒)。endTime取值范围在(startTime,timeline.duration],同样传入其他值无效。 | 
| outputFilePath | 生成视频输出的文件路径。注意: 目前只支持输出.mov格式的文件 | 
| videoResolutionGrade | 生成视频输出的分辨率级别 | 
| videoBitrateGrade | 生成视频输出的码率。视频输出码率级别分为低码率,中等码率,高等码率。视频生成具体码率值跟生成视频的分辨率有关,这里以1280 * 720p为例,计算出不同码率级别对应的近似值, NvsCompileBitrateGradeLow级别值为2.2Mbps,NvsCompileBitrateGradeMedium级别值为3.3Mbps,NvsCompileBitrateGradeHigh级别值为6Mbps。 | 
| flags | 生成视频输出的特殊标志。请参见 NvsStreamingEngineCompileFlag | 
| - (BOOL) connectCapturePreviewWithLiveWindow: | (NvsLiveWindow *) | liveWindow | 
| - (BOOL) connectCapturePreviewWithVideoFrameReceiver: | (NvsVideoFrameReceiver *) | receiver | 
连接采集预览和视频帧接收器
| receiver | 视频帧接收器 | 
| - (BOOL) connectTimeline: | (NvsTimeline *) | timeline | |
| withLiveWindow: | (NvsLiveWindow *) | liveWindow | |
连接时间线和实时预览窗口
| timeline | 时间线 | 
| liveWindow | 实时预览窗口 | 
| - (BOOL) connectTimeline: | (NvsTimeline *) | timeline | |
| withVideoFrameReceiver: | (NvsVideoFrameReceiver *) | receiver | |
连接时间线和视频帧接收器
| timeline | 时间线 | 
| receiver | 视频帧接收器 | 
| - (NvsStreamingContext *) createAuxiliaryStreamingContext: | (int) | flags | 
创建辅助流媒体上下文对象
| flags | 流媒体上下文创建标志 | 
| - (NvsTimeline *) createTimeline: | (NSString *) | templateId | |
| templateFootages: | (NSArray< NvsTemplateFootageInfo * > *) | templateFootages | |
用模板资源创建时间线
| templateId | 模板资源uuid | 
| templateFootages | 模板资源里footage的对应信息 | 
| - (NvsTimeline *) createTimeline: | (NSString *) | templateId | |
| templateFootages: | (NSArray< NvsTemplateFootageInfo * > *) | templateFootages | |
| flags: | (int) | flags | |
用模板资源创建时间线
| templateId | 模板资源uuid | 
| templateFootages | 模板资源里footage的对应信息 | 
| flags | 创建时间线的特殊标志,如果没有特殊需求,请填写0。请参见NvsCreateTimelineTypeFlag | 
| - (NvsTimeline *) createTimeline: | (NSString *) | templateId | |
| templateFootages: | (NSArray< NvsTemplateFootageInfo * > *) | templateFootages | |
| flags: | (int) | flags | |
| videoFps: | (NvsRational *) | videoFps | |
| audioEditRes: | (NvsAudioResolution *) | audioEditRes | |
用模板资源创建时间线
| templateId | 模板资源uuid,必须先安装模板 | 
| templateFootages | 模板资源里footage的对应信息 | 
| flags | 创建时间线的特殊标志,如果没有特殊需求,请填写0。请参见创建时间线标志 | 
| videoFps | 视频帧率,最大60fps | 
| audioEditRes | 音频解析度(指定采样率、采样格式及声道数)。对于音频编辑解析度,传入的采样率值支持两种:44100与48000。支持单声道和立体声 | 
| - (NvsTimeline *) createTimeline: | (NvsVideoResolution *) | videoEditRes | |
| videoFps: | (NvsRational *) | videoFps | |
| audioEditRes: | (NvsAudioResolution *) | audioEditRes | |
创建时间线
| videoEditRes | 视频编辑解析度(指定视频宽高及像素比)。对于视频编辑解析度,在传入对应参数值时,目前要求传入的图像宽度值是4的倍数,高度值是2的倍数。注:如果创建NvsStreamingContext单例对象,支持4k视频编辑,则视频编辑解析度里的imageWidth * imageHeight不能高于3840*2160像素,否则视频编辑解析度里的imageWidth * imageHeight不能高于1920 * 1080像素。 | 
| videoFps | 视频帧率,最高60fps | 
| audioEditRes | 音频编辑解析度(指定采样率、采样格式及声道数)。对于音频编辑解析度,传入的采样率值支持两种:44100与48000,支持单声道和双声道 | 
| - (NvsTimeline *) createTimeline: | (NvsVideoResolution *) | videoEditRes | |
| videoFps: | (NvsRational *) | videoFps | |
| audioEditRes: | (NvsAudioResolution *) | audioEditRes | |
| bitDepth: | (NvsVideoResolutionBitDepth) | depth | |
| flags: | (int) | flags | |
创建时间线
| videoEditRes | 视频编辑解析度(指定视频宽高及像素比)。对于视频编辑解析度,在传入对应参数值时,目前要求传入的图像宽度值是4的倍数,高度值是2的倍数。注:如果创建NvsStreamingContext单例对象,支持4k视频编辑,则视频编辑解析度里的imageWidth * imageHeight不能高于3840*2160像素,否则视频编辑解析度里的imageWidth * imageHeight不能高于1920 * 1080像素。 | 
| videoFps | 视频帧率,最高60fps | 
| audioEditRes | 音频编辑解析度(指定采样率、采样格式及声道数)。对于音频编辑解析度,传入的采样率值支持两种:44100与48000,支持单声道和双声道 | 
| bitDepth | 时间线视频的位深度,目前支持8bit, 16bit float,和auto | 
| flags | 创建时间线的特殊标志,如果没有特殊需求,请填写0。请参见NvsCreateTimelineTypeFlag | 
| - (NvsTimeline *) createTimeline: | (NvsVideoResolution *) | videoEditRes | |
| videoFps: | (NvsRational *) | videoFps | |
| audioEditRes: | (NvsAudioResolution *) | audioEditRes | |
| flags: | (int) | flags | |
创建时间线
| videoEditRes | 视频编辑解析度(指定视频宽高及像素比)。对于视频编辑解析度,在传入对应参数值时,目前要求传入的图像宽度值是4的倍数,高度值是2的倍数。注:如果创建NvsStreamingContext单例对象,支持4k视频编辑,则视频编辑解析度里的imageWidth * imageHeight不能高于3840*2160像素,否则视频编辑解析度里的imageWidth * imageHeight不能高于1920 * 1080像素。 | 
| videoFps | 视频帧率,最高60fps | 
| audioEditRes | 音频编辑解析度(指定采样率、采样格式及声道数)。对于音频编辑解析度,传入的采样率值支持两种:44100与48000,支持单声道和双声道 | 
| flags | 创建时间线的特殊标志,如果没有特殊需求,请填写0。请参见NvsCreateTimelineTypeFlag | 
| - (NvsVideoFrameRetriever *) createVideoFrameRetriever: | (NSString *) | videoFilePath | 
创建视频帧提取对象
| videoFilePath | 原始视频文件路径 | 
| - (void) destoryAuxiliaryStreamingContext: | (NvsStreamingContext *) | auxContext | 
| + (void) destroyInstance | 
销毁流媒体上下文实例。
| - (float) detectEngineRenderFramePerSecond | 
从流媒体上下文中获取引擎当前的渲染速度,只在startCapturePreview和playbackTimeline之后有效。
| - (int) detectVideoFileKeyframeInterval: | (NSString *) | videoFilePath | 
探测视频文件的I帧间距
| videoFilePath | 视频文件的路径 | 
| - (BOOL) exportProjectInfo: | (NSString *) | projectUuid | |
| timeline: | (NvsTimeline *) | timeline | |
| requestedAspectRatio: | (int) | requestedAspectRatio | |
输出项目包的信息
| projectUuid | 项目资源包ID | 
| timeline | 时间线对象 | 
| requestedAspectRatio | 所需的项目画幅比例,一般和timeline的画幅比例一致.请参见资源包画幅比例 | 
| - (BOOL) exportTemplateInfo: | (NSString *) | templateUuid | |
| timeline: | (NvsTimeline *) | timeline | |
| requestedAspectRatio: | (int) | requestedAspectRatio | |
输出模版包的信息
| templateUuid | 模版资源包ID | 
| timeline | 时间线对象 | 
| requestedAspectRatio | 所需的模版画幅比例,一般和timeline的画幅比例一致.请参见模板资源包画幅比例 | 
| + (BOOL) functionalityAuthorised: | (NSString *) | sdkFunctionName | 
验证某项功能是否可用。
| sdkFunctionName | sdk功能的名字 | 
| - (BOOL) generateProjectPackage: | (NSString *) | projectUuid | |
| innerAssetDir: | (NSString *) | innerAssetDir | |
| projectOutputDir: | (NSString *) | projectOutputDir | |
生成项目包
| projectUuid | 项目资源包ID | 
| innerAssetDir | 项目内部资源文件夹路径 | 
| projectOutputDir | 项目资源包的输出路径 | 
| - (BOOL) generateTemplatePackage: | (NSString *) | templateUuid | |
| innerAssetDir: | (NSString *) | innerAssetDir | |
| templateOutputDir: | (NSString *) | templateOutputDir | |
生成模版包
| templateUuid | 模版资源包ID | 
| innerAssetDir | 模版内部资源文件夹路径 | 
| templateOutputDir | 模版资源包的输出路径 | 
| - (NSArray *) getAllBuiltinAudioFxNames | 
| - (NSArray *) getAllBuiltinCaptureVideoFxNames | 
| - (NSArray *) getAllBuiltinVideoFxNames | 
| - (NSArray *) getAllBuiltinVideoTransitionNames | 
获取全部内嵌视频转场名称
| - (NvsFxDescription *) getAudioFxDescription: | (NSString *) | fxName | 
| - (NvsAVFileInfo *) getAVFileInfo: | (NSString *) | avFilePath | 
获取文件的音视频信息,如果文件格式不支持,则返回null
| avFilePath | 文件路径 | 
| - (NvsAVFileInfo *) getAVFileInfo: | (NSString *) | avFilePath | |
| extraFlag: | (int) | extraFlag | |
| withError: | (NSMutableString *) | errString | |
获取音视频文件的详细信息
| avFilePath | 音视频文件的路径 | 
| extraFlag | 获取音视频文件的详细信息的特殊标识。请参见获取音视频信息时的特殊标识 | 
| errString | 如果当前函数返回为null, 当前参数有意义, 返回具体的错误信息。 | 
| - (NvsAVFileInfo *) getAVFileInfoExtra: | (NSString *) | avFilePath | |
| extraFlag: | (int) | extraFlag | |
| - (NSString *) getBeautyVideoFxName | 
| - (NvsCaptureAnimatedSticker *) getCaptureAnimatedStickerByIndex: | (unsigned int) | captureStikcerIndex | 
获得采集动画贴纸
| captureStikcerIndex | 动画贴纸索引 | 
| - (unsigned int) getCaptureAnimatedStickerCount | 
获得采集动画贴纸的数量
| - (NvsCaptureAudioFx *) getCaptureAudioFxByIndex: | (unsigned int) | captureAudioFxIndex | 
获得采集音频特效
| captureAudioFxIndex | 音频特效索引 | 
| - (unsigned int) getCaptureAudioFxCount | 
获得采集音频特效的数量
| - (NvsCaptureCaption *) getCaptureCaptionByIndex: | (unsigned int) | captureCaptionIndex | 
获得采集字幕
| captureStikcerIndex | 字幕索引 | 
| - (unsigned int) getCaptureCaptionCount | 
获得采集字幕的数量
| - (NvsCaptureCompoundCaption *) getCaptureCompoundCaptionByIndex: | (unsigned int) | captureCaptionIndex | 
获得采集复合字幕
| captureStikcerIndex | 复合字幕索引 | 
| - (unsigned int) getCaptureCompoundCaptionCount | 
获得采集复合字幕的数量
| - (NvsCaptureDeviceCapability *) getCaptureDeviceCapability: | (unsigned int) | catpureDeviceIndex | 
获取采集设备的能力描述对象
| catpureDeviceIndex | 采集设备索引 | 
| - (NvsSize) getCapturePreviewVideoSize: | (unsigned int) | catpureDeviceIndex | 
获取采集预览视频分辨率
| catpureDeviceIndex | 采集设备索引 | 
| - (NvsCaptureVideoFx *) getCaptureVideoFxByIndex: | (unsigned int) | captureVideoFxIndex | 
| - (unsigned int) getCaptureVideoFxCount | 
获得采集视频特效的数量
| - (float) getColorGainForSDRToHDR | 
获取在SDR向HDR转换时候色彩增益
| - (NSString *) getCurrentCaptureSceneId | 
取得当前拍摄场景资源包的ID
| - (unsigned int) getCustomCompileVideoHeight | 
获取当前自定义的生成视频高度。
| - (NSString *) getDefaultThemeEndingLogoImageFilePath | 
| - (NSString *) getDefaultVideoTransitionName | 
| - (EAGLSharegroup *) getEAGLSharegroup | 
从流媒体上下文中获取引擎所用的EAGLSharegroup对象
| - (int) getEngineHDRCaps | 
获取引擎的HDR能力
| - (float) getExposureBias | 
| - (NvsCameraFlashMode) getFlashMode | 
获取当前闪光灯模式
| - (NSArray*) getFontInfoByFilePath: | (NSString *) | fontFilePath | 
获取字体文件中字体信息
| fontFilePath | 字体文件路径 | 
| + (NSString *) getLogFileDirectory | 
获取日志文件所在路径
| + (void) getSdkVersion: | (int *) | majorVersion | |
| minorVersion: | (int *) | minorVersion | |
| revisionNumber: | (int *) | revisionNumber | |
获取美摄SDK的版本信息
| majorVersion | 主版本号 | 
| minorVersion | 次版本号 | 
| revisionNumber | 修订版本号 | 
| - (NvsStreamingEngineState) getStreamingEngineState | 
获取引擎状态
| - (int64_t) getTimelineCurrentPosition: | (NvsTimeline *) | timeline | 
取得时间线当前时间位置,单位为微秒
| timeline | 时间线 | 
| - (NvsFxDescription *) getVideoFxDescription: | (NSString *) | fxName | 
| - (VideoStabilizationFlag) getVideoStabilization | 
| - (float) getZoomFactor | 
| - (UIImage *) grabImageFromTimeline: | (NvsTimeline *) | timeline | |
| timestamp: | (int64_t) | timestamp | |
| proxyScale: | (const NvsRational *) | proxyScale | |
获取时间线某一时间戳的图像。详细情况参见视频帧图像提取专题
| timeline | 欲获取图像的时间线对象 | 
| timestamp | 欲获取图像的时间戳(单位是微秒)。timestamp取值范围在[0,timeline.duration - 1]。传入其他值无效,grabImageFromTimeline会返回nil。 | 
| proxyScale | 代理缩放比例,填写nil表示使用默认比例1:1 | 
| - (UIImage *) grabImageFromTimeline: | (NvsTimeline *) | timeline | |
| timestamp: | (int64_t) | timestamp | |
| proxyScale: | (const NvsRational *) | proxyScale | |
| flags: | (int) | flags | |
获取时间线某一时间戳的图像。详细情况参见视频帧图像提取专题
| timeline | 欲获取图像的时间线对象 | 
| timestamp | 欲获取图像的时间戳(单位是微秒)。timestamp取值范围在[0,timeline.duration - 1]。传入其他值无效,grabImageFromTimeline会返回nil。 | 
| proxyScale | 代理缩放比例,填写nil表示使用默认比例1:1 | 
| flags | 引擎定位的特殊标志。请参见 NvsStreamingEngineSeekFlag | 
| - (BOOL) grabImageFromTimelineAsync: | (NvsTimeline *) | timeline | |
| timestamp: | (int64_t) | timestamp | |
| proxyScale: | (const NvsRational *) | proxyScale | |
| flags: | (int) | flags | |
获取时间线某一时间戳的图像。详细情况参见视频帧图像提取专题 这个函数是内部异步调用,需要保证在获取到图像之前不会调用SeekTimeline(),如果在调用这个函数之后调用SeekTimeline的函数有可能收不到图像的回调,可以在这个函数之后调用Stop保证Grab image能执行成功
| timeline | 欲获取图像的时间线对象 | 
| timestamp | 欲获取图像的时间戳(单位微秒)。timestamp取值范围在[0,timeline.duration - 1]。传入其他值无效,grabImageFromTimeline会返回null。 | 
| proxyScale | 代理缩放比例 | 
| flags | 引擎定位的特殊标志。具体参见引擎定位标识 | 
| + (int) hasARModule | 
检测当前SDK是否含有AR模块
| + (BOOL) initHumanDetection: | (NSString *) | modelFilePath | |
| licenseFilePath: | (NSString *) | licenseFilePath | |
| features: | (int) | features | |
初始化人体检测机制, 只初始化一次
| modelFilePath | 人脸模型文件路径 | 
| licenseFilePath | 授权文件路径 | 
| features | 人体检测特征标志字段。请参见人体检测特征标志 | 
| + (BOOL) initHumanDetectionExt: | (NSString *) | modelFilePath | |
| licenseFilePath: | (NSString *) | licenseFilePath | |
| features: | (int) | features | |
初始化人体检测扩展机制,必须先调用initHumanDetection
| modelFilePath | 人脸模型文件路径 | 
| licenseFilePath | 授权文件路径 | 
| features | 人体检测特征标志字段。请参见人体检测特征标志 | 
| - (NvsCaptureVideoFx *) insertBeautyCaptureVideoFx: | (unsigned int) | insertPosition | 
| - (NvsCaptureAudioFx *) insertBuiltinCaptureAudioFx: | (NSString *) | audioFxName | |
| withInsertPosition: | (unsigned int) | insertPosition | |
插入一个内建音频特效
| audioFxName | 音频特效名。获取音频特效名称,请参见getAllBuiltinCaptureAudioFxNames()或内建特效名称列表。 | 
| insertPosition | 插入位置,是指特效的渲染顺序 | 
| - (NvsCaptureVideoFx *) insertBuiltinCaptureVideoFx: | (NSString *) | videoFxName | |
| withInsertPosition: | (unsigned int) | insertPosition | |
插入一个内建视频特效
| videoFxName | 视频特效名。获取视频特效名称,请参见getAllBuiltinCaptureVideoFxNames()或内建特效名称列表。 | 
| insertPosition | 插入位置,是指特效的渲染顺序 | 
| - (NvsCaptureAnimatedSticker *) insertCaptureAnimatedSticker: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| animatedStickerPackageId: | (NSString *) | animatedStickerPackageId | |
| insertPosition: | (unsigned int) | insertPosition | |
追加一个动画贴纸
| offsetTime | 动画贴纸的偏移时间。 | 
| duration | 动画贴纸的持续时间。 | 
| animatedStickerPackageId | 动画贴纸包Id。 | 
| insertPosition | 插入位置. | 
| - (NvsCaptureCaption *) insertCaptureCaption: | (NSString *) | captionText | |
| offsetTime: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| captionStylePackageId: | (NSString *) | captionStylePackageId | |
| insertPosition: | (unsigned int) | insertPosition | |
插入一个字幕
| captionText | 字幕的文字 | 
| offsetTime | 字幕的偏移时间。 | 
| duration | 字幕的持续时间。 | 
| captionStylePackageId | 字幕样式包Id,不存在的话,可以传空字符串或者null | 
| insertPosition | 插入位置. | 
| - (NvsCaptureCompoundCaption *) insertCaptureCompoundCaption: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| compoundCaptionPackageId: | (NSString *) | compoundCaptionPackageId | |
| insertPosition: | (unsigned int) | insertPosition | |
插入一个复合字幕
| offsetTime | 复合字幕的偏移时间。 | 
| duration | 复合字幕的持续时间。 | 
| compoundCaptionPackageId | 复合字幕包Id。 | 
| insertPosition | 插入位置. | 
| - (NvsCaptureCaption *) insertCaptureModularCaption: | (NSString *) | captionText | |
| offsetTime: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| insertPosition: | (unsigned int) | insertPosition | |
插入一个模块字幕
| captionText | 字幕的文字 | 
| offsetTime | 字幕的偏移时间。 | 
| duration | 字幕的持续时间。 | 
| insertPosition | 插入位置. | 
| - (NvsCaptureAnimatedSticker *) insertCustomCaptureAnimatedSticker: | (int64_t) | offsetTime | |
| duration: | (int64_t) | duration | |
| animatedStickerPackageId: | (NSString *) | animatedStickerPackageId | |
| customImagePath: | (NSString *) | customImagePath | |
| insertPosition: | (unsigned int) | insertPosition | |
插入一个动画贴纸
| offsetTime | 动画贴纸的偏移时间。 | 
| duration | 动画贴纸的持续时间。 | 
| animatedStickerPackageId | 动画贴纸包Id。 | 
| customImagePath | 自定义动画贴纸图像路径(可以是jpg、png图像,或者美摄sdk内部支持的动态caf格式图像) | 
| insertPosition | 插入位置. | 
| - (NvsCaptureVideoFx *) insertCustomCaptureVideoFx: | (id< NvsCustomVideoFxRenderer >) | customVideoFxRender | |
| withInsertPosition: | (int) | insertPosition | |
插入自定义采集视频特效
| customVideoFxRender | 用户实现的自定义视频特效渲染器接口 | 
| insertPosition | 插入位置,是指特效的渲染顺序 | 
| - (NvsCaptureVideoFx *) insertPackagedCaptureVideoFx: | (NSString *) | videoFxPackageId | |
| withInsertPosition: | (unsigned int) | insertPosition | |
插入一个包裹视频特效
| videoFxPackageId | 视频特效包裹ID | 
| insertPosition | 插入位置,是指特效的渲染顺序 | 
| - (BOOL) isBlackFrame: | (UIImage *) | image | 
检测是否是纯黑色的图片。
| 待检测的image | 
| - (BOOL) isCaptureDeviceBackFacing: | (unsigned int) | catpureDeviceIndex | 
是否为后置采集设备
| catpureDeviceIndex | 采集设备索引 | 
| - (BOOL) isCompilingPaused | 
| - (BOOL) isFlashOn | 
| - (BOOL) isPlaybackPaused | 
| - (BOOL) isRecordingPaused | 
| - (NvsTimeline *) loadProject: | (NSString *) | projectId | |
| resourceDir: | (NSString *) | resourceDir | |
用项目资源创建时间线
| projectId | 项目uuid | 
| resourceDir | 项目资源文件夹路径 | 
| - (BOOL) pauseCompiling | 
| - (BOOL) pausePlayback | 
| - (BOOL) pauseRecording | 
暂停录制采集信号。暂停录制之后再继续录制会录制到同一个媒体文件中。注意:只有不使用系统内置recorder时才能暂停录制!
| - (BOOL) playbackTimeline: | (NvsTimeline *) | timeline | |
| startTime: | (int64_t) | startTime | |
| endTime: | (int64_t) | endTime | |
| proxyScale: | (const NvsRational *) | proxyScale | |
| preload: | (BOOL) | preload | |
| flags: | (int) | flags | |
播放时间线
| timeline | 时间线 | 
| startTime | 开始时间(单位是微秒)。startTime取值范围在[0,timeline.duration - 1]。传入其他值无效,playbackTimeline会返回No导致无法开启播放。 | 
| endTime | 结束时间(单位是微秒)。如果endTime值传入是负值,则默认播放到视频末尾。 | 
| proxyScale | 代理缩放比例 | 
| preload | 是否预先加载 | 
| flags | 预览的特殊标志,如无特殊需求,请填写0。请参见 NvsStreamingEnginePlaybackFlag | 
| - (BOOL) playbackTimeline: | (NvsTimeline *) | timeline | |
| startTime: | (int64_t) | startTime | |
| endTime: | (int64_t) | endTime | |
| videoSizeMode: | (NvsVideoPreviewSizeMode) | videoSizeMode | |
| preload: | (BOOL) | preload | |
| flags: | (int) | flags | |
播放时间线
| timeline | 时间线 | 
| startTime | 开始时间(单位是微秒)。startTime取值范围在[0,timeline.duration - 1]。传入其他值无效,playbackTimeline会返回No导致无法开启播放。 | 
| endTime | 结束时间(单位是微秒)。如果endTime值传入是负值,则默认播放到视频末尾。 | 
| videoSizeMode | 图像预览模式 | 
| preload | 是否预先加载 | 
| flags | 预览的特殊标志,如无特殊需求,请填写0。请参见 NvsStreamingEnginePlaybackFlag | 
| - (BOOL) preloadEffectResources | 
预加载特技资源
| - (NSString*) registerFontByFilePath: | (NSString *) | fontFilePath | 
获取字体文件的fontFamily
| fontFilePath | 字体文件路径 | 
| - (void) removeAllCaptureAnimatedSticker | 
| - (void) removeAllCaptureAudioFx | 
| - (void) removeAllCaptureCaption | 
移除所有采集字幕
| - (void) removeAllCaptureCompoundCaption | 
移除所有采集复合字幕
| - (void) removeAllCaptureVideoFx | 
移除所有采集视频特效
| - (BOOL) removeCaptureAnimatedSticker: | (unsigned int) | captureAnimagedStickerIndex | 
对移除特定索引值的采集动画贴纸
| captureVideoFxIndex | 动画贴纸索引 | 
| - (BOOL) removeCaptureAudioFx: | (unsigned int) | captureAudioFxIndex | 
对移除特定索引值的采集音频特效
| captureVideoFxIndex | 音频特效索引 | 
| - (BOOL) removeCaptureCaption: | (unsigned int) | captureCaptionIndex | 
对移除特定索引值的采集字幕
| captureCompoundCaptionIndex | 字幕贴纸索引 | 
| - (BOOL) removeCaptureCompoundCaption: | (unsigned int) | captureCompoundCaptionIndex | 
对移除特定索引值的采集复合字幕
| captureCompoundCaptionIndex | 复合字幕索引 | 
| - (BOOL) removeCaptureVideoFx: | (unsigned int) | captureVideoFxIndex | 
对移除特定索引值的采集视频特效
| captureVideoFxIndex | 视频特效索引 | 
| - (void) removeCurrentCaptureScene | 
| - (BOOL) removeTimeline: | (NvsTimeline *) | timeline | 
| - (void) removeUserWatermarkForCapture | 
移除为视频采集添加的用户水印。
| - (BOOL) resumeCompiling | 
| - (BOOL) resumePlayback | 
| - (BOOL) resumeRecording | 
| - (NvsColor) sampleColorFromCapturedVideoFrame: | (CGRect) | sampleRect | 
对采集设备的视频帧内容进行采样
| sampleRect | 采样的矩形区域,坐标为实时预览窗口的自身坐标系 | 
| - (BOOL) seekTimeline: | (NvsTimeline *) | timeline | |
| timestamp: | (int64_t) | timestamp | |
| proxyScale: | (const NvsRational *) | proxyScale | |
| flags: | (int) | flags | |
定位某一时间戳的图像
| timeline | 时间线 | 
| timestamp | 时间戳(单位是微秒)。timestamp取值范围在[0,timeline.duration - 1]。传入其他值无效,seekTimeline会返回No,导致无法开启定位。 | 
| proxyScale | 代理缩放比例 | 
| flags | 引擎定位的特殊标志。请参见 NvsStreamingEngineSeekFlag | 
| - (BOOL) seekTimeline: | (NvsTimeline *) | timeline | |
| timestamp: | (int64_t) | timestamp | |
| videoSizeMode: | (NvsVideoPreviewSizeMode) | videoSizeMode | |
| flags: | (int) | flags | |
定位某一时间戳的图像
| timeline | 时间线 | 
| timestamp | 时间戳(单位是微秒)。timestamp取值范围在[0,timeline.duration - 1]。传入其他值无效,seekTimeline会返回No,导致无法开启定位。 | 
| videoSizeMode | 图像预览模式 | 
| flags | 引擎定位的特殊标志。请参见 NvsStreamingEngineSeekFlag | 
| - (BOOL) sendBufferToCapturePreview: | (const NvsVideoFrameInfo *) | data | 
输入buffer给采集设备预览
| data | 输入buffer的数据和相应信息。仅支持NV12格式的数据 | 
| - (void) setAudioOutputDeviceVolume: | (float) | volume | 
设置音频输出设备音量
| volume | 新的音量 取值范围[0,1] | 
| - (void) setAudioSampleInfoForCallback: | (NvsCapturedAudioSampleInfo *) | info | 
设置需要回调的采集音频信息
| info | 采集音频信息 | 
| - (void) setAudioVUMeterEnabled: | (BOOL) | enable | 
设置是否输出音频输出的DB值
| enable | 是否输出 | 
| - (void) setCaptureFps: | (int) | fps | 
设置采集帧率。
| fps | 每秒钟的帧数量 | 
| - (void) setColorGainForSDRToHDR: | (float) | gain | 
| - (void) setCustomCompileVideoHeight: | (unsigned int) | videoHeight | 
设置自定义的生成视频高度。 
在生成时视频时,设置生成视频的分辨率高度级别为NvsCompileVideoResolutionGradeCustom 就可以使用自定义的生成视频高度。但是请注意,为了保证视频生成成功,美摄SDK会对高度进行适当的对齐, 因此最终生成的视频高度不一定就是这里设置的高度! 
| videoHeight | 自定义的生成视频高度 | 
| + (void) setDebugLevel: | (NvsDebugLevel) | debugLevel | 
设置Debug的级别
| debugLevel | 的级别 | 
| - (void) setDefaultAudioTransitionName: | (NSString *) | name | 
| - (void) setDefaultImageClipDuration: | (int64_t) | defaultImageClipDuration | 
设置缺省图像片段持续时长
| defaultImageClipDuration | 图像片段持续时长 | 
| - (BOOL) setDefaultThemeEndingLogoImageFilePath: | (NSString *) | logoImageFilePath | 
设置默认主题logo图片路径
| logoImageFilePath | logo图片文件路径 | 
| - (void) setEnableAudioSampleNotify: | (BOOL) | enable | 
设置是否输出音频sample
| enable | 是否输出 | 
| - (void) setExposureBias: | (float) | exposureBias | 
| + (void) setFxPluginBundlePathList: | (NSArray *) | list | 
设置特效插件路径。
| 特效插件路径数组 | 
| - (void) setImageReaderCount: | ("Use +setMaxImageReaderCount:") | ||
| (macos(10.3, 10.11)) | |||
| (ios(7.0, 8.0)) | API_DEPRECATED | ||
设置image reader 最大个数。
| image | reader 最大个数 | 
| + (void) setMaxAudioReaderCount: | (int) | count | 
设置 audio reader 最大个数。
| audio | reader 最大个数 | 
| + (void) setMaxCafCacheMemorySize: | (int) | maxMemorySize | 
设置caf的最大缓存。
| maxMemorySize | 最大缓存 | 
| + (void) setMaxCompileCaptionCachedContextCount: | (int) | count | 
设置导出时缓存的caption context 最大个数。
| 缓存的caption | context 最大个数 | 
| + (void) setMaxEditCaptionCachedContextCount: | (int) | count | 
设置编辑时缓存的caption context 最大个数。
| 缓存的caption | context 最大个数 | 
| + (void) setMaxIconReaderCount: | (int) | count | 
设置 icon reader 最大个数。
| icon | reader 最大个数 | 
| + (void) setMaxImageReaderCount: | (int) | count | 
设置max image reader 最大个数。
| max | image reader 最大个数 | 
| + (void) setMaxReaderCount: | (int) | count | 
设置 file reader 最大个数。
| file | reader 最大个数 | 
| + (void) setSaveDebugMessagesToFile: | (BOOL) | saveDebugMessagesToFile | 
设置是否将SDK的调试信息写入到文件中
| saveDebugMessagesToFile | 是否将SDK的调试信息写入到文件中 | 
| + (void) setSpecialCameraDeviceType: | (NSString *) | specialCameraType | 
设置特殊的Camera 的设备类型。
| specialCameraType | 特殊设备类型 | 
| + (void) setStreamingPoolSizeInByte: | (int) | maxMemorySize | 
设置max image reader 最大个数。
| max | image reader 最大个数 | 
| - (void) setTemplate: | (NSString *) | templateUuid | |
| customResourceDir: | (NSString *) | customResourceDir | |
设置模版自定义资源所在文件夹
| templateUuid | 模版资源包ID | 
| customResourceDir | 模版资源文件夹路径 | 
| - (BOOL) setThemeEndingEnabled: | (BOOL) | enable | 
| + (BOOL) setupHumanDetectionData: | (int) | dataType | |
| dataFilePath: | (NSString *) | dataFilePath | |
| - (void) setUserWatermarkForCapture: | (NSString *) | watermarkFilePath | |
| displayWidth: | (int) | displayWidth | |
| displayHeight: | (int) | displayHeight | |
| opacity: | (float) | opacity | |
| position: | (NvsTimelineWatermarkPosition) | position | |
| marginX: | (int) | marginX | |
| marginY: | (int) | marginY | |
为视频采集添加用户水印
| watermarkFilePath | 水印文件的路径,须为PNG或JPG文件 | 
| displayWidth | 水印在视频预览画面中显示的宽度,为0则使用图片文件的宽度 | 
| displayHeight | 水印在视频预览画面中显示的高度,为0则使用图片文件的高度 | 
| opacity | 水印的不透明度, 取值范围 0~1 | 
| position | 水印的位置,请参见 NvsTimelineWatermarkPosition | 
| marginX | 水印在X方向的边距 | 
| marginY | 水印在Y方向的边距 | 
| - (void) setVideoStabilization: | (VideoStabilizationFlag) | flags | 
| - (void) setZoomFactor: | (float) | zoomFactor | 
| + (NvsStreamingContext *) sharedInstance | 
| + (NvsStreamingContext *) sharedInstanceWithFlags: | (NvsStreamingContextFlag) | flags | 
| - (void) startAutoExposure: | (CGPoint) | pointOfInterest | 
启动自动曝光调节
| pointOfInterest | 曝光调节点 | 
| - (void) startAutoFocus: | (CGPoint) | focusPointOfInterest | 
| - (BOOL) startBufferCapturePreview: | (unsigned int) | width | |
| height: | (unsigned int) | height | |
| fps: | (const NvsRational *) | fps | |
| rotation: | (int) | rotation | |
| flipHorizontally: | (BOOL) | flipHorizontally | |
启动输入buffer模式的采集设备预览
| width | 输入buffer的宽 | 
| height | 输入buffer的高 | 
| fps | 输入buffer的帧率 | 
| rotation | 输入buffer的图像旋转角度。请参见 输入buffer的图像旋转角度 | 
| flipHorizontally | 是否需要水平翻转 | 
| - (BOOL) startCapturePreview: | (unsigned int) | captureDeviceIndex | |
| videoResGrade: | (NvsVideoCaptureResolutionGrade) | videoResGrade | |
| flags: | (int) | flags | |
| aspectRatio: | (const NvsRational *) | aspectRatio | |
启动采集设备预览
| captureDeviceIndex | 采集设备索引 | 
| videoResGrade | 视频采集分辨率级别。视频分辨率等级是指录制时所拍摄视频短边(即可能是宽度或者是高度)的分辨率值,根据视频横纵比aspectRatio(值为nil则由系统采集设备来决定横纵比)计算得到另一边(即可能是宽度或者是高度)的值。 其包括三种级别,分别是LOW,MEDIUM,HIGH,前置摄像头依次对应480p,540p,720p,后置摄像头依次对应540p,720p,1080p。如果有用户想自定义录制视频的等级, 例如540 * 960,则需要拍摄等横纵比的视频,通过创建宽高依次是540和960的时间线,编辑然后生成。生成时,生成分辨率高度等级里面没有960p的等级,因此需要在生成前调用 setCustomCompileVideoHeight()接口来自定义高度,然后调用生成接口compileTimeline(),生成高度级别设置为NvsCompileVideoResolutionGradeCustom即可。实例代码如下:     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];
  | 
| flags | 标志字段,如无特殊需求请填写0。请参见 NvsStreamingEngineCaptureFlag。每个Flag应用场景如下:  NvsStreamingEngineCaptureFlag_GrabCapturedVideoFrame用于视频抠像; NvsStreamingEngineCaptureFlag_StrictPreviewVideoSize与NvsStreamingEngineCaptureFlag_CaptureBuddyHostVideoFrame结合用于人脸检测; NvsStreamingEngineCaptureFlag_DontCaptureAudio用于视频直播,不采集音频流,一般不常用。  | 
| aspectRatio | 预览视频横纵比,传入nil则由系统采集设备来决定横纵比 | 
| - (void) startContinuousFocus | 
启动连续聚焦
| - (BOOL) startRecording: | (NSString *) | outputFilePath | 
| - (BOOL) startRecording: | (NSString *) | outputFilePath | |
| withFlags: | (int) | flags | |
启动录制采集设备信号。请参见视频录制方式
| outputFilePath | 录制文件的路径。注意: 我们建议输出.mov格式的文件 | 
| flags | 标志字段,如无特殊需求请填写0。请参见 NvsStreamingEngineRecordingFlag | 
| - (BOOL) startRecording: | (NSString *) | outputFilePath | |
| withFlags: | (int) | flags | |
| withRecordConfigurations: | (NSMutableDictionary *) | withRecordConfigurations | |
启动录制采集设备信号。请参见视频录制方式
| outputFilePath | 录制文件的路径。注意: 我们建议输出.mov格式的文件 | 
| flags | 标志字段,如无特殊需求请填写0。请参见 NvsStreamingEngineRecordingFlag | 
| withRecordConfigurations | 录制视频配置。NSMutableDictionary中关键字的值请参见 录制视频配置  例如:NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_RECORD_GOP_SIZE]; // 设置为1即是生成全I帧视频 [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_RECORD_BITRATE]; // 10M bps  | 
| - (BOOL) startRecordingWithFx: | (NSString *) | outputFilePath | 
启动采集设备的录制,录制的内容包含所有的特效处理效果。
注意:如果特效处理过于复杂可能会导致录制的视频丢帧,所以使用这个方法一定要慎重,要确保特效的处理对于当前 手机是完全可以实时处理的。请参见视频录制方式
| outputFilePath | 录制文件的路径。我们建议输出.mov格式的文件 | 
| - (BOOL) startRecordingWithFx: | (NSString *) | outputFilePath | |
| withFlags: | (int) | flags | |
启动采集设备的录制,录制的内容包含所有的特效处理效果。
注意:如果特效处理过于复杂可能会导致录制的视频丢帧,所以使用这个方法一定要慎重,要确保特效的处理对于当前 手机是完全可以实时处理的。请参见视频录制方式
| outputFilePath | 录制文件的路径。我们建议输出.mov格式的文件 | 
| flags | 标志字段,如无特殊需求请填写0。请参见 NvsStreamingEngineRecordingFlag | 
| - (BOOL) startRecordingWithFx: | (NSString *) | outputFilePath | |
| withFlags: | (int) | flags | |
| withRecordConfigurations: | (NSMutableDictionary *) | withRecordConfigurations | |
启动录制采集设备信号。请参见视频录制方式
| outputFilePath | 录制文件的路径。注意: 我们建议输出.mov格式的文件 | 
| flags | 标志字段,如无特殊需求请填写0。请参见 NvsStreamingEngineRecordingFlag | 
| withRecordConfigurations | 录制视频配置。NSMutableDictionary中关键字的值请参见 录制视频配置 例如:NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_RECORD_GOP_SIZE]; // 设置为1即是生成全I帧视频 [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_RECORD_BITRATE]; // 10M bps | 
| - (void) stop | 
停止引擎
| - (void) stop: | (int) | flags | 
| - (void) stopRecording | 
结束录制采集设备信号
| - (BOOL) takePicture: | (int) | flags | 
以最接近预览比例的摄像头的最大分辨率拍摄一张照片
| flags | 拍照的标志,目前没有使用, 值为0 | 
| - (void) toggleFlash: | (BOOL) | on | 
| - (void) toggleFlashMode: | (NvsCameraFlashMode) | mode | 
| + (BOOL) verifySdkLicenseFile: | (NSString *) | sdkLicenseFilePath | 
验证SDK授权文件。注意:授权文件接口必须在NvsStreamingContext初始化之前调用。
| sdkLicenseFilePath | SDK授权文件路径 | 
      
  | 
  readatomicassign | 
包管理器
      
  | 
  readwritenonatomicassign | 
生成时间线配置,设置一次即一直生效。NSMutableDictionary中关键字的值请参见 生成时间线的配置 例如:NSMutableDictionary *config = [[NSMutableDictionary alloc] init]; [config setValue:[NSNumber numberWithInteger:15] forKey:NVS_COMPILE_GOP_SIZE]; // 设置为1即是生成全I帧视频 [config setValue:[NSNumber numberWithInteger:10000000] forKey:NVS_COMPILE_BITRATE]; // 10M bps [config setValue:[NSNumber numberWithInteger:256000] forKey:NVS_COMPILE_AUDIO_BITRATE]; // 设置音频码率为256Kbps [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_LOSSLESS_AUDIO]; // 设置生成无损音频 [config setValue:[NSNumber numberWithBool:YES] forKey:NVS_COMPILE_OPTIMIZE_FOR_NETWORK_USE]; // 设置索引表前置 NvsRational videoFps = {12, 1}; [config setValue:[NSData dataWithBytes:&videoFps length:sizeof(NvsRational)] forKey:NVS_COMPILE_VIDEO_FPS]; // 设置帧速率FPS _streamingContext.compileConfigurations = config; 取消设置并恢复默认方式例如:[_streamingContext.compileConfigurations setValue:nil forKey:NVS_COMPILE_GOP_SIZE];
      
  | 
  readwritenonatomicassign | 
生成视频码率倍乘系数
      
  | 
  readwritenonatomicassign | 
默认字幕是否为淡入淡出
      
  | 
  readwritenonatomicweak | 
      
  | 
  readwritenonatomicweak | 
      
  | 
  readwritenonatomicassign | 
录制视频码率倍乘系数
 1.8.18