CNLiveStreamerBase.h
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//
// CNLiveStreamerBase.h
// CNLivePlayerSDKDemo
//
// Created by iOS on 17/2/27.
// Copyright © 2017年 雷浩杰. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CNLiveTypeDef.h"
#import <UIKit/UIKit.h>
@interface CNLiveStreamerBase : NSObject
/**
@abstract 视频帧率 默认:15
@discussion 当实际送入的视频帧率过高时会主动丢帧,有效范围[1~30]
*/
@property (nonatomic, assign) int videoFPS;
/**
@abstract 视频帧率最小值,默认与videoFPS相同
@discussion video frame per seconds 有效范围[1~30], 超出会提示参数错误
@discussion 不设置该值时表示网络自适应不使用动态帧率
*/
@property (nonatomic, assign) int videoMinFPS;
/**
@abstract 视频帧率最大值,默认与videoFPS相同
@discussion video frame per seconds 有效范围[1~30], 超出会提示参数错误
@discussion 不设置该值时表示网络自适应不使用动态帧率
*/
@property (nonatomic, assign) int videoMaxFPS;
/**
@abstract 视频编码器
@discussion video codec used for encode
*/
@property (nonatomic, assign) CNLiveVideoCodec videoCodec;
/**
@abstract 视频编码起始码率(单位:kbps)
@discussion 开始推流时的视频码率,开始推流后,根据网络情况在 [Min, Max]范围内调节
@discussion 视频码率上调则画面更清晰,下调则画面更模糊
*/
@property (nonatomic, assign) int videoInitBitrate; // kbit/s of video
/**
@abstract 视频编码最高码率(单位:kbps)
@discussion 视频码率自适应调整的上限, 为目标码率
*/
@property (nonatomic, assign) int videoMaxBitrate; // kbit/s of video
/**
@abstract 视频编码最低码率(单位:kbps)
@discussion 视频码率自适应调整的下限
*/
@property (nonatomic, assign) int videoMinBitrate; // kbit/s of video
/**
@abstract 最大关键帧间隔(单位:秒, 默认:3)
@discussion 即GOP长度 画面静止时,隔n秒插入一个关键帧
*/
@property (nonatomic, assign) float maxKeyInterval; // seconds
/**
@abstract 音频编码码率(单位:kbps)
@discussion 音频目标编码码率 (比如48,96,128等)
*/
@property (nonatomic, assign) int audiokBPS; // kbit/s of audio
/**
@abstract 查询当前是否处于推流状态 (建立连接中, 或连接中)
*/
- (BOOL) isStreaming;
/**
@abstract 静音推流 (仍然有音频输出发送, 只是音量为0)
@param bMute YES / ON
*/
- (void)muteStream:(BOOL)bMute;
/**
@abstract 截图功能,目前只支持jpg格式
@param jpegCompressionQuality 设置图像的压缩比例
@param filename 图片的文件名
*/
- (void)takePhotoWithQuality:(CGFloat)jpegCompressionQuality
fileName:(NSString *)filename;
@end