@volcengine/react-native-live-push 1.1.3-rc.1 → 1.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/ClassHelper.java +9 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/NativeVariableManager.java +5 -8
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushModule.java +14 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushPackage.java +16 -13
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushView.java +16 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/VeLivePushViewManager.java +7 -2
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerManager.java +410 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerView.java +328 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/MixerViewManager.java +43 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/TextureMgr.java +168 -0
- package/android/src/main/java/com/volcengine/velive/rn/push/mixer/YuvHelper.java +165 -0
- package/ios/VeLiveMixerHelper.h +49 -0
- package/ios/VeLiveMixerHelper.m +646 -0
- package/ios/VeLiveMixerView.h +62 -0
- package/ios/VeLiveMixerView.m +547 -0
- package/ios/VeLiveMixerViewManager.m +56 -0
- package/lib/commonjs/index.js +22697 -20359
- package/lib/commonjs/typescript/android/index.d.ts +44 -0
- package/lib/commonjs/typescript/codegen/android/api.d.ts +1068 -0
- package/lib/commonjs/typescript/codegen/android/callback.d.ts +333 -0
- package/lib/commonjs/typescript/codegen/android/errorcode.d.ts +92 -0
- package/lib/commonjs/typescript/codegen/android/index.d.ts +5 -0
- package/lib/commonjs/typescript/codegen/android/keytype.d.ts +1693 -0
- package/lib/commonjs/typescript/codegen/android/types.d.ts +33 -0
- package/lib/commonjs/typescript/codegen/ios/api.d.ts +1125 -0
- package/lib/commonjs/typescript/codegen/ios/callback.d.ts +242 -0
- package/lib/commonjs/typescript/codegen/ios/errorcode.d.ts +154 -0
- package/lib/commonjs/typescript/codegen/ios/external.d.ts +1 -0
- package/lib/commonjs/typescript/codegen/ios/index.d.ts +6 -0
- package/lib/commonjs/typescript/codegen/ios/keytype.d.ts +1154 -0
- package/lib/commonjs/typescript/codegen/ios/types.d.ts +46 -0
- package/lib/commonjs/typescript/codegen/pack/api.d.ts +1470 -0
- package/lib/commonjs/typescript/codegen/pack/callback.d.ts +446 -0
- package/lib/commonjs/typescript/codegen/pack/errorcode.d.ts +109 -0
- package/lib/commonjs/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/commonjs/typescript/codegen/pack/keytype.d.ts +2248 -0
- package/lib/commonjs/typescript/codegen/pack/types.d.ts +68 -0
- package/lib/commonjs/typescript/codegen/type-shim.d.ts +6 -0
- package/lib/commonjs/typescript/component.d.ts +15 -0
- package/lib/commonjs/typescript/core/api.d.ts +18 -0
- package/lib/commonjs/typescript/core/callback.d.ts +2 -0
- package/lib/commonjs/typescript/core/env.d.ts +29 -0
- package/lib/commonjs/typescript/core/errorcode.d.ts +2 -0
- package/lib/commonjs/typescript/core/index.d.ts +6 -0
- package/lib/commonjs/typescript/core/keytype.d.ts +17 -0
- package/lib/commonjs/typescript/core/mixer.d.ts +26 -0
- package/lib/commonjs/typescript/core/pusher.d.ts +13 -0
- package/lib/commonjs/typescript/index.d.ts +3 -0
- package/lib/commonjs/typescript/ios/extends.d.ts +41 -0
- package/lib/commonjs/typescript/platforms/android/extends.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/android/helper.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/android/mixer.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/ios/extends.d.ts +17 -0
- package/lib/commonjs/typescript/platforms/ios/helper.d.ts +8 -0
- package/lib/commonjs/typescript/platforms/ios/mixer.d.ts +9 -0
- package/lib/commonjs/typescript/runtime.d.ts +1 -0
- package/lib/commonjs/typescript/view/MixView.d.ts +44 -0
- package/lib/commonjs/typescript/view/VeImageView.d.ts +19 -0
- package/lib/commonjs/typescript/view/VeTextView.d.ts +7 -0
- package/lib/commonjs/typescript/view/VeView.d.ts +7 -0
- package/lib/commonjs/typescript/view/VeWebView.d.ts +7 -0
- package/lib/commonjs/typescript/view/index.d.ts +5 -0
- package/lib/module/index.js +22694 -20360
- package/lib/module/typescript/android/index.d.ts +44 -0
- package/lib/module/typescript/codegen/android/api.d.ts +1068 -0
- package/lib/module/typescript/codegen/android/callback.d.ts +333 -0
- package/lib/module/typescript/codegen/android/errorcode.d.ts +92 -0
- package/lib/module/typescript/codegen/android/index.d.ts +5 -0
- package/lib/module/typescript/codegen/android/keytype.d.ts +1693 -0
- package/lib/module/typescript/codegen/android/types.d.ts +33 -0
- package/lib/module/typescript/codegen/ios/api.d.ts +1125 -0
- package/lib/module/typescript/codegen/ios/callback.d.ts +242 -0
- package/lib/module/typescript/codegen/ios/errorcode.d.ts +154 -0
- package/lib/module/typescript/codegen/ios/external.d.ts +1 -0
- package/lib/module/typescript/codegen/ios/index.d.ts +6 -0
- package/lib/module/typescript/codegen/ios/keytype.d.ts +1154 -0
- package/lib/module/typescript/codegen/ios/types.d.ts +46 -0
- package/lib/module/typescript/codegen/pack/api.d.ts +1470 -0
- package/lib/module/typescript/codegen/pack/callback.d.ts +446 -0
- package/lib/module/typescript/codegen/pack/errorcode.d.ts +109 -0
- package/lib/module/typescript/codegen/pack/index.d.ts +5 -0
- package/lib/module/typescript/codegen/pack/keytype.d.ts +2248 -0
- package/lib/module/typescript/codegen/pack/types.d.ts +68 -0
- package/lib/module/typescript/codegen/type-shim.d.ts +6 -0
- package/lib/module/typescript/component.d.ts +15 -0
- package/lib/module/typescript/core/api.d.ts +18 -0
- package/lib/module/typescript/core/callback.d.ts +2 -0
- package/lib/module/typescript/core/env.d.ts +29 -0
- package/lib/module/typescript/core/errorcode.d.ts +2 -0
- package/lib/module/typescript/core/index.d.ts +6 -0
- package/lib/module/typescript/core/keytype.d.ts +17 -0
- package/lib/module/typescript/core/mixer.d.ts +26 -0
- package/lib/module/typescript/core/pusher.d.ts +13 -0
- package/lib/module/typescript/index.d.ts +3 -0
- package/lib/module/typescript/ios/extends.d.ts +41 -0
- package/lib/module/typescript/platforms/android/extends.d.ts +8 -0
- package/lib/module/typescript/platforms/android/helper.d.ts +8 -0
- package/lib/module/typescript/platforms/android/mixer.d.ts +8 -0
- package/lib/module/typescript/platforms/ios/extends.d.ts +17 -0
- package/lib/module/typescript/platforms/ios/helper.d.ts +8 -0
- package/lib/module/typescript/platforms/ios/mixer.d.ts +9 -0
- package/lib/module/typescript/runtime.d.ts +1 -0
- package/lib/module/typescript/view/MixView.d.ts +44 -0
- package/lib/module/typescript/view/VeImageView.d.ts +19 -0
- package/lib/module/typescript/view/VeTextView.d.ts +7 -0
- package/lib/module/typescript/view/VeView.d.ts +7 -0
- package/lib/module/typescript/view/VeWebView.d.ts +7 -0
- package/lib/module/typescript/view/index.d.ts +5 -0
- package/lib/typescript/android/index.d.ts +0 -3
- package/lib/typescript/codegen/android/api.d.ts +194 -762
- package/lib/typescript/codegen/android/callback.d.ts +85 -48
- package/lib/typescript/codegen/android/errorcode.d.ts +30 -0
- package/lib/typescript/codegen/android/keytype.d.ts +514 -122
- package/lib/typescript/codegen/ios/api.d.ts +380 -351
- package/lib/typescript/codegen/ios/callback.d.ts +33 -6
- package/lib/typescript/codegen/ios/errorcode.d.ts +52 -2
- package/lib/typescript/codegen/ios/keytype.d.ts +313 -35
- package/lib/typescript/codegen/pack/api.d.ts +302 -821
- package/lib/typescript/codegen/pack/callback.d.ts +54 -49
- package/lib/typescript/codegen/pack/errorcode.d.ts +38 -5
- package/lib/typescript/codegen/pack/keytype.d.ts +672 -228
- package/lib/typescript/core/api.d.ts +18 -2
- package/lib/typescript/core/keytype.d.ts +15 -0
- package/lib/typescript/core/mixer.d.ts +26 -0
- package/lib/typescript/core/pusher.d.ts +0 -3
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/platforms/android/extends.d.ts +8 -0
- package/lib/typescript/platforms/android/mixer.d.ts +8 -0
- package/lib/typescript/platforms/ios/mixer.d.ts +9 -0
- package/lib/typescript/view/MixView.d.ts +44 -0
- package/lib/typescript/view/VeImageView.d.ts +19 -0
- package/lib/typescript/view/VeTextView.d.ts +7 -0
- package/lib/typescript/view/VeView.d.ts +7 -0
- package/lib/typescript/view/VeWebView.d.ts +7 -0
- package/lib/typescript/view/index.d.ts +5 -0
- package/package.json +1 -1
- package/react-native-velive-push.podspec +3 -3
- package/android/src/main/java/com/volcengine/velive/rn/push/ScreenCaptureHelper.java +0 -73
|
@@ -0,0 +1,1154 @@
|
|
|
1
|
+
import { int, BOOL, NSDictionary, float, CMTime, GLuint, CVPixelBufferRef, CMSampleBufferRef, NSData, NSArray, NSString } from './types';
|
|
2
|
+
export declare enum VeLiveVideoEffectLicenseType {
|
|
3
|
+
/** {zh}
|
|
4
|
+
* @brief 离线认证视频特效许可证。
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
VeLiveVideoEffectLicenseTypeOffLine = 0,
|
|
9
|
+
/** {zh}
|
|
10
|
+
* @brief 在线认证视频特效许可证。
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
VeLiveVideoEffectLicenseTypeOnLine = 1
|
|
15
|
+
}
|
|
16
|
+
export declare enum VeLiveNetworkQuality {
|
|
17
|
+
/** {zh}
|
|
18
|
+
* @brief 未查询到网络状态。
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
VeLiveNetworkQualityUnknown = -1,
|
|
23
|
+
/** {zh}
|
|
24
|
+
* @brief 网络差。
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
VeLiveNetworkQualityBad = 0,
|
|
29
|
+
/** {zh}
|
|
30
|
+
* @brief 网络一般。
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
VeLiveNetworkQualityPoor = 1,
|
|
35
|
+
/** {zh}
|
|
36
|
+
* @brief 网络状态佳。
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
VeLiveNetworkQualityGood = 2
|
|
41
|
+
}
|
|
42
|
+
export declare enum VeLiveAudioChannel {
|
|
43
|
+
/** {zh}
|
|
44
|
+
* @brief 单声道,适用于语音通信,节省带宽。
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
VeLiveAudioChannelMono = 1,
|
|
49
|
+
/** {zh}
|
|
50
|
+
* @brief 立体声,适用于音乐播放,提供更丰富的音频体验。
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
VeLiveAudioChannelStereo = 2
|
|
55
|
+
}
|
|
56
|
+
export declare enum VeLiveVideoEncodeFrameType {
|
|
57
|
+
/** {zh}
|
|
58
|
+
* @brief IDR 帧类型,关键帧,帧序列中的第一帧或者在视频切换点的帧。
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
VeLiveVideoEncodeFrameTypeIDR = 1,
|
|
63
|
+
/** {zh}
|
|
64
|
+
* @brief SPS/PPS 帧类型,序列参数集 SPS 和图像参数集 PPS 帧,通常与 IDR 帧一起发送。
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
VeLiveVideoEncodeFrameTypeSPSPPS = 2,
|
|
69
|
+
/** {zh}
|
|
70
|
+
* @brief B 帧类型,双向预测内插帧,根据前后帧来预测当前帧的内容。
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
VeLiveVideoEncodeFrameTypeB = 3,
|
|
75
|
+
/** {zh}
|
|
76
|
+
* @brief P 帧类型,向前预测帧,只根据前一帧来预测当前帧的内容。
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
VeLiveVideoEncodeFrameTypeP = 4
|
|
81
|
+
}
|
|
82
|
+
export declare class VeLiveVideoEncoderConfiguration {
|
|
83
|
+
/** {zh}
|
|
84
|
+
* @brief 推流视频分辨率,默认值为 VeLiveVideoResolution720P,详情请参见 [VeLiveVideoResolution](#VeLiveVideoResolution)。
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
resolution: VeLiveVideoResolution;
|
|
88
|
+
/** {zh}
|
|
89
|
+
* @brief 推流视频编码格式,默认值为 VeLiveVideoCodecH264,详情请参见 [VeLiveVideoCodec](#VeLiveVideoCodec)。
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
codec: VeLiveVideoCodec;
|
|
93
|
+
/** {zh}
|
|
94
|
+
* @brief 视频目标编码码率,单位为 kbps,默认值由 `resolution` 参数值决定。
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
bitrate: int;
|
|
98
|
+
/** {zh}
|
|
99
|
+
* @brief 视频最小编码码率,单位为 kbps,默认值由 `resolution` 参数值决定;如果开启自适应码率,推流 SDK 根据网络情况进行编码码率自适应调整的最小码率。
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
minBitrate: int;
|
|
103
|
+
/** {zh}
|
|
104
|
+
* @brief 视频最大编码码率,单位为 kbps,默认值由 `resolution` 参数值决定;如果开启自适应码率,推流 SDK 根据网络情况进行编码码率自适应调整的最大码率。
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
maxBitrate: int;
|
|
108
|
+
/** {zh}
|
|
109
|
+
* @brief 视频 GOP 大小,单位为 s,默认值为 2。
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
gopSize: int;
|
|
113
|
+
/** {zh}
|
|
114
|
+
* @brief 视频编码帧率,单位为 fps,默认值为 15。
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
fps: int;
|
|
118
|
+
/** {zh}
|
|
119
|
+
* @brief 是否启用 B 帧,默认值为 NO,支持的取值包括:<br>
|
|
120
|
+
* - YES:开启;
|
|
121
|
+
* - NO:关闭。
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
enableBFrame: BOOL;
|
|
125
|
+
/** {zh}
|
|
126
|
+
* @brief 是否开启硬件编码。
|
|
127
|
+
* - YES:(Default) 开启;
|
|
128
|
+
* - NO:不开启。
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
enableAccelerate: BOOL;
|
|
132
|
+
/** {zh}
|
|
133
|
+
* @brief 初始化方法,用于创建一个 VeLiveVideoEncoderConfiguration{@link #VeLiveVideoEncoderConfiguration} 对象,并指定视频的分辨率。
|
|
134
|
+
* @param resolution 视频的分辨率,详情请参见 VeLiveVideoResolution{@link #VeLiveVideoResolution}。
|
|
135
|
+
* @return <br>
|
|
136
|
+
* 创建的 VeLiveVideoEncoderConfiguration{@link #VeLiveVideoEncoderConfiguration} 对象。
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
initWithResolution(resolution: VeLiveVideoResolution): this;
|
|
140
|
+
}
|
|
141
|
+
export declare enum VeLiveVideoFrameSource {
|
|
142
|
+
/** {zh}
|
|
143
|
+
* @brief 采集到的原始视频帧。这是从设备的摄像头或其他视频输入源获取的视频帧。
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
VeLiveVideoFrameSourceCapture = 1,
|
|
148
|
+
/** {zh}
|
|
149
|
+
* @brief 编码前的视频帧。这是通过各种处理(例如滤镜、旋转等)后,准备进行编码的视频帧。
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
VeLiveVideoFrameSourcePreEncode = 2
|
|
154
|
+
}
|
|
155
|
+
export declare enum VeLiveAudioBufferType {
|
|
156
|
+
/** {zh}
|
|
157
|
+
* @brief 未知的音频数据类型。
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
VeLiveAudioBufferTypeUnknown = -1,
|
|
162
|
+
/** {zh}
|
|
163
|
+
* @brief 音频数据类型为 CMSampleBufferRef。
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
VeLiveAudioBufferTypeSampleBuffer = 0,
|
|
168
|
+
/** {zh}
|
|
169
|
+
* @brief 音频数据类型为 NSData。
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
VeLiveAudioBufferTypeNSData = 1
|
|
174
|
+
}
|
|
175
|
+
export declare class VeLivePusherConfiguration {
|
|
176
|
+
/** {zh}
|
|
177
|
+
* @brief 视频采集参数设置,用于调整和设置视频采集相关的参数。详情请参见 [VeLiveVideoCaptureConfiguration](#VeLiveVideoCaptureConfiguration)。
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
videoCaptureConfig: VeLiveVideoCaptureConfiguration;
|
|
181
|
+
/** {zh}
|
|
182
|
+
* @brief 音频采集参数设置,用于调整和设置音频采集相关的参数。详情请参见 [VeLiveAudioCaptureConfiguration](#VeLiveAudioCaptureConfiguration)。
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
audioCaptureConfig: VeLiveAudioCaptureConfiguration;
|
|
186
|
+
/** {zh}
|
|
187
|
+
* @brief 推流失败后,尝试重连的时间间隔。单位为 s,默认值为 5。
|
|
188
|
+
*/
|
|
189
|
+
|
|
190
|
+
reconnectIntervalSeconds: int;
|
|
191
|
+
/** {zh}
|
|
192
|
+
* @brief 推流失败后,尝试重连的次数。默认值为 3。
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
reconnectCount: int;
|
|
196
|
+
/** {zh}
|
|
197
|
+
* @brief 设置扩展参数,用于实现某些特殊功能或配置,默认不需要设置。
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
extraParameters: NSDictionary;
|
|
201
|
+
init(): this;
|
|
202
|
+
}
|
|
203
|
+
export declare enum VeLiveVideoCaptureType {
|
|
204
|
+
/** {zh}
|
|
205
|
+
* @brief 使用前置摄像头进行视频采集。
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
VeLiveVideoCaptureFrontCamera = 0,
|
|
210
|
+
/** {zh}
|
|
211
|
+
* @brief 使用后置摄像头进行视频采集。
|
|
212
|
+
*
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
VeLiveVideoCaptureBackCamera = 1,
|
|
216
|
+
/** {zh}
|
|
217
|
+
* @brief 使用设备的双摄进行视频采集。
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
VeLiveVideoCaptureDualCamera = 2,
|
|
222
|
+
/** {zh}
|
|
223
|
+
* @brief 使用外部设备或源进行视频采集。
|
|
224
|
+
*
|
|
225
|
+
*/
|
|
226
|
+
|
|
227
|
+
VeLiveVideoCaptureExternal = 4,
|
|
228
|
+
/** {zh}
|
|
229
|
+
* @brief 使用指定的静态图片作为视频源。
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
VeLiveVideoCaptureCustomImage = 5,
|
|
234
|
+
/** {zh}
|
|
235
|
+
* @brief 使用最近采集的一帧图像重复作为视频源。
|
|
236
|
+
*
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
VeLiveVideoCaptureLastFrame = 6,
|
|
240
|
+
/** {zh}
|
|
241
|
+
* @brief 使用黑色帧作为视频源,一般用于调试或特殊需求。
|
|
242
|
+
*
|
|
243
|
+
*/
|
|
244
|
+
|
|
245
|
+
VeLiveVideoCaptureDummyFrame = 7
|
|
246
|
+
}
|
|
247
|
+
export declare class VeLiveFileRecorderConfiguration {
|
|
248
|
+
/** {zh}
|
|
249
|
+
* @brief 录制的视频宽度,单位为 px,默认值为 360。
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
width: int;
|
|
253
|
+
/** {zh}
|
|
254
|
+
* @brief 录制的视频高度,单位为 px,默认值为 640。
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
height: int;
|
|
258
|
+
/** {zh}
|
|
259
|
+
* @deprecated
|
|
260
|
+
* @brief 录制的视频帧率,默认值为 15,取值范围为 [1,15]。
|
|
261
|
+
*/
|
|
262
|
+
|
|
263
|
+
fps: int;
|
|
264
|
+
/** {zh}
|
|
265
|
+
* @brief 录制的视频编码码率,单位为 kbps,默认值为 2000。
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
bitrate: int;
|
|
269
|
+
init(): this;
|
|
270
|
+
}
|
|
271
|
+
export declare enum VeLiveVideoBufferType {
|
|
272
|
+
/** {zh}
|
|
273
|
+
* @brief 未知视频数据类型,当未指定输入视频数据的格式时,会默认为此类型。
|
|
274
|
+
*
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
VeLiveVideoBufferTypeUnKnown = -1,
|
|
278
|
+
/** {zh}
|
|
279
|
+
* @brief 视频数据类型为 CVPixelBuffer。
|
|
280
|
+
*
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
VeLiveVideoBufferTypePixelBuffer = 0,
|
|
284
|
+
/** {zh}
|
|
285
|
+
* @brief 视频数据类型为 CMSampleBufferRef。
|
|
286
|
+
*
|
|
287
|
+
*/
|
|
288
|
+
|
|
289
|
+
VeLiveVideoBufferTypeSampleBuffer = 1,
|
|
290
|
+
/** {zh}
|
|
291
|
+
* @brief 视频数据类型为 NSData。
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
VeLiveVideoBufferTypeNSData = 2,
|
|
296
|
+
/** {zh}
|
|
297
|
+
* @brief 视频数据类型为 OpenGL 纹理。
|
|
298
|
+
*
|
|
299
|
+
*/
|
|
300
|
+
|
|
301
|
+
VeLiveVideoBufferTypeTexture = 3
|
|
302
|
+
}
|
|
303
|
+
export declare class VeLiveMixVideoLayout {
|
|
304
|
+
/** {zh}
|
|
305
|
+
* @brief 视频流 ID,唯一标识,用于区分不同的视频流。
|
|
306
|
+
*/
|
|
307
|
+
|
|
308
|
+
streamId: int;
|
|
309
|
+
/** {zh}
|
|
310
|
+
* @brief 视频流对应区域左上角的横坐标,该坐标是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
|
|
311
|
+
*/
|
|
312
|
+
|
|
313
|
+
x: float;
|
|
314
|
+
/** {zh}
|
|
315
|
+
* @brief 视频流对应区域左上角的纵坐标,该坐标是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
|
|
316
|
+
*/
|
|
317
|
+
|
|
318
|
+
y: float;
|
|
319
|
+
/** {zh}
|
|
320
|
+
* @brief 视频流对应区域宽度,该宽度是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
width: float;
|
|
324
|
+
/** {zh}
|
|
325
|
+
* @brief 视频流对应区域高度,该高度是相对整体画面的归一化比例,取值的范围为 [0.0,1.0]。
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
height: float;
|
|
329
|
+
/** {zh}
|
|
330
|
+
* @brief 视频流在混流中的透明度,取值范围为 [0.0,1.0],取值 0.0 表示全透明,取值 1.0 表示不透明。
|
|
331
|
+
*/
|
|
332
|
+
|
|
333
|
+
alpha: float;
|
|
334
|
+
/** {zh}
|
|
335
|
+
* @brief 视频流在混流中的层级。取值范围为 [0,100],取值 0 表示最底层,取值越大,层级越高。
|
|
336
|
+
*/
|
|
337
|
+
|
|
338
|
+
zOrder: int;
|
|
339
|
+
/** {zh}
|
|
340
|
+
* @brief 视频流的渲染模式。详情请参见 [VeLivePusherRenderMode](#VeLivePusherRenderMode)。
|
|
341
|
+
*/
|
|
342
|
+
|
|
343
|
+
renderMode: VeLivePusherRenderMode;
|
|
344
|
+
/** {zh}
|
|
345
|
+
* @brief 是否保留视频流原 Alpha 通道值,默认为保留,当 [alpha](#VeLiveMixVideoLayout-alpha) 取值在 [0.0, 1.0] 之间时,则忽略该配置。<br/>
|
|
346
|
+
*
|
|
347
|
+
* - YES:保留;
|
|
348
|
+
* - NO:不保留。
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
enableAlpha: BOOL;
|
|
352
|
+
init(): this;
|
|
353
|
+
}
|
|
354
|
+
export declare class VeLiveMixAudioLayout {
|
|
355
|
+
/** {zh}
|
|
356
|
+
* @brief 音频流 ID,唯一标识,用于区分不同的音频流。
|
|
357
|
+
*/
|
|
358
|
+
|
|
359
|
+
streamId: int;
|
|
360
|
+
/** {zh}
|
|
361
|
+
* @detail api
|
|
362
|
+
* @brief 混流音频的音量,范围为 [0.0,4.0]。当你将 [VeLiveAudioMixType](#VeLiveAudioMixType) 设置为 `VeLiveAudioMixPlayAndPush` 时,该属性同时控制混流音频在拉流端和本地的播放音量。
|
|
363
|
+
*/
|
|
364
|
+
|
|
365
|
+
volume: float;
|
|
366
|
+
init(): this;
|
|
367
|
+
}
|
|
368
|
+
export declare enum VeLiveAudioProfile {
|
|
369
|
+
/** {zh}
|
|
370
|
+
* @brief LC-AAC 编码方式。
|
|
371
|
+
*
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
VeLiveAudioAACProfileLC = 0,
|
|
375
|
+
/** {zh}
|
|
376
|
+
* @brief HEv1-AAC 编码方式。
|
|
377
|
+
*
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
VeLiveAudioAACProfileHEv1 = 1,
|
|
381
|
+
/** {zh}
|
|
382
|
+
* @brief HEv2-AAC 编码方式。
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
385
|
+
|
|
386
|
+
VeLiveAudioAACProfileHEv2 = 2
|
|
387
|
+
}
|
|
388
|
+
export declare class VeLiveVideoFrame {
|
|
389
|
+
/** {zh}
|
|
390
|
+
* @brief 视频数据包装格式。默认值为 VeLiveVideoBufferTypeUnknown,详情请参见 [VeLiveVideoBufferType](#VeLiveVideoBufferType)。
|
|
391
|
+
*/
|
|
392
|
+
|
|
393
|
+
bufferType: VeLiveVideoBufferType;
|
|
394
|
+
/** {zh}
|
|
395
|
+
* @brief 视频帧像素格式。bufferType 为 VeLiveVideoBufferTypeNSData 时,需要指定数据格式。详情请参见 [VeLivePixelFormat](#VeLivePixelFormat)。
|
|
396
|
+
*/
|
|
397
|
+
|
|
398
|
+
pixelFormat: VeLivePixelFormat;
|
|
399
|
+
/** {zh}
|
|
400
|
+
* @brief 视频帧顺时针旋转角度。详情请参见 [VeLiveVideoRotation](#VeLiveVideoRotation)。
|
|
401
|
+
*/
|
|
402
|
+
|
|
403
|
+
rotation: VeLiveVideoRotation;
|
|
404
|
+
/** {zh}
|
|
405
|
+
* @brief 视频宽度,单位为 px。
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
width: int;
|
|
409
|
+
/** {zh}
|
|
410
|
+
* @brief 视频高度,单位为 px。
|
|
411
|
+
*/
|
|
412
|
+
|
|
413
|
+
height: int;
|
|
414
|
+
/** {zh}
|
|
415
|
+
* @brief 视频帧时间戳,单位为 μs。
|
|
416
|
+
*/
|
|
417
|
+
|
|
418
|
+
pts: CMTime;
|
|
419
|
+
/** {zh}
|
|
420
|
+
* @brief `bufferType` 为 `VeLiveVideoBufferTypeTexture` 时的视频数据。
|
|
421
|
+
*/
|
|
422
|
+
|
|
423
|
+
textureId: GLuint;
|
|
424
|
+
/** {zh}
|
|
425
|
+
* @brief `bufferType` 为 `VeLiveVideoBufferTypePixelBuffer` 时的视频数据。
|
|
426
|
+
*/
|
|
427
|
+
|
|
428
|
+
pixelBuffer: CVPixelBufferRef;
|
|
429
|
+
/** {zh}
|
|
430
|
+
* @brief `bufferType` 为 `VeLiveVideoBufferTypeSampleBuffer` 时的视频数据。
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
sampleBuffer: CMSampleBufferRef;
|
|
434
|
+
/** {zh}
|
|
435
|
+
* @brief `bufferType` 为 `VeLiveVideoBufferTypeNSData` 时的视频数据。
|
|
436
|
+
*/
|
|
437
|
+
|
|
438
|
+
data: NSData;
|
|
439
|
+
/** {zh}
|
|
440
|
+
* @brief 释放回调函数,用于在 SDK 内部处理完 VideoFrame 后通知外部释放相关资源。此回调主要用于 SDK 外部为 VideoFrame 申请内存,以便 SDK 内部使用。但无法预知内部何时使用完毕。
|
|
441
|
+
*/
|
|
442
|
+
|
|
443
|
+
releaseCallback(): void;
|
|
444
|
+
init(): this;
|
|
445
|
+
}
|
|
446
|
+
export declare enum VeLiveVideoFluencyLevel {
|
|
447
|
+
/** {zh}
|
|
448
|
+
* @brief 流畅,帧率能达到预设的目标帧率。
|
|
449
|
+
*
|
|
450
|
+
*/
|
|
451
|
+
|
|
452
|
+
VeLiveVideoFluencyLevelSmooth = 0,
|
|
453
|
+
/** {zh}
|
|
454
|
+
* @brief 一般卡顿,帧率比预设的目标帧率低 1fps~3fps。
|
|
455
|
+
*
|
|
456
|
+
*/
|
|
457
|
+
|
|
458
|
+
VeLiveVideoFluencyLevelSluggish = 1,
|
|
459
|
+
/** {zh}
|
|
460
|
+
* @brief 严重卡顿,帧率比预设的目标帧率低 4fps 以上。
|
|
461
|
+
*
|
|
462
|
+
*/
|
|
463
|
+
|
|
464
|
+
VeLiveVideoFluencyLevelBlocked = 2,
|
|
465
|
+
/** {zh}
|
|
466
|
+
* @brief 完全卡住,帧率低于 2fps。
|
|
467
|
+
*
|
|
468
|
+
*/
|
|
469
|
+
|
|
470
|
+
VeLiveVideoFluencyLevelStuck = 3
|
|
471
|
+
}
|
|
472
|
+
export declare enum VeLiveVideoMirrorType {
|
|
473
|
+
/** {zh}
|
|
474
|
+
* @brief 对采集画面的镜像控制。开启时,预览和推流画面都会呈现为镜像状态。
|
|
475
|
+
*
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
VeLiveVideoMirrorCapture = 0,
|
|
479
|
+
/** {zh}
|
|
480
|
+
* @brief 对预览画面的镜像控制。开启时,只有主播预览画面呈现镜像状态。
|
|
481
|
+
*
|
|
482
|
+
*/
|
|
483
|
+
|
|
484
|
+
VeLiveVideoMirrorPreview = 1,
|
|
485
|
+
/** {zh}
|
|
486
|
+
* @brief 对编码前画面的镜像控制。开启时,主播推流画面呈现镜像状态。
|
|
487
|
+
*
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
VeLiveVideoMirrorPushStream = 2
|
|
491
|
+
}
|
|
492
|
+
export declare class VeLiveAudioCaptureConfiguration {
|
|
493
|
+
/** {zh}
|
|
494
|
+
* @brief 音频采样率,默认值为 `VeLiveAudioSampleRate44100`,详情请参见 [VeLiveAudioSampleRate](#VeLiveAudioSampleRate)。
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
sampleRate: VeLiveAudioSampleRate;
|
|
498
|
+
/** {zh}
|
|
499
|
+
* @brief 音频采集声道数,默认值为 `VeLiveAudioChannelStereo`,详情请参见 [VeLiveAudioChannel](#VeLiveAudioChannel)。
|
|
500
|
+
*/
|
|
501
|
+
|
|
502
|
+
channel: VeLiveAudioChannel;
|
|
503
|
+
init(): this;
|
|
504
|
+
}
|
|
505
|
+
export declare enum VeLiveVideoResolution {
|
|
506
|
+
/** {zh}
|
|
507
|
+
* @brief 360P 分辨率。档位详细配置如下所示。
|
|
508
|
+
* - 横屏分辨率:640x360
|
|
509
|
+
* - 竖屏分辨率:360x640
|
|
510
|
+
* - 帧率:15fps
|
|
511
|
+
* - 目标码率:500kbps
|
|
512
|
+
* - 最小码率:250kbps
|
|
513
|
+
* - 最大码率:800kbps
|
|
514
|
+
*
|
|
515
|
+
*/
|
|
516
|
+
|
|
517
|
+
VeLiveVideoResolution360P = 0,
|
|
518
|
+
/** {zh}
|
|
519
|
+
* @brief 480P 分辨率。档位详细配置如下所示。
|
|
520
|
+
* - 横屏分辨率:864x480
|
|
521
|
+
* - 竖屏分辨率:480x864
|
|
522
|
+
* - 帧率:15fps
|
|
523
|
+
* - 目标码率:800kbps
|
|
524
|
+
* - 最小码率:320kbps
|
|
525
|
+
* - 最大码率:1266kbps
|
|
526
|
+
*
|
|
527
|
+
*/
|
|
528
|
+
|
|
529
|
+
VeLiveVideoResolution480P = 1,
|
|
530
|
+
/** {zh}
|
|
531
|
+
* @brief 540P 分辨率。档位详细配置如下所示。
|
|
532
|
+
* - 横屏 960x540
|
|
533
|
+
* - 竖屏 540x960
|
|
534
|
+
* - 帧率:15fps
|
|
535
|
+
* - 目标码率:1000kbps
|
|
536
|
+
* - 最小码率:500kbps
|
|
537
|
+
* - 最大码率:1520kbps
|
|
538
|
+
*
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
VeLiveVideoResolution540P = 2,
|
|
542
|
+
/** {zh}
|
|
543
|
+
* @brief 720P 分辨率。档位详细配置如下所示。
|
|
544
|
+
* - 横屏 1280x720
|
|
545
|
+
* - 竖屏 720x1280
|
|
546
|
+
* - 帧率:15fps
|
|
547
|
+
* - 目标码率:1200kbps
|
|
548
|
+
* - 最小码率:800kbps
|
|
549
|
+
* - 最大码率:1900kbps
|
|
550
|
+
*
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
VeLiveVideoResolution720P = 3,
|
|
554
|
+
/** {zh}
|
|
555
|
+
* @brief 1080P 分辨率。档位详细配置如下所示。
|
|
556
|
+
* - 横屏 1920x1080
|
|
557
|
+
* - 竖屏 1080x1920
|
|
558
|
+
* - 帧率:20 fps
|
|
559
|
+
* - 目标码率:2500kbps
|
|
560
|
+
* - 最小码率:1000kbps
|
|
561
|
+
* - 最大码率:3800kbps
|
|
562
|
+
*
|
|
563
|
+
*/
|
|
564
|
+
|
|
565
|
+
VeLiveVideoResolution1080P = 4,
|
|
566
|
+
/** {zh}
|
|
567
|
+
* @brief 屏幕推流分辨率。档位详细配置如下所示。
|
|
568
|
+
* - 帧率:15fps
|
|
569
|
+
* - 目标码率:2500kbps
|
|
570
|
+
* - 最小码率:1000kbps
|
|
571
|
+
* - 最大码率:3800kbps
|
|
572
|
+
*
|
|
573
|
+
*/
|
|
574
|
+
|
|
575
|
+
VeLiveVideoResolutionScreen = 10
|
|
576
|
+
}
|
|
577
|
+
export declare enum VeLiveVideoRotation {
|
|
578
|
+
/** {zh}
|
|
579
|
+
* @brief 不旋转。
|
|
580
|
+
*
|
|
581
|
+
*/
|
|
582
|
+
|
|
583
|
+
VeLiveVideoRotation0 = 0,
|
|
584
|
+
/** {zh}
|
|
585
|
+
* @brief 顺时针旋转 90 度。
|
|
586
|
+
*
|
|
587
|
+
*/
|
|
588
|
+
|
|
589
|
+
VeLiveVideoRotation90 = 1,
|
|
590
|
+
/** {zh}
|
|
591
|
+
* @brief 顺时针旋转 180 度。
|
|
592
|
+
*
|
|
593
|
+
*/
|
|
594
|
+
|
|
595
|
+
VeLiveVideoRotation180 = 2,
|
|
596
|
+
/** {zh}
|
|
597
|
+
* @brief 顺时针旋转 270 度。
|
|
598
|
+
*
|
|
599
|
+
*/
|
|
600
|
+
|
|
601
|
+
VeLiveVideoRotation270 = 3
|
|
602
|
+
}
|
|
603
|
+
export declare class VeLiveStreamMixDescription {
|
|
604
|
+
/** {zh}
|
|
605
|
+
* @brief 视频混流布局设置的数组,其中每个元素代表一路视频流的布局。详情请参见 [VeLiveMixVideoLayout](#VeLiveMixVideoLayout)。
|
|
606
|
+
*/
|
|
607
|
+
|
|
608
|
+
mixVideoStreams: NSArray<VeLiveMixVideoLayout>;
|
|
609
|
+
/** {zh}
|
|
610
|
+
* @brief 音频混流设置的数组,其中每个元素代表一路音频流的。详情请参见 [VeLiveMixAudioLayout](#VeLiveMixAudioLayout)。
|
|
611
|
+
*/
|
|
612
|
+
|
|
613
|
+
mixAudioStreams: NSArray<VeLiveMixAudioLayout>;
|
|
614
|
+
/** {zh}
|
|
615
|
+
* @brief 视频混流画布的背景色设置,采用 #RRGGBB 格式。
|
|
616
|
+
*/
|
|
617
|
+
|
|
618
|
+
backgroundColor: NSString;
|
|
619
|
+
init(): this;
|
|
620
|
+
}
|
|
621
|
+
export declare enum VeLiveAudioCaptureType {
|
|
622
|
+
/** {zh}
|
|
623
|
+
* @brief 使用默认麦克风设备进行音频采集。
|
|
624
|
+
*
|
|
625
|
+
*/
|
|
626
|
+
|
|
627
|
+
VeLiveAudioCaptureMicrophone = 0,
|
|
628
|
+
/** {zh}
|
|
629
|
+
* @brief 使用语音通话模式进行音频采集,此模式下会启动硬件的 3A 功能,即自动增益控制、自动频率控制和自动噪声抑制。
|
|
630
|
+
*
|
|
631
|
+
*/
|
|
632
|
+
|
|
633
|
+
VeLiveAudioCaptureVoiceCommunication = 1,
|
|
634
|
+
/** {zh}
|
|
635
|
+
* @brief 使用外部设备或源进行音频采集。
|
|
636
|
+
*
|
|
637
|
+
*/
|
|
638
|
+
|
|
639
|
+
VeLiveAudioCaptureExternal = 2,
|
|
640
|
+
/** {zh}
|
|
641
|
+
* @brief 使用静音帧作为音频源。
|
|
642
|
+
*
|
|
643
|
+
*/
|
|
644
|
+
|
|
645
|
+
VeLiveAudioCaptureMuteFrame = 3
|
|
646
|
+
}
|
|
647
|
+
export declare enum VeLiveVideoCodec {
|
|
648
|
+
/** {zh}
|
|
649
|
+
* @brief 使用 H.264 视频编码。
|
|
650
|
+
*
|
|
651
|
+
*/
|
|
652
|
+
|
|
653
|
+
VeLiveVideoCodecH264 = 0,
|
|
654
|
+
/** {zh}
|
|
655
|
+
* @brief 使用火山引擎自研 ByteVC1 视频编码。
|
|
656
|
+
*
|
|
657
|
+
*/
|
|
658
|
+
|
|
659
|
+
VeLiveVideoCodecByteVC1 = 1
|
|
660
|
+
}
|
|
661
|
+
export declare class VeLiveVideoEncodeFrame {
|
|
662
|
+
/** {zh}
|
|
663
|
+
* @brief 编码帧展示时间戳,单位为 μs。
|
|
664
|
+
*/
|
|
665
|
+
|
|
666
|
+
pts: CMTime;
|
|
667
|
+
/** {zh}
|
|
668
|
+
* @brief 编码帧 dts 时间,即解码时间戳,单位为 μs。
|
|
669
|
+
*/
|
|
670
|
+
|
|
671
|
+
dts: CMTime;
|
|
672
|
+
/** {zh}
|
|
673
|
+
* @brief 编码帧的类型,详细请参见 [VeLiveVideoEncodeFrameType:](#VeLiveVideoEncodeFrameType)。
|
|
674
|
+
*/
|
|
675
|
+
|
|
676
|
+
videoEcodeFrameType: VeLiveVideoEncodeFrameType;
|
|
677
|
+
/** {zh}
|
|
678
|
+
* @brief 编码帧的数据,使用 NSData 表示。
|
|
679
|
+
*/
|
|
680
|
+
|
|
681
|
+
data: NSData;
|
|
682
|
+
init(): this;
|
|
683
|
+
}
|
|
684
|
+
export declare class VeLiveAudioEncoderConfiguration {
|
|
685
|
+
/** {zh}
|
|
686
|
+
* @brief 音频编码码率,单位为 kbps,默认值为 64。
|
|
687
|
+
*/
|
|
688
|
+
|
|
689
|
+
bitrate: int;
|
|
690
|
+
/** {zh}
|
|
691
|
+
* @brief 音频编码采样率,默认值为 VeLiveAudioSampleRate44100,详情请参见 [VeLiveAudioSampleRate](#VeLiveAudioSampleRate)。
|
|
692
|
+
*/
|
|
693
|
+
|
|
694
|
+
sampleRate: VeLiveAudioSampleRate;
|
|
695
|
+
/** {zh}
|
|
696
|
+
* @brief 音频声道数,默认值为 VeLiveAudioChannelStereo,详情请参见 [VeLiveAudioChannel](#VeLiveAudioChannel)。
|
|
697
|
+
*/
|
|
698
|
+
|
|
699
|
+
channel: VeLiveAudioChannel;
|
|
700
|
+
/** {zh}
|
|
701
|
+
* @brief AAC 编码类型,默认值为 VeLiveAudioAACProfileLC。详情请参见 [VeLiveAudioProfile](#VeLiveAudioProfile)。
|
|
702
|
+
*/
|
|
703
|
+
|
|
704
|
+
profile: VeLiveAudioProfile;
|
|
705
|
+
init(): this;
|
|
706
|
+
}
|
|
707
|
+
export declare enum VeLivePusherLogLevel {
|
|
708
|
+
/** {zh}
|
|
709
|
+
* @brief 输出 VERBOSE、DEBUG、INFO、WARNING 和 ERROR 级别的日志。
|
|
710
|
+
*
|
|
711
|
+
*/
|
|
712
|
+
|
|
713
|
+
VeLivePusherLogLevelVerbose = 0,
|
|
714
|
+
/** {zh}
|
|
715
|
+
* @brief 输出 DEBUG、INFO、WARNING 和 ERROR 级别的日志。
|
|
716
|
+
*
|
|
717
|
+
*/
|
|
718
|
+
|
|
719
|
+
VeLivePusherLogLevelDebug = 1,
|
|
720
|
+
/** {zh}
|
|
721
|
+
* @brief 输出 INFO、WARNING 和 ERROR 级别的日志。
|
|
722
|
+
*
|
|
723
|
+
*/
|
|
724
|
+
|
|
725
|
+
VeLivePusherLogLevelInfo = 2,
|
|
726
|
+
/** {zh}
|
|
727
|
+
* @brief 输出 WARNING 和 ERROR 级别的日志。
|
|
728
|
+
*
|
|
729
|
+
*/
|
|
730
|
+
|
|
731
|
+
VeLivePusherLogLevelWarn = 3,
|
|
732
|
+
/** {zh}
|
|
733
|
+
* @brief 输出 ERROR 级别的日志。
|
|
734
|
+
*
|
|
735
|
+
*/
|
|
736
|
+
|
|
737
|
+
VeLivePusherLogLevelError = 4,
|
|
738
|
+
/** {zh}
|
|
739
|
+
* @brief 关闭日志。
|
|
740
|
+
*
|
|
741
|
+
*/
|
|
742
|
+
|
|
743
|
+
VeLivePusherLogLevelNone = 5
|
|
744
|
+
}
|
|
745
|
+
export declare enum VeLiveAudioMixType {
|
|
746
|
+
/** {zh}
|
|
747
|
+
* @brief 拉流端可以听到混音效果,本地无法听到。
|
|
748
|
+
*
|
|
749
|
+
*/
|
|
750
|
+
|
|
751
|
+
VeLiveAudioMixPush = 0,
|
|
752
|
+
/** {zh}
|
|
753
|
+
* @brief 拉流端和本地都可以听到混音效果。
|
|
754
|
+
*
|
|
755
|
+
*/
|
|
756
|
+
|
|
757
|
+
VeLiveAudioMixPlayAndPush = 1
|
|
758
|
+
}
|
|
759
|
+
export declare enum VeLivePusherRenderMode {
|
|
760
|
+
/** {zh}
|
|
761
|
+
* @brief 视窗填满优先。视频帧等比缩放,直至视窗被视频填满。如果视频帧长宽比例与视窗不同,视频帧的多出部分将无法显示。
|
|
762
|
+
*
|
|
763
|
+
*/
|
|
764
|
+
|
|
765
|
+
VeLivePusherRenderModeHidden = 0,
|
|
766
|
+
/** {zh}
|
|
767
|
+
* @brief 视频帧内容全部显示优先。视频尺寸等比缩放,优先保证视频内容全部显示。当视频尺寸与显示窗口尺寸不一致时,会把窗口未被填满的区域填充成背景颜色。
|
|
768
|
+
*
|
|
769
|
+
*/
|
|
770
|
+
|
|
771
|
+
VeLivePusherRenderModeFit = 1,
|
|
772
|
+
/** {zh}
|
|
773
|
+
* @brief 视频帧自适应画布。视频帧非等比缩放,直至画布被填满。在此过程中,视频帧的长宽比例可能会发生变化。
|
|
774
|
+
*
|
|
775
|
+
*/
|
|
776
|
+
|
|
777
|
+
VeLivePusherRenderModeFill = 2
|
|
778
|
+
}
|
|
779
|
+
export declare class VeLiveVideoEffectLicenseConfiguration {
|
|
780
|
+
/** {zh}
|
|
781
|
+
* @brief 获取视频特效许可证类型。许可证类型请参见 [VeLiveVideoEffectLicenseType](#VeLiveVideoEffectLicenseType)。
|
|
782
|
+
*/
|
|
783
|
+
|
|
784
|
+
type: VeLiveVideoEffectLicenseType;
|
|
785
|
+
/** {zh}
|
|
786
|
+
* @brief 获取视频特效许可证的本地路径。当 [VeLiveVideoEffectLicenseType](#VeLiveVideoEffectLicenseType) 为 `VeLiveVideoEffectLicenseTypeOffLine` 时,该属性返回许可证文件的本地路径。
|
|
787
|
+
*/
|
|
788
|
+
|
|
789
|
+
path: NSString;
|
|
790
|
+
/** {zh}
|
|
791
|
+
* @brief 获取视频特效许可证的在线认证 key。当 [VeLiveVideoEffectLicenseType](#VeLiveVideoEffectLicenseType) 为 `VeLiveVideoEffectLicenseTypeOnLine` 时,该属性返回在线认证的 key。
|
|
792
|
+
*/
|
|
793
|
+
|
|
794
|
+
key: NSString;
|
|
795
|
+
/** {zh}
|
|
796
|
+
* @brief 获取视频特效许可证的在线认证 secret。当 [VeLiveVideoEffectLicenseType](#VeLiveVideoEffectLicenseType) 为 `VeLiveVideoEffectLicenseTypeOnLine` 时,该属性返回在线认证的 secret。
|
|
797
|
+
*/
|
|
798
|
+
|
|
799
|
+
secret: NSString;
|
|
800
|
+
/** {zh}
|
|
801
|
+
* @brief 获取视频特效许可证的在线认证地址。当 [VeLiveVideoEffectLicenseType](#VeLiveVideoEffectLicenseType) 为 `VeLiveVideoEffectLicenseTypeOnLine` 时,该属性返回在线认证地址。
|
|
802
|
+
*/
|
|
803
|
+
|
|
804
|
+
url: NSString;
|
|
805
|
+
/** {zh}
|
|
806
|
+
* @detail api
|
|
807
|
+
* @brief 初始化配置为本地验证模式。
|
|
808
|
+
* @param path 视频特效许可证的本地缓存路径。可通过 [path](#VeLiveVideoEffectLicenseConfiguration-path) 获取
|
|
809
|
+
* @return 返回 [VeLiveVideoEffectLicenseConfiguration](#VeLiveVideoEffectLicenseConfiguration) 类的实例,该实例使用指定的本地路径进行许可证验证。
|
|
810
|
+
*/
|
|
811
|
+
|
|
812
|
+
initWithPath(path: NSString): this;
|
|
813
|
+
/** {zh}
|
|
814
|
+
* @detail api
|
|
815
|
+
* @brief 初始化配置为在线验证模式。
|
|
816
|
+
* @param key 视频特效许可证的在线认证 key,可通过 [key](#VeLiveVideoEffectLicenseConfiguration-key) 获取。
|
|
817
|
+
* @param secret 视频特效许可证的在线认证 secret,可通过 [secret](#VeLiveVideoEffectLicenseConfiguration-secret) 获取。
|
|
818
|
+
* @param url 视频特效许可证的在线认证地址,如果传入 nil,会使用默认 url,可通过 [url](#VeLiveVideoEffectLicenseConfiguration-url) 获取在线认证地址。
|
|
819
|
+
* @return 返回 [VeLiveVideoEffectLicenseConfiguration](#VeLiveVideoEffectLicenseConfiguration) 类的实例,该实例使用指定的 key、secret 和 url 进行在线许可证验证。
|
|
820
|
+
*/
|
|
821
|
+
|
|
822
|
+
initWithKey(key: NSString, secret: NSString, url: NSString): this;
|
|
823
|
+
}
|
|
824
|
+
export declare enum VeLiveAudioFrameSource {
|
|
825
|
+
/** {zh}
|
|
826
|
+
* @brief 采集到的原始音频帧。这是从设备的麦克风或其他音频输入源获取的音频帧。
|
|
827
|
+
*
|
|
828
|
+
*/
|
|
829
|
+
|
|
830
|
+
VeLiveAudioFrameSourceCapture = 1,
|
|
831
|
+
/** {zh}
|
|
832
|
+
* @brief 编码前的音频帧。这是通过各种处理(例如噪音消除、回声消除等)后,准备进行编码的音频帧。
|
|
833
|
+
*
|
|
834
|
+
*/
|
|
835
|
+
|
|
836
|
+
VeLiveAudioFrameSourcePreEncode = 2
|
|
837
|
+
}
|
|
838
|
+
export declare enum VeLivePushStatus {
|
|
839
|
+
/** {zh}
|
|
840
|
+
* @brief 初始状态。
|
|
841
|
+
*
|
|
842
|
+
*/
|
|
843
|
+
|
|
844
|
+
VeLivePushStatusNone = 0,
|
|
845
|
+
/** {zh}
|
|
846
|
+
* @brief 正在连接服务器。
|
|
847
|
+
*
|
|
848
|
+
*/
|
|
849
|
+
|
|
850
|
+
VeLivePushStatusConnecting = 1,
|
|
851
|
+
/** {zh}
|
|
852
|
+
* @brief 连接服务器成功。
|
|
853
|
+
*
|
|
854
|
+
*/
|
|
855
|
+
|
|
856
|
+
VeLivePushStatusConnectSuccess = 2,
|
|
857
|
+
/** {zh}
|
|
858
|
+
* @brief 重连服务器中。
|
|
859
|
+
*
|
|
860
|
+
*/
|
|
861
|
+
|
|
862
|
+
VeLivePushStatusReconnecting = 3,
|
|
863
|
+
/** {zh}
|
|
864
|
+
* @brief 推流连接被终止。
|
|
865
|
+
*
|
|
866
|
+
*/
|
|
867
|
+
|
|
868
|
+
VeLivePushStatusConnectStop = 4,
|
|
869
|
+
/** {zh}
|
|
870
|
+
* @brief 推流连接失败。
|
|
871
|
+
*
|
|
872
|
+
*/
|
|
873
|
+
|
|
874
|
+
VeLivePushStatusConnectError = 5,
|
|
875
|
+
/** {zh}
|
|
876
|
+
* @brief 与服务器断开连接。
|
|
877
|
+
*
|
|
878
|
+
*/
|
|
879
|
+
|
|
880
|
+
VeLivePushStatusDisconnected = 6
|
|
881
|
+
}
|
|
882
|
+
export declare enum VeLiveFirstFrameType {
|
|
883
|
+
/** {zh}
|
|
884
|
+
* @brief 视频/音频采集首帧,采集首帧是从音频设备或视频设备(如麦克风、摄像头)获取的第一帧数据。
|
|
885
|
+
*
|
|
886
|
+
*/
|
|
887
|
+
|
|
888
|
+
VeLiveFirstCaptureFrame = 0,
|
|
889
|
+
/** {zh}
|
|
890
|
+
* @brief 视频渲染首帧,渲染首帧是在渲染过程中在屏幕上显示的第一帧视频数据。
|
|
891
|
+
*
|
|
892
|
+
*/
|
|
893
|
+
|
|
894
|
+
VeLiveFirstRenderFrame = 1,
|
|
895
|
+
/** {zh}
|
|
896
|
+
* @brief 视频/音频编码完成首帧,编码完成首帧是编码为某种特定格式的第一帧数据。
|
|
897
|
+
*
|
|
898
|
+
*/
|
|
899
|
+
|
|
900
|
+
VeLiveFirstEncodedFrame = 2,
|
|
901
|
+
/** {zh}
|
|
902
|
+
* @brief 视频/音频发送首帧,发送首帧是在发送过程中,通过网络传输的第一帧数据。
|
|
903
|
+
*
|
|
904
|
+
*/
|
|
905
|
+
|
|
906
|
+
VeLiveFirstSendFrame = 3,
|
|
907
|
+
/** {zh}
|
|
908
|
+
* @brief 录屏采集开始后,获得的第一个 app 音频帧。
|
|
909
|
+
*
|
|
910
|
+
*/
|
|
911
|
+
|
|
912
|
+
VeLiveFirstAppAudioCaptureFrame = 4
|
|
913
|
+
}
|
|
914
|
+
export declare enum VeLiveAudioSampleRate {
|
|
915
|
+
/** {zh}
|
|
916
|
+
* @brief 44.1k 采样,适用于大多数音频处理场景,是音乐 CD 的标准采样率。
|
|
917
|
+
*
|
|
918
|
+
*/
|
|
919
|
+
|
|
920
|
+
VeLiveAudioSampleRate44100 = 44100
|
|
921
|
+
}
|
|
922
|
+
export declare class VeLivePusherStatistics {
|
|
923
|
+
/** {zh}
|
|
924
|
+
* @brief 视频采集宽度,单位为 px。
|
|
925
|
+
*/
|
|
926
|
+
|
|
927
|
+
captureWidth: int;
|
|
928
|
+
/** {zh}
|
|
929
|
+
* @brief 视频采集高度,单位为 px。
|
|
930
|
+
*/
|
|
931
|
+
|
|
932
|
+
captureHeight: int;
|
|
933
|
+
/** {zh}
|
|
934
|
+
* @brief 视频采集帧率,单位为 fps。
|
|
935
|
+
*/
|
|
936
|
+
|
|
937
|
+
captureFps: int;
|
|
938
|
+
/** {zh}
|
|
939
|
+
* @brief 视频编码宽度,单位为 px。
|
|
940
|
+
*/
|
|
941
|
+
|
|
942
|
+
encodeWidth: int;
|
|
943
|
+
/** {zh}
|
|
944
|
+
* @brief 视频编码高度,单位为 px。
|
|
945
|
+
*/
|
|
946
|
+
|
|
947
|
+
encodeHeight: int;
|
|
948
|
+
/** {zh}
|
|
949
|
+
* @brief 视频编码帧率,单位为 fps。
|
|
950
|
+
*/
|
|
951
|
+
|
|
952
|
+
encodeFps: int;
|
|
953
|
+
/** {zh}
|
|
954
|
+
* @brief 视频编码码率,单位为 kbps。
|
|
955
|
+
*/
|
|
956
|
+
|
|
957
|
+
encodeVideoBitrate: int;
|
|
958
|
+
/** {zh}
|
|
959
|
+
* @brief 音频编码码率,单位为 kbps。
|
|
960
|
+
*/
|
|
961
|
+
|
|
962
|
+
encodeAudioBitrate: int;
|
|
963
|
+
/** {zh}
|
|
964
|
+
* @brief 视频发送帧率,可用展示实时帧率,单位为 fps。
|
|
965
|
+
*/
|
|
966
|
+
|
|
967
|
+
transportFps: int;
|
|
968
|
+
/** {zh}
|
|
969
|
+
* @brief 视频发送码率,可用于展示实时码率,单位为 kbps。
|
|
970
|
+
*/
|
|
971
|
+
|
|
972
|
+
transportVideoBitrate: int;
|
|
973
|
+
/** {zh}
|
|
974
|
+
* @brief 视频推流帧率,即您通过 setVideoEncoderConfiguration:{@link #VeLivePusher#setVideoEncoderConfiguration} 方法设置的帧率,单位为 fps。
|
|
975
|
+
*/
|
|
976
|
+
|
|
977
|
+
fps: int;
|
|
978
|
+
/** {zh}
|
|
979
|
+
* @brief 视频推流码率,即您通过 [setVideoEncoderConfiguration](155318#VeLivePusher-setvideoencoderconfiguration) 方法设置的码率,单位为 kbps。
|
|
980
|
+
*/
|
|
981
|
+
|
|
982
|
+
videoBitrate: int;
|
|
983
|
+
/** {zh}
|
|
984
|
+
* @brief 视频推流最小码率,即您通过 [etVideoEncoderConfiguration:](155318#VeLivePusher-setvideoencoderconfiguration) 方法设置的最小码率,单位为 kbps。
|
|
985
|
+
*/
|
|
986
|
+
|
|
987
|
+
minVideoBitrate: int;
|
|
988
|
+
/** {zh}
|
|
989
|
+
* @brief 视频推流最大码率,即您通过 setVideoEncoderConfiguration:{@link #VeLivePusher#setVideoEncoderConfiguration} 方法设置的最大码率,单位为 kbps。
|
|
990
|
+
*/
|
|
991
|
+
|
|
992
|
+
maxVideoBitrate: int;
|
|
993
|
+
/** {zh}
|
|
994
|
+
* @brief 推流地址。
|
|
995
|
+
*/
|
|
996
|
+
|
|
997
|
+
url: NSString;
|
|
998
|
+
/** {zh}
|
|
999
|
+
* @brief 视频编码格式。
|
|
1000
|
+
*/
|
|
1001
|
+
|
|
1002
|
+
codec: NSString;
|
|
1003
|
+
init(): this;
|
|
1004
|
+
}
|
|
1005
|
+
export declare enum VeLivePixelFormat {
|
|
1006
|
+
/** {zh}
|
|
1007
|
+
* @brief 未知格式。
|
|
1008
|
+
*
|
|
1009
|
+
*/
|
|
1010
|
+
|
|
1011
|
+
VeLivePixelFormatUnknown = -1,
|
|
1012
|
+
/** {zh}
|
|
1013
|
+
* @brief I420 格式。
|
|
1014
|
+
*
|
|
1015
|
+
*/
|
|
1016
|
+
|
|
1017
|
+
VeLivePixelFormatI420 = 0,
|
|
1018
|
+
/** {zh}
|
|
1019
|
+
* @brief NV12 格式。
|
|
1020
|
+
*
|
|
1021
|
+
*/
|
|
1022
|
+
|
|
1023
|
+
VeLivePixelFormatNV12 = 1,
|
|
1024
|
+
/** {zh}
|
|
1025
|
+
* @brief NV21 格式。
|
|
1026
|
+
*
|
|
1027
|
+
*/
|
|
1028
|
+
|
|
1029
|
+
VeLivePixelFormatNV21 = 2,
|
|
1030
|
+
/** {zh}
|
|
1031
|
+
* @brief RAGBA 格式。
|
|
1032
|
+
*
|
|
1033
|
+
*/
|
|
1034
|
+
|
|
1035
|
+
VeLivePixelFormatBGRA32 = 3,
|
|
1036
|
+
/** {zh}
|
|
1037
|
+
* @brief OpenGL 2D 纹理。
|
|
1038
|
+
*
|
|
1039
|
+
*/
|
|
1040
|
+
|
|
1041
|
+
VeLivePixelFormat2DTexture = 4
|
|
1042
|
+
}
|
|
1043
|
+
export declare class VeLiveVideoCaptureConfiguration {
|
|
1044
|
+
/** {zh}
|
|
1045
|
+
* @brief 视频采集宽度,单位为 px,默认值为 720。
|
|
1046
|
+
*/
|
|
1047
|
+
|
|
1048
|
+
width: int;
|
|
1049
|
+
/** {zh}
|
|
1050
|
+
* @brief 视频采集高度,单位为 px,默认值为 1280。
|
|
1051
|
+
*/
|
|
1052
|
+
|
|
1053
|
+
height: int;
|
|
1054
|
+
/** {zh}
|
|
1055
|
+
* @brief 视频采集帧率,单位为 fps,默认值为 15。
|
|
1056
|
+
*/
|
|
1057
|
+
|
|
1058
|
+
fps: int;
|
|
1059
|
+
/** {zh}
|
|
1060
|
+
* @brief 视频采集帧类型,默认为 kCVPixelFormatType_420YpCbCr8BiPlanarFullRange。
|
|
1061
|
+
* @note 支持以下视频帧类型:
|
|
1062
|
+
* - kCVPixelFormatType_32BGRA
|
|
1063
|
+
* - kCVPixelFormatType_420YpCbCr8BiPlanarFullRange
|
|
1064
|
+
* - kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
|
|
1065
|
+
* - kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
|
|
1066
|
+
*/
|
|
1067
|
+
|
|
1068
|
+
pixelFormat: OSType;
|
|
1069
|
+
init(): this;
|
|
1070
|
+
}
|
|
1071
|
+
export declare class VeLiveAudioFrame {
|
|
1072
|
+
/** {zh}
|
|
1073
|
+
* @brief 音频数据类型,默认值为 `VeLiveAudioBufferTypeUnknown`,详情请参见 [VeLiveAudioBufferType](#VeLiveAudioBufferType)。
|
|
1074
|
+
*/
|
|
1075
|
+
|
|
1076
|
+
bufferType: VeLiveAudioBufferType;
|
|
1077
|
+
/** {zh}
|
|
1078
|
+
* @brief 音频采样率。详情请参见 [VeLiveAudioSampleRate](#VeLiveAudioSampleRate)。
|
|
1079
|
+
*/
|
|
1080
|
+
|
|
1081
|
+
sampleRate: VeLiveAudioSampleRate;
|
|
1082
|
+
/** {zh}
|
|
1083
|
+
* @brief 音频声道数。详情请参见 [VeLiveAudioChannel](#VeLiveAudioChannel)。
|
|
1084
|
+
*/
|
|
1085
|
+
|
|
1086
|
+
channels: VeLiveAudioChannel;
|
|
1087
|
+
/** {zh}
|
|
1088
|
+
* @brief 当 bufferType 取值为 `VeLiveAudioBufferNSData` 时的音频帧时间戳,单位为 μs。
|
|
1089
|
+
*/
|
|
1090
|
+
|
|
1091
|
+
pts: CMTime;
|
|
1092
|
+
/** {zh}
|
|
1093
|
+
* @brief 当 bufferType 取值为 `VeLiveAudioBufferTypeSampleBuffer` 时的音频数据。
|
|
1094
|
+
*/
|
|
1095
|
+
|
|
1096
|
+
sampleBuffer: CMSampleBufferRef;
|
|
1097
|
+
/** {zh}
|
|
1098
|
+
* @brief 当 bufferType 取值为 `VeLiveAudioBufferTypeNSData` 时的音频数据。音频帧数据为 float32 格式小端字节序存储。
|
|
1099
|
+
*/
|
|
1100
|
+
|
|
1101
|
+
data: NSData;
|
|
1102
|
+
init(): this;
|
|
1103
|
+
}
|
|
1104
|
+
export declare enum VeLiveAudioPowerLevel {
|
|
1105
|
+
/** {zh}
|
|
1106
|
+
* @brief 无声,音量 ≤ 1dB。
|
|
1107
|
+
*
|
|
1108
|
+
*/
|
|
1109
|
+
|
|
1110
|
+
VeLiveAudioPowerLevelSilent = 0,
|
|
1111
|
+
/** {zh}
|
|
1112
|
+
* @brief 安静,音量 15dB 以下。
|
|
1113
|
+
*
|
|
1114
|
+
*/
|
|
1115
|
+
|
|
1116
|
+
VeLiveAudioPowerLevelQuiet = 1,
|
|
1117
|
+
/** {zh}
|
|
1118
|
+
* @brief 轻声,接近耳语音量,音量为 16dB~30dB 之间。
|
|
1119
|
+
*
|
|
1120
|
+
*/
|
|
1121
|
+
|
|
1122
|
+
VeLiveAudioPowerLevelLight = 2,
|
|
1123
|
+
/** {zh}
|
|
1124
|
+
* @brief 正常,音量适宜,类似正常对话的音量,音量为 30dB~60dB 之间。
|
|
1125
|
+
*
|
|
1126
|
+
*/
|
|
1127
|
+
|
|
1128
|
+
VeLiveAudioPowerLevelNormal = 3,
|
|
1129
|
+
/** {zh}
|
|
1130
|
+
* @brief 较大,音量较高,类似咖啡馆、餐厅的环境噪音,音量为 61dB~85dB 之间。
|
|
1131
|
+
*
|
|
1132
|
+
*/
|
|
1133
|
+
|
|
1134
|
+
VeLiveAudioPowerLevelLoud = 4,
|
|
1135
|
+
/** {zh}
|
|
1136
|
+
* @brief 吵闹,音量极高,类似于繁忙的街道或者是音乐会现场,音量超过 85dB。
|
|
1137
|
+
*
|
|
1138
|
+
*/
|
|
1139
|
+
|
|
1140
|
+
VeLiveAudioPowerLevelNoisy = 5
|
|
1141
|
+
}
|
|
1142
|
+
export declare enum UIInterfaceOrientation {
|
|
1143
|
+
UIInterfaceOrientationUnknown = 0,
|
|
1144
|
+
UIInterfaceOrientationPortrait = 1,
|
|
1145
|
+
UIInterfaceOrientationPortraitUpsideDown = 2,
|
|
1146
|
+
UIInterfaceOrientationLandscapeLeft = 3,
|
|
1147
|
+
UIInterfaceOrientationLandscapeRight = 4
|
|
1148
|
+
}
|
|
1149
|
+
export declare enum OSType {
|
|
1150
|
+
kCVPixelFormatType_32BGRA = "BGRA",
|
|
1151
|
+
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange = "420f",
|
|
1152
|
+
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange = "420v",
|
|
1153
|
+
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange = "x420"
|
|
1154
|
+
}
|