AlivcLivePushConfig Class Reference

Inherits from NSObject
Declared in AlivcLivePushConfig.h

Overview

推流配置类

  resolution

分辨率 * 默认 : AlivcLivePushDefinition540P

@property (nonatomic, assign) AlivcLivePushResolution resolution

Declared In

AlivcLivePushConfig.h

  fps

视频采集帧率 * 默认 : AlivcLivePushFPS15 * 单位 : Frames per Second

@property (nonatomic, assign) AlivcLivePushFPS fps

Declared In

AlivcLivePushConfig.h

  minFps

最小视频采集帧率 * 默认 : AlivcLivePushFPS8 * 单位 : Frames per Second * 不可大于 视频采集帧率fps

@property (nonatomic, assign) AlivcLivePushFPS minFps

Declared In

AlivcLivePushConfig.h

  targetVideoBitrate

目标视频编码码率 * 默认 : 800 * 范围 : [100,1500] * 单位 : Kbps

@property (nonatomic, assign) int targetVideoBitrate

Declared In

AlivcLivePushConfig.h

  minVideoBitrate

最小视频编码码率 * 默认 : 200 * 范围 : [100,1500] * 单位 : Kbps

@property (nonatomic, assign) int minVideoBitrate

Declared In

AlivcLivePushConfig.h

  initialVideoBitrate

初始视频编码码率 * 默认 : 800 * 范围 : [100,1500] * 单位 : Kbps

@property (nonatomic, assign) int initialVideoBitrate

Declared In

AlivcLivePushConfig.h

  audioSampleRate

音频采样率 * 默认 : AlivcLivePushAudioSampleRate32000

@property (nonatomic, assign) AlivcLivePushAudioSampleRate audioSampleRate

Declared In

AlivcLivePushConfig.h

  audioChannel

声道数 * 默认 : AlivcLivePushAudioChannel_2 单声道

@property (nonatomic, assign) AlivcLivePushAudioChannel audioChannel

Declared In

AlivcLivePushConfig.h

  videoEncodeGop

关键帧间隔 * 默认 : AlivcLivePushVideoEncodeGOP_2 * 单位 : s

@property (nonatomic, assign) AlivcLivePushVideoEncodeGOP videoEncodeGop

Declared In

AlivcLivePushConfig.h

  connectRetryCount

重连次数 * 默认 : 5 * 范围 : [0,100]

@property (nonatomic, assign) int connectRetryCount

Declared In

AlivcLivePushConfig.h

  connectRetryInterval

重连时长 * 默认 : 1000 * 范围 : (0,10000] * 单位 : ms

@property (nonatomic, assign) float connectRetryInterval

Declared In

AlivcLivePushConfig.h

  orientation

推流方向 : 竖屏、90度横屏、270度横屏 * 默认 : AlivcLivePushOrientationPortrait

@property (nonatomic, assign) AlivcLivePushOrientation orientation

Declared In

AlivcLivePushConfig.h

  cameraType

摄像头类型 * 默认 : AlivcLivePushCameraTypeFront

@property (nonatomic, assign) AlivcLivePushCameraType cameraType

Declared In

AlivcLivePushConfig.h

  pushMirror

推流镜像 * 默认 : false 关闭镜像

@property (nonatomic, assign) bool pushMirror

Declared In

AlivcLivePushConfig.h

  previewMirror

预览镜像 * 默认 : false 关闭镜像

@property (nonatomic, assign) bool previewMirror

Declared In

AlivcLivePushConfig.h

  audioOnly

纯音频推流 * 默认 : false

@property (nonatomic, assign) bool audioOnly

Declared In

AlivcLivePushConfig.h

  autoFocus

自动聚焦 * 默认 : true

@property (nonatomic, assign) bool autoFocus

Declared In

AlivcLivePushConfig.h

  beautyOn

是否打开美颜 * 默认 : true

@property (nonatomic, assign) bool beautyOn

Declared In

AlivcLivePushConfig.h

  beautyWhite

美颜 美白参数 * 默认 : 50 * 范围 : [0,100]

@property (nonatomic, assign) int beautyWhite

Declared In

AlivcLivePushConfig.h

  beautyBuffing

美颜 磨皮参数 * 默认 : 50 * 范围 : [0,100]

@property (nonatomic, assign) int beautyBuffing

Declared In

AlivcLivePushConfig.h

  beautyBrightness

美颜 亮度参数 * 默认 : 50 * 范围 : [0,100]

@property (nonatomic, assign) int beautyBrightness

Declared In

AlivcLivePushConfig.h

  beautyRuddy

美颜 红润参数 * 默认 : 20 * 范围 : [0,100]

@property (nonatomic, assign) int beautyRuddy

Declared In

AlivcLivePushConfig.h

  beautySaturation

美颜 饱和度参数 * 默认 : 0 * 范围 : [0,100]

@property (nonatomic, assign) int beautySaturation

Declared In

AlivcLivePushConfig.h

  flash

是否开启闪光灯 * 默认 : false

@property (nonatomic, assign) bool flash

Declared In

AlivcLivePushConfig.h

  videoEncoderMode

视频编码模式 * 默认 : AlivcLivePushVideoEncoderModeHard

@property (nonatomic, assign) AlivcLivePushVideoEncoderMode videoEncoderMode

Declared In

AlivcLivePushConfig.h

– initWithResolution:

init 分辨率 其余值为默认值

- (instancetype)initWithResolution:(AlivcLivePushResolution)resolution

Parameters

resolution

推流分辨率

Return Value

self

Declared In

AlivcLivePushConfig.h

– addWatermarkWithPath:watermarkCoordX:watermarkCoordY:watermarkWidth:

添加水印 最多支持3个水印

- (void)addWatermarkWithPath:(NSString *)path watermarkCoordX:(CGFloat)coordX watermarkCoordY:(CGFloat)coordY watermarkWidth:(CGFloat)width

Parameters

path

水印路径

coordX

水印左上顶点x的相对坐标 [0,1]

coordY

水印左上顶点y的相对坐标 [0,1]

width

水印的相对宽度 (水印会根据水印图片实际大小和水印宽度等比缩放) (0,1]

Declared In

AlivcLivePushConfig.h

– getAllWatermarks

获取全部水印

- (NSArray<NSDictionary*> *)getAllWatermarks

Return Value

全部水印配置数组

Discussion

  • key:watermarkPath value:水印图片路径
  • key:watermarkCoordX value:x值
  • key:watermarkCoordY value:y值
  • key:watermarkWidth value:width值

Declared In

AlivcLivePushConfig.h

– getPushResolution

获取推流宽高具体数值

- (CGSize)getPushResolution

Return Value

推流宽高Rect

Declared In

AlivcLivePushConfig.h