◆ __deprecated_msg
◆ addDynamicWaterMarkImageDataWithPath:x:y:w:h:
- (int) addDynamicWaterMarkImageDataWithPath: |
|
(NSString *) |
waterMarkDirPath |
x: |
|
(float) |
x |
y: |
|
(float) |
y |
w: |
|
(float) |
w |
h: |
|
(float) |
h |
|
|
| |
添加动态贴纸,最多支持添加5个贴纸
- Parameters
-
waterMarkDirPath:贴纸图片sequence目录 | |
显示屏幕x位置(0~1.0f) | |
显示屏幕y位置(0~1.0f) | |
显示屏幕宽 | |
显示屏幕高 | |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下添加动态贴纸,AlivcLivePushInteractiveMode模式下暂时不支持添加动态贴纸
- Returns
- 返回动态贴纸的id号,删除贴纸传此id
◆ addMixAudio:format:audioSample:
- (int) addMixAudio: |
|
(int) |
channels |
format: |
|
(int) |
format |
audioSample: |
|
(int) |
audioSample |
|
|
| |
添加音频混流设置
- Parameters
-
- Returns
- 返回对应音频混流标识ID 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下添加音频混流,AlivcLivePushInteractiveMode模式下暂时不支持添加音频混流
◆ addMixVideo:width:height:rotation:displayX:displayY:displayW:displayH:adjustHeight:
- (int) addMixVideo: |
|
(int) |
format |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
rotation: |
|
(int) |
rotation |
displayX: |
|
(float) |
displayX |
displayY: |
|
(float) |
displayY |
displayW: |
|
(float) |
displayW |
displayH: |
|
(float) |
displayH |
adjustHeight: |
|
(bool) |
adjustHeight |
|
|
| |
添加视频混流设置
- Parameters
-
format | 原始视频数据格式 AlivcLivePushVideoFormat |
width | 图像宽 |
height | 图像高 |
rotation | 图像角度 |
displayX | 图像要放置到屏幕的左上角坐标x |
displayY | 图像要放置到屏幕的左上角坐标y |
displayW | 图像显示的宽度 |
displayH | 图像显示的高度 |
adjustHeight | 图像自适应的高度 |
- Returns
- 返回对应视频混流标识ID
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下添加视频混流设置,AlivcLivePushInteractiveMode模式下暂时不支持添加视频混流设置
◆ addWatermarkWithPath:watermarkCoordX:watermarkCoordY:watermarkWidth:
- (int) addWatermarkWithPath: |
|
(NSString *) |
path |
watermarkCoordX: |
|
(CGFloat) |
coordX |
watermarkCoordY: |
|
(CGFloat) |
coordY |
watermarkWidth: |
|
(CGFloat) |
width |
|
|
| |
添加水印 最多支持3个水印
- Parameters
-
path | 水印路径 |
coordX | 水印左上顶点x的相对坐标 [0,1] |
coordY | 水印左上顶点y的相对坐标 [0,1] |
width | 水印的相对宽度 (水印会根据水印图片实际大小和水印宽度等比缩放) (0,1] |
- Returns
- 0:success 非0:failure
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下添加水印,AlivcLivePushInteractiveMode模式下暂时不支持添加水印
◆ changeMixVideoPosition:displayX:displayY:displayW:displayH:
- (void) changeMixVideoPosition: |
|
(int) |
handler |
displayX: |
|
(float) |
displayX |
displayY: |
|
(float) |
displayY |
displayW: |
|
(float) |
displayW |
displayH: |
|
(float) |
displayH |
|
|
| |
改变视频混流位置
- Parameters
-
handler | 视频混流标识ID,通过addMixVideo接口获得 |
displayX | 图像要放置到屏幕的左上角坐标x |
displayY | 图像要放置到屏幕的左上角坐标y |
displayW | 图像显示的宽度 |
displayH | 图像显示的高度 |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下改变视频混流位置,AlivcLivePushInteractiveMode模式下暂时不支持改变视频混流位置
◆ destory
◆ enableSpeakerphone:
- (int) enableSpeakerphone: |
|
(BOOL) |
enable |
|
设置音频输出为听筒还是扬声器
- Parameters
-
- Returns
-
◆ focusCameraAtAdjustedPoint:autoFocus:
- (int) focusCameraAtAdjustedPoint: |
|
(CGPoint) |
point |
autoFocus: |
|
(bool) |
autoFocus |
|
|
| |
对焦
- Parameters
-
point | 对焦的点 |
autoFocus | 是否自动对焦 |
- Returns
- 0:success 非0:failure
◆ getCurrentExposure
- (float) getCurrentExposure |
|
|
|
◆ getCurrentZoom
◆ getLivePushStatusInfo
◆ getLiveStatus
- (AlivcLivePushStatus) getLiveStatus |
|
|
|
◆ getMaxZoom
◆ getPushURL
- (NSString *) getPushURL |
|
|
|
◆ getSupportedMaxExposure
- (float) getSupportedMaxExposure |
|
|
|
◆ getSupportedMinExposure
- (float) getSupportedMinExposure |
|
|
|
◆ hideDebugView
◆ initWithConfig:
创建一个推流引擎实例
- Parameters
-
- Returns
- self:success nil:failure
- Note
- 同一时间只会存在一个主推流引擎实例
◆ inputMixAudioData:data:size:pts:
- (bool) inputMixAudioData: |
|
(int) |
handler |
data: |
|
(long) |
dataptr |
size: |
|
(int) |
size |
pts: |
|
(long) |
pts |
|
|
| |
输入音频混流数据
- Parameters
-
handler | 音频混流标识ID,通过addMixAudio接口获得 |
dataptr | 数据buffer的地址 |
size | 音频数据的大小 |
pts | 时间戳(单位微秒) |
- Returns
- success:true, failed:false
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下输入音频混流数据,AlivcLivePushInteractiveMode模式下暂时不支持输入音频混流数据
◆ inputMixVideoData:data:width:height:stride:size:pts:rotation:
- (void) inputMixVideoData: |
|
(int) |
handler |
data: |
|
(long) |
dataptr |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
stride: |
|
(int) |
stride |
size: |
|
(int) |
size |
pts: |
|
(long) |
pts |
rotation: |
|
(int) |
rotation |
|
|
| |
输入视频混流数据
- Parameters
-
handler | 视频混流标识ID,通过addMixVideo接口获得 |
dataptr | 数据buffer的地址 |
width | 图像宽 |
height | 图像高 |
stride | 图像存储时内存中每行像素所占用的空间 |
size | 此帧图像的大小 |
pts | 时间戳(单位微秒) |
rotation | 图像角度 |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下输入视频混流数据,AlivcLivePushInteractiveMode模式下暂时不支持输入视频混流数据
◆ isEnableSpeakerphone
- (BOOL) isEnableSpeakerphone |
|
|
|
◆ isPushing
获取是否正在推流
- Returns
- YES:正在推流 NO:未推流
◆ muteLocalCamera:
- (int) muteLocalCamera: |
|
(BOOL) |
mute |
|
关闭/打开视频(非互动模式暂不支持该API,调用无任何效果)
- Parameters
-
mute | YES表示不发送视频数据;NO表示恢复正常 |
- Returns
- 0: 表示Success
- 非0: 表示Failure
◆ pause
暂停摄像头推流,如果pushCongfig 中设置了pauseImg图片,将推设置的静态图片
- Returns
- 0:success 非0:failure
◆ pauseBGM
暂停播放背景音乐
- Returns
- 0:success 非0:failure
◆ reconnectPushAsync
- (int) reconnectPushAsync |
|
|
|
重连 异步接口
- Returns
- 0:success 非0:failure
◆ reconnectPushAsync:
- (int) reconnectPushAsync: |
|
(NSString *) |
pushURL |
|
推流URL的重连 异步接口
- Returns
- 0:success 非0:failure
◆ removeDynamicWaterMark:
- (void) removeDynamicWaterMark: |
|
(int) |
vid |
|
删除动态贴纸
- Parameters
-
vid:贴纸id,addDynamicWaterMarkImageDataWithPath时返回 | |
◆ removeMixAudio:
- (void) removeMixAudio: |
|
(int) |
handler |
|
移除音频混流
- Parameters
-
handler | 音频混流标识ID,通过addMixAudio接口获得 |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下移除音频混流,AlivcLivePushInteractiveMode模式下暂时不支持移除音频混流
◆ removeMixVideo:
- (void) removeMixVideo: |
|
(int) |
handler |
|
移除视频混流设置
- Parameters
-
handler | 视频混流标识ID,通过addMixVideo接口获得 |
◆ restartPush
重新推流 同步接口
- Returns
- 0:success 非0:failure
◆ restartPushAsync
重新推流 异步接口
- Returns
- 0:success 非0:failure
◆ resume
恢复摄像头推流 同步接口
- Returns
- 0:success 非0:failure
◆ resumeAsync
恢复推流 异步接口
- Returns
- 0:success 非0:failure
◆ resumeBGM
恢复播放背景音乐
- Returns
- 0:success 非0:failure
◆ sendAudioSampleBuffer:withType:
- (void) sendAudioSampleBuffer: |
|
(CMSampleBufferRef) |
sampleBuffer |
withType: |
|
(RPSampleBufferType) |
sampleBufferType |
|
|
| |
发送自定义的audio SampleBuffer
只限于replaykit录屏直播使用
- Parameters
-
sampleBuffer | audio sample buffer |
sampleBufferType | audio sample buffer type |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下发送自定义的audio SampleBuffer,AlivcLivePushInteractiveMode模式下暂时不支持发送自定义的audio SampleBuffer
◆ sendMessage:repeatCount:delayTime:KeyFrameOnly:
- (int) sendMessage: |
|
(NSString *) |
msg |
repeatCount: |
|
(int) |
count |
delayTime: |
|
(int) |
time |
KeyFrameOnly: |
|
(bool) |
isKeyFrame |
|
|
| |
设置自定义Message (SEI)
- Parameters
-
msg | 用户推流消息 |
count | 重复次数 |
time | 延时时间,单位毫秒 |
isKeyFrame | 是否只发关键帧 |
- Returns
- 0:success 非0:failure
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下设置Message,AlivcLivePushInteractiveMode模式下暂时不支持设置Message
◆ sendPCMData:size:sampleRate:channel:pts:
- (void) sendPCMData: |
|
(char *) |
data |
size: |
|
(int) |
size |
sampleRate: |
|
(int) |
sampleRate |
channel: |
|
(int) |
channel |
pts: |
|
(uint64_t) |
pts |
|
|
| |
发送自定义音频数据
- Parameters
-
data | 音频数据 |
size | 数据大小 |
sampleRate | 采样率 |
channel | 声道数 |
pts | 时间戳(单位微秒) |
◆ sendVideoData:width:height:size:pts:rotation:
- (void) sendVideoData: |
|
(char *) |
data |
width: |
|
(int) |
width |
height: |
|
(int) |
height |
size: |
|
(int) |
size |
pts: |
|
(uint64_t) |
pts |
rotation: |
|
(int) |
rotation |
|
|
| |
发送自定义视频数据
- Parameters
-
data | 视频数据 |
width | 视频宽度 |
height | 视频高度 |
size | 数据大小 |
pts | 时间戳(单位微秒) |
rotation | 旋转 |
◆ sendVideoSampleBuffer:
- (void) sendVideoSampleBuffer: |
|
(CMSampleBufferRef) |
sampleBuffer |
|
发送自定义video SampleBuffer
- Parameters
-
sampleBuffer | video sample buffer |
- Note
- 当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下发送自定义video SampleBuffer,AlivcLivePushInteractiveMode模式下暂时不支持发送自定义video SampleBuffer
◆ setAudioDenoise:
- (int) setAudioDenoise: |
|
(bool) |
isOpen |
|
设置降噪开关
- Parameters
-
isOpen | 是否打开降噪 true:开启 false:关闭 默认:true |
- Returns
- 0:success 非0:failure
◆ setAudioEffectReverbMode:
- (int) setAudioEffectReverbMode: |
|
(AlivcLivePushAudioEffectReverbMode) |
mode |
|
设置混响音效模式
- Parameters
-
- Returns
-
- Note
- 推流前和推流过程中调用都生效
◆ setAudioEffectVoiceChangeMode:
- (int) setAudioEffectVoiceChangeMode: |
|
(AlivcLivePushAudioEffectVoiceChangeMode) |
mode |
|
设置变声音效模式
- Parameters
-
- Returns
-
- Note
- 推流前和推流过程中调用都生效
◆ setAudioSampleDelegate:
◆ setAutoFocus:
- (int) setAutoFocus: |
|
(bool) |
autoFocus |
|
设置自动对焦
- Parameters
-
autoFocus | true:自动对焦 false:手动对焦 |
- Returns
- 0:success 非0:failure
◆ setBGMDelegate:
◆ setBGMEarsBack:
- (int) setBGMEarsBack: |
|
(bool) |
isOpen |
|
设置背景音乐耳返开关
- Parameters
-
isOpen | 是否打开耳返 true:开启耳返 false:关闭耳返 |
- Returns
- 0:success 非0:failure
◆ setBGMLoop:
- (int) setBGMLoop: |
|
(bool) |
isLoop |
|
设置背景音乐是否循环播放
- Parameters
-
isLoop | 是否循环 true:循环 false:不循环 |
- Returns
- 0:success 非0:failure
◆ setBGMVolume:
- (int) setBGMVolume: |
|
(int) |
volume |
|
设置背景音乐混音 音乐音量
- Parameters
-
volume | 音乐音量大小 范围:[0 ~ 100] 默认:50 |
- Returns
- 0:success 非0:failure
◆ setCaptureVolume:
- (int) setCaptureVolume: |
|
(int) |
volume |
|
设置背景音乐混音 人声音量
- Parameters
-
volume | 人声音量大小 范围:[0 ~ 100] 默认:50 |
- Returns
- 0:success 非0:failure
◆ setCustomDetectorDelegate:
◆ setCustomFilterDelegate:
◆ setErrorDelegate:
◆ setExposure:
- (int) setExposure: |
|
(float) |
exposure |
|
设置曝光度
- Parameters
-
- Returns
- 0:success 非0:failure
◆ setFlash:
- (int) setFlash: |
|
(bool) |
flash |
|
闪光灯开关
- Parameters
-
flash | true:打开闪光灯 false:关闭闪光灯 |
- Returns
- 0:success 非0:failure
◆ setInfoDelegate:
◆ setLiveMixTranscodingConfig:
设置云端的混流(转码)参数 一个直播间中可能有不止一位主播,而且每个主播都有自己的画面和声音,但对于 CDN 观众来说,他们只需要一路直播流 所以您需要将多路音视频流混成一路标准的直播流,这就需要混流转码 在连麦场景下,需要将主播和连麦观众音视频流混成一路标准的直播流,供CDN观众观看 在PK场景下,需要将进行PK的多个主播的音视频流混成一路标准的直播流,供CDN观众观看
- Parameters
-
- Returns
- 0:success 非0:failure
- Note
- 若主播还在房间中但不再需要混流,请务必传入 nil 进行取消,因为当发起混流后,云端混流模块就会开始工作, 不及时取消混流可能会引起不必要的计费损失
◆ setLogLevel:
- (int) setLogLevel: |
|
("Use AlivcLiveBase->setLogLevel instead.") |
__deprecated_msg |
|
设置Log级别
- Parameters
-
level | Log级别 default:AlivcLivePushLogLevelError |
- Returns
- 0:success 非0:failure
◆ setLogPath:maxPartFileSizeInKB:
- (int) setLogPath: |
|
(NSString *) |
logPath |
maxPartFileSizeInKB: |
|
("Use AlivcLiveBase->setLogPath:maxPartFileSizeInKB instead.") |
__deprecated_msg |
|
|
| |
设置Log路径
- Parameters
-
logPath | Log路径 |
maxPartFileSizeInKB | 每个分片最大大小。最终日志总体积是 5*最大分片大小 |
- Returns
- 0:success 非0:failure
◆ setMinVideoBitrate:
- (int) setMinVideoBitrate: |
|
(int) |
minBitrate |
|
设置最小码率
- Parameters
-
minBitrate | 最小码率 [100 5000](Kbps) |
- Returns
- 0:success 非0:failure
◆ setMixVideoMirror:isMirror:
- (void) setMixVideoMirror: |
|
(int) |
handler |
isMirror: |
|
(BOOL) |
isMirror |
|
|
| |
改变视频混流镜像
- Parameters
-
handler | 视频混流标识ID,通过addMixVideo接口获得 |
isMirror | 是否镜像 |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下改变视频混流镜像,AlivcLivePushInteractiveMode模式下暂时不支持改变视频混流镜像
◆ setMute:
- (void) setMute: |
|
(bool) |
mute |
|
◆ setNetworkDelegate:
◆ setpreviewDisplayMode:
- (void) setpreviewDisplayMode: |
|
(AlivcPusherPreviewDisplayMode) |
displayMode |
|
◆ setPreviewMirror:
- (void) setPreviewMirror: |
|
(bool) |
mirror |
|
预览镜像开关
- Parameters
-
mirror | true:打开预览镜像 false:关闭预览镜像 |
◆ setPushMirror:
- (void) setPushMirror: |
|
(bool) |
mirror |
|
推流镜像开关
- Parameters
-
mirror | true:打开推流镜像 false:关闭推流镜像 |
◆ setQualityMode:
- (int) setQualityMode: |
|
(AlivcLivePushQualityMode) |
qualityMode |
|
设置推流模式
- Parameters
-
qualityMode | 推流模式 : 选择 ResolutionFirst 模式时,SDK内部会优先保障推流视频的清晰度; 选择 FluencyFirst 模式时,SDK内部会优先保障推流视频的流畅度,此接口只支持这两种模式。设置后码率设置失效。 |
- Returns
- 0:success 非0:failure
◆ setResolution:
- (void) setResolution: |
|
(AlivcLivePushResolution) |
resolution |
|
设置推流分辨率,只在预览模式下生效,推流中不能设置
- Parameters
-
◆ setSnapshotDelegate:
◆ setTargetVideoBitrate:
- (int) setTargetVideoBitrate: |
|
(int) |
targetBitrate |
|
设置目标码率
- Parameters
-
targetBitrate | 目标码率 [100 5000](Kbps) |
- Returns
- 0:success 非0:failure
◆ setWatermarkVisible:
- (void) setWatermarkVisible: |
|
(bool) |
visable |
|
设置水印显示和隐藏
- Parameters
-
visable | true:显示水印,false:隐藏水印 |
◆ setZoom:
- (int) setZoom: |
|
(float) |
zoom |
|
缩放
- Parameters
-
- Returns
- 0:success 非0:failure
◆ showDebugView
显示调试悬浮窗
- Note
- 注意 :Debug悬浮窗会占用一定的系统资源,只可用于APP研发的Debug阶段,Release版本请勿调用此接口
◆ snapshot:interval:
- (void) snapshot: |
|
(int) |
count |
interval: |
|
(int) |
interval |
|
|
| |
截图
- Parameters
-
- Note
- livePushMode = AlivcLivePushBasicMode 基础模式下可以指定count和interval, AlivcLivePushInteractiveMode模式下暂时不支持指定count和interval,传递任何值都不做解析,每次只截图一张画面
◆ startBGMWithMusicPathAsync:
- (int) startBGMWithMusicPathAsync: |
|
(NSString *) |
path |
|
播放背景音乐
- Parameters
-
- Returns
- 0:success 非0:failure
◆ startIntelligentDenoise
- (int) startIntelligentDenoise |
|
|
|
开启智能降噪
- Returns
-
- 智能降噪功能以插件形式提供,直播SDK采用插件形式提供音视频增强能力,可通过[官网组件文档] 进行组建下载,参考插件集成文档集成进直播推流引擎 https://help.aliyun.com/document_detail/600551.html
- 调用该接口前,请确保已集成了直播官网提供的pulginAliDenoise.framework
- 此接口可以通话过程中控制打开智能降噪功能,通话过程中可以支持开启和关闭智能降噪
- 默认关闭,开启后可能导致功耗增加,智能降噪适合于会议,教育等语音通讯为主的场景,不适合有背景音乐的场景
◆ startPreview:
- (int) startPreview: |
|
(UIView *) |
previewView |
|
开始预览 同步接口
- Parameters
-
- Returns
- 0:success 非0:failure
◆ startPreviewAsync:
- (int) startPreviewAsync: |
|
(UIView *) |
preview |
|
开始预览 异步接口
- Parameters
-
- Returns
- 0:success 非0:failure
◆ startPushWithURL:
- (int) startPushWithURL: |
|
(NSString *) |
pushURL |
|
开始推流 同步接口
- Parameters
-
- Returns
- 0:success 非0:failure
◆ startPushWithURLAsync:
- (int) startPushWithURLAsync: |
|
(NSString *) |
pushURL |
|
开始推流 异步接口
- Parameters
-
- Returns
- 0:success 非0:failure
◆ startScreenCapture:
- (int) startScreenCapture: |
|
(NSString *) |
appGroup |
|
开始屏幕分享(该接口支持 iOS 11.0 及以上的 iPhone 和 iPad)。
该接口开始 iOS 系统的屏幕分享,可以实现录屏推流功能 该接口配合AlivcLibReplayKitExt.framework使用,在Extension进程中添加AlivcLibReplayKitExt.framework库完成屏幕采集和发送 在Host APP中接收音视频数据,完成推流。
- Parameters
-
appGroup | App group ID 主 App 与 Extension 共享的 Application Group Identifier,当前接口仅支持主 App 与 Extension 属于同一个App * Group的情况,如果不存在App Group, 不可调用该接口。 |
- Note
- 注:当前SDK暂时只支持在livePushMode = AlivcLivePushBasicMode 模式下开始屏幕分享(录屏推流),AlivcLivePushInteractiveMode模式下暂时不支持开始屏幕分享(录屏推流)
◆ stopBGMAsync
停止播放背景音乐
- Returns
- 0:success 非0:failure
◆ stopIntelligentDenoise
- (int) stopIntelligentDenoise |
|
|
|
关闭智能降噪
- Note
- 此接口可以通话过程中控制关闭智能降噪功能
◆ stopPreview
停止预览
- Returns
- 0:success 非0:failure
◆ stopPush
停止推流
- Returns
- 0:success 非0:failure
◆ switchCamera
切换摄像头
- Returns
- 0:success 非0:failure
The documentation for this class was generated from the following file: