@tencentcloud/sdk-mcp 1.2.8 → 1.3.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.
Files changed (78) hide show
  1. package/package.json +1 -1
  2. package/resource/doc/chatuikit/faq/common/server.md +54 -0
  3. package/resource/doc/chatuikit/faq/web_sdk/faq.md +60 -0
  4. package/resource/doc/livekit/vue/components/co-guest-panel.md +5 -5
  5. package/resource/doc/livekit/vue/components/live-view.md +16 -49
  6. package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +13 -44
  7. package/resource/doc/livekit/vue/live-player-desk-integration.md +293 -0
  8. package/resource/doc/livekit/vue/{components/live-player.md → live-player-h5-integration.md} +118 -110
  9. package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +77 -82
  10. package/resource/doc/livekit/vue/workflow.md +219 -0
  11. package/resource/doc/native_live/android/V2TXLiveCode_api_android.md +334 -0
  12. package/resource/doc/native_live/android/V2TXLiveDef_api_android.md +434 -0
  13. package/resource/doc/native_live/android/V2TXLivePlayerObserver_api_android.md +685 -0
  14. package/resource/doc/native_live/android/V2TXLivePlayer_api_android.md +712 -0
  15. package/resource/doc/native_live/android/V2TXLivePremier_api_android.md +284 -0
  16. package/resource/doc/native_live/android/V2TXLivePusherObserver_api_android.md +849 -0
  17. package/resource/doc/native_live/android/V2TXLivePusher_api_android.md +1046 -0
  18. package/resource/doc/native_live/flutter/V2TXLiveCode_api_flutter.md +460 -0
  19. package/resource/doc/native_live/flutter/V2TXLiveDef_api_flutter.md +558 -0
  20. package/resource/doc/native_live/flutter/V2TXLivePlayerObserver_api_flutter.md +879 -0
  21. package/resource/doc/native_live/flutter/V2TXLivePlayer_api_flutter.md +668 -0
  22. package/resource/doc/native_live/flutter/V2TXLivePremier_api_flutter.md +456 -0
  23. package/resource/doc/native_live/flutter/V2TXLivePusherObserver_api_flutter.md +332 -0
  24. package/resource/doc/native_live/flutter/V2TXLivePusher_api_flutter.md +748 -0
  25. package/resource/doc/native_live/iOS/V2TXLiveCode_api_iOS.md +328 -0
  26. package/resource/doc/native_live/iOS/V2TXLiveDef_api_iOS.md +505 -0
  27. package/resource/doc/native_live/iOS/V2TXLivePlayerObserver_api_iOS.md +507 -0
  28. package/resource/doc/native_live/iOS/V2TXLivePlayer_api_iOS.md +676 -0
  29. package/resource/doc/native_live/iOS/V2TXLivePremier_api_iOS.md +284 -0
  30. package/resource/doc/native_live/iOS/V2TXLivePusherObserver_api_iOS.md +820 -0
  31. package/resource/doc/native_live/iOS/V2TXLivePusher_api_iOS.md +1065 -0
  32. package/resource/doc/trtc/C++/ITRTCCloud.md +4131 -0
  33. package/resource/doc/trtc/C++/ITRTCStatistics.md +326 -0
  34. package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1306 -0
  35. package/resource/doc/trtc/C++/ITXDeviceManager.md +1029 -0
  36. package/resource/doc/trtc/C++/TRTCCloudCallback.md +2743 -0
  37. package/resource/doc/trtc/C++/TRTCTypeDef.md +3703 -0
  38. package/resource/doc/trtc/C++/TXLiteAVCode.md +930 -0
  39. package/resource/doc/trtc/android/TRTCCloud.md +3832 -0
  40. package/resource/doc/trtc/android/TRTCCloudDef.md +3945 -0
  41. package/resource/doc/trtc/android/TRTCCloudListener.md +2480 -0
  42. package/resource/doc/trtc/android/TRTCStatistics.md +296 -0
  43. package/resource/doc/trtc/android/TXAudioEffectManager.md +1344 -0
  44. package/resource/doc/trtc/android/TXBeautyManager.md +980 -0
  45. package/resource/doc/trtc/android/TXDeviceManager.md +441 -0
  46. package/resource/doc/trtc/android/TXLiteAVCode.md +914 -0
  47. package/resource/doc/trtc/iOS/TRTCCloud.md +4256 -0
  48. package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2580 -0
  49. package/resource/doc/trtc/iOS/TRTCStatistics.md +296 -0
  50. package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1117 -0
  51. package/resource/doc/trtc/iOS/TXBeautyManager.md +986 -0
  52. package/resource/doc/trtc/iOS/TXDeviceManager.md +1025 -0
  53. package/resource/doc/trtc/iOS/TXLiteAVCode.md +929 -0
  54. package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +3798 -0
  55. package/tools/definitions/get_faq_def.js +4 -0
  56. package/tools/definitions/get_faq_def.js.map +1 -1
  57. package/tools/definitions/get_native_live_api_def.js +22 -0
  58. package/tools/definitions/get_native_live_api_def.js.map +1 -0
  59. package/tools/definitions/get_trtc_native_api_def.js +17 -0
  60. package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
  61. package/tools/definitions/get_web_live_uikit_component_detail_def.js +9 -3
  62. package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -1
  63. package/tools/definitions/get_web_live_uikit_integration_def.js +32 -0
  64. package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -0
  65. package/tools/index.js +8 -0
  66. package/tools/index.js.map +1 -1
  67. package/tools/live/get-web-live-uikit-integration.js +52 -0
  68. package/tools/live/get-web-live-uikit-integration.js.map +1 -0
  69. package/tools/native_live/get-native-live-api.js +31 -0
  70. package/tools/native_live/get-native-live-api.js.map +1 -0
  71. package/tools/trtc/get-trtc-native-api.js +31 -0
  72. package/tools/trtc/get-trtc-native-api.js.map +1 -0
  73. package/utils/generate-structured-result.js +34 -0
  74. package/utils/generate-structured-result.js.map +1 -0
  75. package/utils/handle-component-name.js +0 -8
  76. package/utils/handle-component-name.js.map +1 -1
  77. package/utils/report-cls-client.js +1 -1
  78. package/utils/report-es-client.js +1 -1
@@ -0,0 +1,505 @@
1
+ # 腾讯云直播SDK V2TXLiveDef 类型定义文档
2
+
3
+ ## 概述
4
+
5
+ `V2TXLiveDef.h` 是腾讯云直播SDK iOS/macOS平台的核心类型定义文件,包含了直播推流和播放相关的所有枚举、常量和数据结构定义。
6
+
7
+ **平台支持**: iOS, macOS
8
+ **类型总数**: 包含视频、音频、统计、配置等各类定义
9
+
10
+ ## 📋 目录结构
11
+
12
+ ### 1. [支持协议](#支持协议)
13
+ ### 2. [视频相关类型](#视频相关类型)
14
+ ### 3. [音频相关类型](#音频相关类型)
15
+ ### 4. [统计指标数据](#统计指标数据)
16
+ ### 5. [连接状态相关](#连接状态相关)
17
+ ### 6. [云端混流配置](#云端混流配置)
18
+ ### 7. [本地录制配置](#本地录制配置)
19
+ ### 8. [日志配置](#日志配置)
20
+ ### 9. [其他配置](#其他配置)
21
+
22
+ ## 1. 支持协议
23
+
24
+ ### V2TXLiveMode - 直播 SDK 推流支持的协议类型
25
+ ```objc
26
+ typedef NS_ENUM(NSUInteger, V2TXLiveMode) {
27
+ /// 支持协议: RTMP
28
+ V2TXLiveMode_RTMP,
29
+
30
+ /// 支持协议: RTC
31
+ V2TXLiveMode_RTC
32
+ };
33
+ ```
34
+
35
+ **协议说明**:
36
+ - RTMP: 标准直播协议
37
+ - RTC: 实时音视频协议
38
+
39
+ ## 2. 视频相关类型
40
+
41
+ ### V2TXLiveVideoResolution - 视频分辨率枚举,定义了各种标准分辨率
42
+ ```objc
43
+ typedef NS_ENUM(NSInteger, V2TXLiveVideoResolution) {
44
+ /// 分辨率 160*160,码率范围:100Kbps ~ 150Kbps,帧率:15fps。
45
+ V2TXLiveVideoResolution160x160,
46
+
47
+ /// 分辨率 270*270,码率范围:200Kbps ~ 300Kbps,帧率:15fps。
48
+ V2TXLiveVideoResolution270x270,
49
+
50
+ /// 分辨率 480*480,码率范围:350Kbps ~ 525Kbps,帧率:15fps。
51
+ V2TXLiveVideoResolution480x480,
52
+
53
+ /// 分辨率 320*240,码率范围:250Kbps ~ 375Kbps,帧率:15fps。
54
+ V2TXLiveVideoResolution320x240,
55
+
56
+ /// 分辨率 480*360,码率范围:400Kbps ~ 600Kbps,帧率:15fps。
57
+ V2TXLiveVideoResolution480x360,
58
+
59
+ /// 分辨率 640*480,码率范围:600Kbps ~ 900Kbps,帧率:15fps。
60
+ V2TXLiveVideoResolution640x480,
61
+
62
+ /// 分辨率 320*180,码率范围:250Kbps ~ 400Kbps,帧率:15fps。
63
+ V2TXLiveVideoResolution320x180,
64
+
65
+ /// 分辨率 480*270,码率范围:350Kbps ~ 550Kbps,帧率:15fps。
66
+ V2TXLiveVideoResolution480x270,
67
+
68
+ /// 分辨率 640*360,码率范围:500Kbps ~ 900Kbps,帧率:15fps。
69
+ V2TXLiveVideoResolution640x360,
70
+
71
+ /// 分辨率 960*540,码率范围:800Kbps ~ 1500Kbps,帧率:15fps。
72
+ V2TXLiveVideoResolution960x540,
73
+
74
+ /// 分辨率 1280*720,码率范围:1000Kbps ~ 1800Kbps,帧率:15fps。
75
+ V2TXLiveVideoResolution1280x720,
76
+
77
+ /// 分辨率 1920*1080,码率范围:2500Kbps ~ 3000Kbps,帧率:15fps。
78
+ V2TXLiveVideoResolution1920x1080
79
+ };
80
+ ```
81
+
82
+ ### V2TXLiveVideoResolutionMode - 视频分辨率模式
83
+ ```objc
84
+ typedef NS_ENUM(NSInteger, V2TXLiveVideoResolutionMode) {
85
+ /// 横屏模式
86
+ V2TXLiveVideoResolutionModeLandscape,
87
+
88
+ /// 竖屏模式
89
+ V2TXLiveVideoResolutionModePortrait
90
+ };
91
+ ```
92
+
93
+ **分辨率说明**:
94
+ - 支持从160×160到1920×1080的多种分辨率
95
+ - 支持横屏和竖屏两种模式
96
+
97
+ ### V2TXLiveMirrorType - 本地摄像头镜像类型
98
+ ```objc
99
+ typedef NS_ENUM(NSInteger, V2TXLiveMirrorType) {
100
+ /// 系统默认镜像类型,前置摄像头镜像,后置摄像头不镜像
101
+ V2TXLiveMirrorTypeAuto,
102
+
103
+ /// 前置摄像头和后置摄像头都切换为镜像模式
104
+ V2TXLiveMirrorTypeEnable,
105
+
106
+ /// 前置摄像头和后置摄像头都切换为非镜像模式
107
+ V2TXLiveMirrorTypeDisable
108
+ };
109
+ ```
110
+
111
+ ### V2TXLiveFillMode - 视频画面填充模式
112
+ ```objc
113
+ typedef NS_ENUM(NSInteger, V2TXLiveFillMode) {
114
+ /// 图像铺满屏幕,超出部分将被裁剪,画面可能不完整
115
+ V2TXLiveFillModeFill,
116
+
117
+ /// 图像长边填满屏幕,短边区域填充黑色,画面内容完整
118
+ V2TXLiveFillModeFit,
119
+
120
+ /// 图像拉伸铺满,长度和宽度可能不会按比例变化
121
+ V2TXLiveFillModeScaleFill
122
+ };
123
+ ```
124
+
125
+ ### V2TXLiveRotation - 视频画面旋转角度
126
+ ```objc
127
+ typedef NS_ENUM(NSInteger, V2TXLiveRotation) {
128
+ /// 不旋转
129
+ V2TXLiveRotation0,
130
+
131
+ /// 顺时针旋转90度
132
+ V2TXLiveRotation90,
133
+
134
+ /// 顺时针旋转180度
135
+ V2TXLiveRotation180,
136
+
137
+ /// 顺时针旋转270度
138
+ V2TXLiveRotation270
139
+ };
140
+ ```
141
+
142
+ ### V2TXLiveVideoEncoderParam - 视频编码参数配置类
143
+ ```objc
144
+ @interface V2TXLiveVideoEncoderParam : NSObject
145
+
146
+ @property(nonatomic, assign) V2TXLiveVideoResolution videoResolution; // 视频分辨率
147
+ @property(nonatomic, assign) V2TXLiveVideoResolutionMode videoResolutionMode; // 分辨率模式
148
+ @property(nonatomic, assign) int videoFps; // 视频采集帧率(fps)
149
+ @property(nonatomic, assign) int videoBitrate; // 目标视频码率(kbps)
150
+ @property(nonatomic, assign) int minVideoBitrate; // 最低视频码率(kbps)
151
+
152
+ - (instancetype)initWith:(V2TXLiveVideoResolution)resolution; // 初始化方法
153
+
154
+ @end
155
+ ```
156
+
157
+ **推荐配置**:
158
+ - **帧率**: 15fps或20fps(5fps以下卡顿明显,20fps以上浪费带宽)
159
+ - **码率自适应**: 通过同时设置videoBitrate和minVideoBitrate来约束码率调整范围
160
+
161
+ ### V2TXLivePixelFormat - 视频帧像素格式
162
+ ```objc
163
+ typedef NS_ENUM(NSInteger, V2TXLivePixelFormat) {
164
+ /// 未知像素格式
165
+ V2TXLivePixelFormatUnknown,
166
+
167
+ /// I420格式(YUV420P)
168
+ V2TXLivePixelFormatI420,
169
+
170
+ /// NV12格式
171
+ V2TXLivePixelFormatNV12,
172
+
173
+ /// BGRA32格式
174
+ V2TXLivePixelFormatBGRA32,
175
+
176
+ /// OpenGL 2D纹理格式
177
+ V2TXLivePixelFormatTexture2D
178
+ };
179
+ ```
180
+
181
+ ### V2TXLiveBufferType - 视频数据包装格式
182
+ ```objc
183
+ typedef NS_ENUM(NSInteger, V2TXLiveBufferType) {
184
+ /// 未知数据包装格式
185
+ V2TXLiveBufferTypeUnknown,
186
+
187
+ /// PixelBuffer格式,iOS平台原生视频数据格式
188
+ V2TXLiveBufferTypePixelBuffer,
189
+
190
+ /// NSData格式,装载I420等buffer数据
191
+ V2TXLiveBufferTypeNSData,
192
+
193
+ /// OpenGL纹理格式,性能最好,画质损失最少
194
+ V2TXLiveBufferTypeTexture
195
+ };
196
+ ```
197
+
198
+ ### V2TXLiveVideoFrame - 视频帧信息类
199
+ ```objc
200
+ @interface V2TXLiveVideoFrame : NSObject
201
+
202
+ @property(nonatomic, assign) V2TXLivePixelFormat pixelFormat; // 视频帧像素格式
203
+ @property(nonatomic, assign) V2TXLiveBufferType bufferType; // 视频数据包装格式
204
+ @property(nonatomic, strong) NSData *data; // 视频数据
205
+ @property(nonatomic, assign) CVPixelBufferRef pixelBuffer; // 视频数据PixelBuffer
206
+ @property(nonatomic, assign) NSUInteger width; // 视频宽度
207
+ @property(nonatomic, assign) NSUInteger height; // 视频高度
208
+ @property(nonatomic, assign) V2TXLiveRotation rotation; // 视频帧旋转角度
209
+ @property(nonatomic, assign) GLuint textureId; // 视频纹理ID
210
+
211
+ @end
212
+ ```
213
+ ### 🖼️ 画中画状态
214
+
215
+ ### V2TXLivePictureInPictureState - 画中画状态枚举
216
+ ```objc
217
+ typedef NS_ENUM(NSInteger, V2TXLivePictureInPictureState) {
218
+ /// 画中画状态未定义
219
+ V2TXLivePictureInPictureStateUndefined,
220
+
221
+ /// 画中画发生错误
222
+ V2TXLivePictureInPictureStateOccurError,
223
+
224
+ /// 画中画将要开始
225
+ V2TXLivePictureInPictureStateWillStart,
226
+
227
+ /// 画中画已经开始
228
+ V2TXLivePictureInPictureStateDidStart,
229
+
230
+ /// 画中画将要停止
231
+ V2TXLivePictureInPictureStateWillStop,
232
+
233
+ /// 画中画已经停止
234
+ V2TXLivePictureInPictureStateDidStop,
235
+
236
+ /// 画中画恢复用户界面
237
+ V2TXLivePictureInPictureStateRestoreUI
238
+ };
239
+ ```
240
+ ## 3. 音频相关类型
241
+
242
+ ### V2TXLiveAudioQuality - 声音音质配置
243
+ ```objc
244
+ typedef NS_ENUM(NSInteger, V2TXLiveAudioQuality) {
245
+ /// 语音音质:16k采样率,单声道,16kbps码率,适合语音通话
246
+ V2TXLiveAudioQualitySpeech,
247
+
248
+ /// 默认音质:48k采样率,单声道,50kbps码率,SDK默认配置
249
+ V2TXLiveAudioQualityDefault,
250
+
251
+ /// 音乐音质:48k采样率,双声道+全频带,128kbps码率,适合高保真音乐场景
252
+ V2TXLiveAudioQualityMusic
253
+ };
254
+ ```
255
+
256
+ ### V2TXLiveAudioFrame - 音频帧数据类
257
+ ```objc
258
+ @interface V2TXLiveAudioFrame : NSObject
259
+
260
+ @property(nonatomic, strong) NSData *data; // 音频数据
261
+ @property(nonatomic, assign) int sampleRate; // 采样率(默认48000Hz)
262
+ @property(nonatomic, assign) int channel; // 声道数(默认1,单声道)
263
+ @property(nonatomic, assign) uint64_t timestamp; // 时间戳,单位ms
264
+
265
+ @end
266
+ ```
267
+
268
+ ### V2TXLiveAudioFrameOperationMode - 音频回调数据读写模式
269
+ ```objc
270
+ typedef NS_ENUM(NSInteger, V2TXLiveAudioFrameOperationMode) {
271
+ /// 读写模式:可以获取并修改回调的音频数据(默认模式)
272
+ V2TXLiveAudioFrameOperationModeReadWrite,
273
+
274
+ /// 只读模式:仅从回调中获取音频数据
275
+ V2TXLiveAudioFrameOperationModeReadOnly
276
+ };
277
+ ```
278
+
279
+ ### V2TXLiveAudioFrameObserverFormat - 音频帧回调格式配置
280
+ ```objc
281
+ @interface V2TXLiveAudioFrameObserverFormat : NSObject
282
+
283
+ @property(nonatomic, assign) int sampleRate; // 采样率(默认48000Hz)
284
+ @property(nonatomic, assign) int channel; // 声道数(默认1)
285
+ @property(nonatomic, assign) int samplesPerCall; // 采样点数
286
+ @property(nonatomic, assign) V2TXLiveAudioFrameOperationMode mode; // 回调数据读写模式
287
+
288
+ @end
289
+ ```
290
+
291
+ **参数说明**:
292
+ - **samplesPerCall**: 必须是sampleRate/100的整数倍
293
+
294
+ ## 4. 统计指标数据
295
+
296
+ ### V2TXLivePusherStatistics - 推流器统计数据类
297
+ ```objc
298
+ @interface V2TXLivePusherStatistics : NSObject
299
+
300
+ @property(nonatomic, assign) NSUInteger appCpu; // 当前App的CPU使用率(%)
301
+ @property(nonatomic, assign) NSUInteger systemCpu; // 当前系统的CPU使用率(%)
302
+ @property(nonatomic, assign) NSUInteger width; // 视频宽度
303
+ @property(nonatomic, assign) NSUInteger height; // 视频高度
304
+ @property(nonatomic, assign) NSUInteger fps; // 帧率(fps)
305
+ @property(nonatomic, assign) NSUInteger videoBitrate; // 视频码率(Kbps)
306
+ @property(nonatomic, assign) NSUInteger audioBitrate; // 音频码率(Kbps)
307
+ @property(nonatomic, assign) NSUInteger rtt; // 往返延时(ms)
308
+ @property(nonatomic, assign) NSUInteger netSpeed; // 上行速度(kbps)
309
+
310
+ @end
311
+ ```
312
+
313
+ ### V2TXLivePlayerStatistics - 播放器统计数据类
314
+ ```objc
315
+ @interface V2TXLivePlayerStatistics : NSObject
316
+
317
+ @property(nonatomic, assign) NSUInteger appCpu; // 当前App的CPU使用率(%)
318
+ @property(nonatomic, assign) NSUInteger systemCpu; // 当前系统的CPU使用率(%)
319
+ @property(nonatomic, assign) NSUInteger width; // 视频宽度
320
+ @property(nonatomic, assign) NSUInteger height; // 视频高度
321
+ @property(nonatomic, assign) NSUInteger fps; // 帧率(fps)
322
+ @property(nonatomic, assign) NSUInteger videoBitrate; // 视频码率(Kbps)
323
+ @property(nonatomic, assign) NSUInteger audioBitrate; // 音频码率(Kbps)
324
+ @property(nonatomic, assign) NSUInteger audioPacketLoss; // 网络音频丢包率(%)
325
+ @property(nonatomic, assign) NSUInteger videoPacketLoss; // 网络视频丢包率(%)
326
+ @property(nonatomic, assign) NSUInteger jitterBufferDelay; // 播放延迟(ms)
327
+ @property(nonatomic, assign) NSUInteger audioTotalBlockTime; // 音频播放累计卡顿时长(ms)
328
+ @property(nonatomic, assign) NSUInteger audioBlockRate; // 音频播放卡顿率(%)
329
+ @property(nonatomic, assign) NSUInteger videoTotalBlockTime; // 视频播放累计卡顿时长(ms)
330
+ @property(nonatomic, assign) NSUInteger videoBlockRate; // 视频播放卡顿率(%)
331
+ @property(nonatomic, assign) NSUInteger rtt; // 往返延时(ms)
332
+ @property(nonatomic, assign) NSUInteger netSpeed; // 下载速度(kbps)
333
+
334
+ @end
335
+ ```
336
+
337
+ ## 5. 连接状态相关
338
+
339
+ ### V2TXLivePushStatus - 推流连接状态
340
+ ```objc
341
+ typedef NS_ENUM(NSInteger, V2TXLivePushStatus) {
342
+ /// 与服务器断开连接
343
+ V2TXLivePushStatusDisconnected,
344
+
345
+ /// 正在连接服务器
346
+ V2TXLivePushStatusConnecting,
347
+
348
+ /// 连接服务器成功
349
+ V2TXLivePushStatusConnectSuccess,
350
+
351
+ /// 重连服务器中
352
+ V2TXLivePushStatusReconnecting
353
+ };
354
+ ```
355
+
356
+ ### V2TXAudioRoute - 音频路由模式
357
+ ```objc
358
+ typedef NS_ENUM(NSInteger, V2TXAudioRoute) {
359
+ /// 扬声器模式,声音从手机扬声器播放
360
+ V2TXAudioRouteSpeakerphone,
361
+
362
+ /// 听筒模式,声音从手机听筒播放
363
+ V2TXAudioRouteEarpiece
364
+ };
365
+ ```
366
+
367
+ ## 6. 云端混流配置
368
+
369
+ ### V2TXLiveMixInputType - 混流输入类型
370
+ ```objc
371
+ typedef NS_ENUM(NSInteger, V2TXLiveMixInputType) {
372
+ /// 混入音视频
373
+ V2TXLiveMixInputTypeAudioVideo,
374
+
375
+ /// 只混入视频
376
+ V2TXLiveMixInputTypePureVideo,
377
+
378
+ /// 只混入音频
379
+ V2TXLiveMixInputTypePureAudio
380
+ };
381
+ ```
382
+
383
+ ### V2TXLiveMixStream - 云端混流子画面位置信息
384
+ ```objc
385
+ @interface V2TXLiveMixStream : NSObject
386
+
387
+ @property(nonatomic, copy) NSString *userId; // 参与混流的userId
388
+ @property(nonatomic, copy) NSString *streamId; // 推流streamId
389
+ @property(nonatomic, assign) NSInteger x; // 图层位置x坐标(绝对像素值)
390
+ @property(nonatomic, assign) NSInteger y; // 图层位置y坐标(绝对像素值)
391
+ @property(nonatomic, assign) NSInteger width; // 图层宽度(绝对像素值)
392
+ @property(nonatomic, assign) NSInteger height; // 图层高度(绝对像素值)
393
+ @property(nonatomic, assign) NSUInteger zOrder; // 图层层次(1-15,不可重复)
394
+ @property(nonatomic, assign) V2TXLiveMixInputType inputType; // 直播流输入类型
395
+
396
+ @end
397
+ ```
398
+
399
+ ### V2TXLiveTranscodingConfig - 云端混流转码配置
400
+ ```objc
401
+ @interface V2TXLiveTranscodingConfig : NSObject
402
+
403
+ @property(nonatomic, assign) NSUInteger videoWidth; // 最终转码后的视频宽度
404
+ @property(nonatomic, assign) NSUInteger videoHeight; // 最终转码后的视频高度
405
+ @property(nonatomic, assign) NSUInteger videoBitrate; // 最终转码后的视频码率(kbps)
406
+ @property(nonatomic, assign) NSUInteger videoFramerate; // 最终转码后的视频帧率(FPS)
407
+ @property(nonatomic, assign) NSUInteger videoGOP; // 关键帧间隔(秒)
408
+ @property(nonatomic, assign) NSUInteger backgroundColor; // 混合后画面的底色颜色
409
+ @property(nonatomic, copy) NSString *backgroundImage; // 混合后画面的背景图
410
+ @property(nonatomic, assign) NSUInteger audioSampleRate; // 最终转码后的音频采样率
411
+ @property(nonatomic, assign) NSUInteger audioBitrate; // 最终转码后的音频码率(kbps)
412
+ @property(nonatomic, assign) NSUInteger audioChannels; // 最终转码后的音频声道数
413
+ @property(nonatomic, copy) NSArray<V2TXLiveMixStream *> *mixStreams; // 子画面位置信息
414
+ @property(nonatomic, copy) NSString *outputStreamId; // 输出到CDN的直播流ID
415
+
416
+ @end
417
+ ```
418
+
419
+ ## 7. 本地录制配置
420
+
421
+ ### V2TXLiveRecordMode - 本地音视频录制模式
422
+ ```objc
423
+ typedef NS_ENUM(NSUInteger, V2TXLiveRecordMode) {
424
+ /// 录制音频和视频
425
+ V2TXLiveRecordModeBoth
426
+ };
427
+ ```
428
+
429
+ ### V2TXLiveLocalRecordingParams - 本地录制配置参数
430
+ ```objc
431
+ @interface V2TXLiveLocalRecordingParams : NSObject
432
+
433
+ @property(nonatomic, copy) NSString *filePath; // 录制文件路径(必填,需包含文件名和格式后缀)
434
+ @property(nonatomic, assign) V2TXLiveRecordMode recordMode; // 媒体录制模式
435
+ @property(nonatomic, assign) int interval; // 录制信息更新频率(毫秒)
436
+
437
+ @end
438
+ ```
439
+
440
+ **参数说明**:
441
+ - **filePath**: 必须精确到文件名和格式后缀(目前只支持MP4)
442
+ - **interval**: 范围1000-10000ms,-1表示不回调录制信息
443
+
444
+ ## 8. 日志配置
445
+
446
+ ### V2TXLiveLogLevel - 日志级别
447
+ ```objc
448
+ typedef NS_ENUM(NSInteger, V2TXLiveLogLevel) {
449
+ V2TXLiveLogLevelAll, // 输出所有级别
450
+ V2TXLiveLogLevelDebug, // 输出DEBUG及以上
451
+ V2TXLiveLogLevelInfo, // 输出INFO及以上
452
+ V2TXLiveLogLevelWarning, // 输出WARNING及以上
453
+ V2TXLiveLogLevelError, // 输出ERROR及以上
454
+ V2TXLiveLogLevelFatal, // 只输出FATAL
455
+ V2TXLiveLogLevelNULL // 不输出任何log
456
+ };
457
+ ```
458
+
459
+ ### V2TXLiveLogConfig - 日志配置类
460
+ ```objc
461
+ @interface V2TXLiveLogConfig : NSObject
462
+
463
+ @property(nonatomic, assign) V2TXLiveLogLevel logLevel; // 设置Log级别
464
+ @property(nonatomic, assign) BOOL enableObserver; // 是否通过Observer接收Log信息
465
+ @property(nonatomic, assign) BOOL enableConsole; // 是否在编辑器控制台打印Log
466
+ @property(nonatomic, assign) BOOL enableLogFile; // 是否启用本地Log文件
467
+ @property(nonatomic, copy) NSString *logPath; // 本地Log存储目录
468
+
469
+ @end
470
+ ```
471
+
472
+ **默认存储位置**: iOS/macOS默认存储在Documents/log目录
473
+
474
+ **字段说明**:
475
+ - **logLevel**: 设置Log级别,控制SDK输出日志的详细程度
476
+ - **enableObserver**: 是否通过Observer接收Log信息,用于自定义日志处理
477
+ - **enableConsole**: 是否在编辑器控制台打印Log,便于调试
478
+ - **enableLogFile**: 是否启用本地Log文件,用于问题排查
479
+ - **logPath**: 本地Log存储目录,如不设置则使用默认路径
480
+
481
+ ## 9. 其他配置
482
+
483
+ ### V2TXLiveSocks5ProxyConfig - Socks5代理协议配置
484
+ ```objc
485
+ @interface V2TXLiveSocks5ProxyConfig : NSObject
486
+
487
+ @property(nonatomic, assign) BOOL supportHttps; // 是否支持HTTPS
488
+ @property(nonatomic, assign) BOOL supportTcp; // 是否支持TCP
489
+ @property(nonatomic, assign) BOOL supportUdp; // 是否支持UDP
490
+
491
+ @end
492
+ ```
493
+
494
+ ### V2TXLiveStreamInfo - 自适应切换的码流信息
495
+ ```objc
496
+ @interface V2TXLiveStreamInfo : NSObject
497
+
498
+ @property(nonatomic, assign) int width; // 视频宽度
499
+ @property(nonatomic, assign) int height; // 视频高度
500
+ @property(nonatomic, assign) int bitrate; // 码率(bps)
501
+ @property(nonatomic, assign) float framerate; // 帧率
502
+ @property(nonatomic, copy) NSString *url; // 流地址
503
+
504
+ @end
505
+ ```