Skip to content

Commit 7fc4667

Browse files
author
shengcui
committed
更新 Demo 至 6.2.7005 版本
1 parent 09dbad3 commit 7fc4667

File tree

108 files changed

+3203
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+3203
-548
lines changed

Mac/SDK/TXLiteAVSDK_TRTC_Mac.framework/Versions/A/Headers/TRTCCloud.h

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Function: 腾讯云视频通话功能的主要接口类
55
*
6-
* Version: 6.1.6454
6+
* Version: 6.2.7005
77
*/
88

99
#import <Foundation/Foundation.h>
@@ -13,6 +13,20 @@
1313

1414
@interface TRTCCloud : NSObject
1515

16+
// 请使用 +sharedIntance 方法
17+
+ (instancetype)new __attribute__((unavailable("Use +sharedInstance instead")));
18+
- (instancetype)init __attribute__((unavailable("Use +sharedInstance instead")));
19+
20+
/// @name 创建与销毁
21+
/// @{
22+
23+
/// 创建TRTCCloud单例
24+
+ (instancetype)sharedInstance;
25+
26+
/// 销毁TRTCCloud单例
27+
+ (void)destroySharedIntance;
28+
29+
/// @}
1630

1731
/// 设置回调接口 TRTCCloudDelegate,用户获得来自 TRTCCloud 的各种状态通知
1832
@property (nonatomic, weak) id<TRTCCloudDelegate> delegate;
@@ -43,6 +57,21 @@
4357
* 1.2 离开房间
4458
*/
4559
- (void)exitRoom;
60+
61+
/**
62+
* 1.3 请求跨房连麦
63+
* @param param json字符串连麦参数,包含以下字段:
64+
* roomId: int //连麦房间号
65+
* userId: String //被连麦帐号
66+
* sign: String //跨房连麦签名,加密内容为TC_ConnRoomSig,由第三方后台加密生成,是否使用由spear配置决定
67+
**/
68+
- (void)connectOtherRoom:(NSString *)param;
69+
70+
/**
71+
* 取消跨房连麦
72+
**/
73+
- (void)disconnectOtherRoom;
74+
4675
/// @}
4776

4877
/////////////////////////////////////////////////////////////////////////////////
@@ -78,6 +107,7 @@
78107
* 2.3 启动渲染远端视频画面
79108
* @param userId 对方的用户标识
80109
* @param view 指定渲染控件所在的父控件,SDK会在 view 内部创建一个等大的子控件用来渲染远端画面
110+
* @note 在 onUserVideoAvailable 回调时,调用这个接口
81111
*/
82112
- (void)startRemoteView:(NSString *)userId view:(TXView *)view;
83113

@@ -440,7 +470,13 @@
440470
- (void)setFilter:(TXImage *)image;
441471

442472
/**
443-
* 6.3 添加水印
473+
* 6.3 设置滤镜浓度
474+
* @param concentration 从0到1,越大滤镜效果越明显,默认值为0.5
475+
*/
476+
- (void)setFilterConcentration:(float)concentration;
477+
478+
/**
479+
* 6.4 添加水印
444480
* @param image 水印图片
445481
* @param streamType (TRTCVideoStreamTypeBig、TRTCVideoStreamTypeSub)
446482
* @param rect 水印相对于编码分辨率的归一化坐标,x,y,width,height 取值范围 0~1;height不用设置,sdk内部会根据水印宽高比自动计算height
@@ -462,6 +498,7 @@
462498
*
463499
* @param userId 对方的用户标识
464500
* @param view 渲染控件所在的父控件
501+
* @note 在 onUserSubStreamAvailable 回调时,调用这个接口
465502
*/
466503
- (void)startRemoteSubStreamView:(NSString *)userId view:(TXView *)view;
467504

@@ -550,11 +587,11 @@
550587

551588
/////////////////////////////////////////////////////////////////////////////////
552589
//
553-
// (八)音视频自定义接口
590+
// (八)自定义采集和渲染
554591
//
555592
/////////////////////////////////////////////////////////////////////////////////
556-
#pragma mark - 音视频自定义接口
557-
/// @name 音视频自定义接口
593+
#pragma mark - 自定义采集和渲染
594+
/// @name 自定义采集和渲染
558595
/// @{
559596

560597
/**
@@ -593,6 +630,14 @@
593630
*/
594631
- (int)setRemoteVideoRenderDelegate:(NSString*)userId delegate:(id<TRTCVideoRenderDelegate>)delegate pixelFormat:(TRTCVideoPixelFormat)pixelFormat bufferType:(TRTCVideoBufferType)bufferType;
595632

633+
/**
634+
* 8.6 调用实验性API接口
635+
*
636+
* @note 该接口用于调用一些实验性功能
637+
* @param jsonStr 接口及参数描述的json字符串
638+
*/
639+
- (void)callExperimentalAPI:(NSString*)jsonStr;
640+
596641
/// @}
597642

598643

@@ -624,6 +669,22 @@
624669
*/
625670
- (BOOL)sendCustomCmdMsg:(NSInteger)cmdID data:(NSData *)data reliable:(BOOL)reliable ordered:(BOOL)ordered;
626671

672+
/**
673+
* 9.2 发送自定义消息给房间内所有用户
674+
*
675+
* @param data 待发送的数据,最大支持 1kb(1000字节)的数据大小
676+
* @param repeatCount 发送数据次数
677+
* @return YES:消息已通过限制,等待后续视频帧发送 NO:消息被限制发送
678+
*
679+
* @note 限制1:数据在接口调用完后不会被即时发送出去,而是从下一帧视频帧开始带在视频帧中发送
680+
* 限制2:发送消息到房间内所有用户,每秒最多能发送 30 条消息 (**与sendCustomCmdMsg共享限制**)
681+
* 限制2:每个包最大为1KB,若发送大量数据,会导致视频码率增大,可能导致视频画质下降甚至卡顿 (**与sendCustomCmdMsg共享限制**)
682+
* 限制4:每个客户端每秒最多能发送总计 8 KB 数据 (**与sendCustomCmdMsg共享限制**)
683+
* 限制5:若指定多次发送(repeatCount>1),则数据会被带在后续的连续repeatCount个视频帧中发送出去,同样会导致视频码率增大
684+
* 限制6: 如果repeatCount>1,多次发送,接收消息onRecvSEIMsg回调也可能会收到多次相同的消息,需要去重
685+
*/
686+
- (BOOL)sendSEIMsg:(NSData *)data repeatCount:(int)repeatCount;
687+
627688
/// @}
628689

629690
/////////////////////////////////////////////////////////////////////////////////

Mac/SDK/TXLiteAVSDK_TRTC_Mac.framework/Versions/A/Headers/TRTCCloudDelegate.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@ NS_ASSUME_NONNULL_BEGIN
6666
*/
6767
- (void)onExitRoom:(NSInteger)reason;
6868

69+
70+
/**
71+
* 2.3 跨房连麦成功回调
72+
*/
73+
- (void)onConnectOtherRoom:(NSString*)userId errCode:(TXLiteAVError)errCode errMsg:(nullable NSString *)errMsg;
74+
75+
76+
/**
77+
* 2.4 断开跨房连麦回调
78+
*/
79+
- (void)onDisconnectOtherRoom:(TXLiteAVError)errCode errMsg:(nullable NSString *)errMsg;
6980
/// @}
7081

7182
/////////////////////////////////////////////////////////////////////////////////
@@ -282,6 +293,14 @@ NS_ASSUME_NONNULL_BEGIN
282293
* @param missed 丢失的消息数量
283294
*/
284295
- (void)onMissCustomCmdMsgUserId:(NSString *)userId cmdID:(NSInteger)cmdID errCode:(NSInteger)errCode missed:(NSInteger)missed;
296+
297+
/**
298+
* 当房间中的某个用户使用sendSEIMsg发送数据时,房间中的其它用户可以通过onRecvSEIMsg接口接收数据
299+
* @param userId 用户标识
300+
* @param message 数据
301+
*/
302+
- (void)onRecvSEIMsg:(NSString *)userId message:(NSData*)message;
303+
285304
/// @}
286305

287306
/////////////////////////////////////////////////////////////////////////////////
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// TXAudioCustomProcessDelegate.h
3+
// TXLiteAVSDK
4+
//
5+
// Created by realingzhou on 2018/1/15.
6+
// Copyright © 2018年 Tencent. All rights reserved.
7+
//
8+
9+
#ifndef TXAudioCustomProcessDelegate_h
10+
#define TXAudioCustomProcessDelegate_h
11+
#import <Foundation/Foundation.h>
12+
13+
@protocol TXAudioCustomProcessDelegate <NSObject>
14+
15+
/**
16+
* 原始声音的回调
17+
* @param data pcm数据
18+
* @param timeStamp 时间戳
19+
* @param sampleRate 采样率
20+
* @param channels 声道数
21+
* @param withBgm 回调的数据是否包含bgm,当不开启回声消除时,回调的raw pcm会包含bgm
22+
*/
23+
@optional
24+
- (void)onRecordRawPcmData:(NSData *)data timeStamp:(unsigned long long)timeStamp sampleRate:(int)sampleRate channels:(int)channels withBgm:(BOOL)withBgm;
25+
26+
/**
27+
* 经过特效处理的声音回调
28+
* @param data pcm数据
29+
* @param timeStamp 时间戳
30+
* @param sampleRate 采样率
31+
* @param channels 声道数
32+
*/
33+
@optional
34+
- (void)onRecordPcmData:(NSData *)data timeStamp:(unsigned long long)timeStamp sampleRate:(int)sampleRate channels:(int)channels;
35+
36+
@end
37+
38+
#endif /* TXAudioCustomProcessDelegate_h */
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// TXAudioRawDataDelegate.h
3+
// TXLiteAVSDK
4+
//
5+
// Created by realingzhou on 2018/2/24.
6+
// Copyright © 2018年 Tencent. All rights reserved.
7+
//
8+
9+
#ifndef TXAudioRawDataDelegate_h
10+
#define TXAudioRawDataDelegate_h
11+
12+
@protocol TXAudioRawDataDelegate <NSObject>
13+
14+
/**
15+
* 音频播放信息回调
16+
*
17+
* @param sampleRate 采样率
18+
* @param channels 声道数
19+
*/
20+
@optional
21+
- (void)onAudioInfoChanged:(int)sampleRate channels:(int)channels;
22+
23+
/**
24+
* 音频播放数据回调,数据格式 :PCM
25+
*
26+
* <!!!注意!!!> 该函数内不要做耗时操作<!!!注意!!!>
27+
* 音频播放器会在播放数据的前一刻,调用此函数,同步回调将要播放的数据。因此在函数内部做耗时操作可能会影响播放
28+
*
29+
*
30+
* @param data pcm数据
31+
* @param timestamp 时间戳。注 :会有连续相同的时间戳回调出来,超过2048字节,时间戳才会变化。
32+
*/
33+
@optional
34+
- (void)onPcmDataAvailable:(NSData *)data pts:(unsigned long long)timestamp;
35+
36+
@end
37+
38+
#endif /* TXAudioRawDataDelegate_h */

Mac/SDK/TXLiteAVSDK_TRTC_Mac.framework/Versions/A/Headers/TXLiteAVCode.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ typedef enum TXLiteAVError
7474
ERR_PUBLISH_CDN_STREAM_RESPON_ERROR = -3323, ///< 旁路转推回包异常
7575
ERR_CLOUD_MIX_TRANSCODING_RESPON_ERROR = -3324, ///< 云端混流回包异常
7676
ERR_ROOM_REQUEST_QUIT_ROOM_TIMEOUT = -3325, ///< 请求退房超时
77-
77+
ERR_ROOM_REQUEST_CONN_ROOM_TIMEOUT = -3326, ///< 请求连麦超时
78+
ERR_ROOM_REQUEST_DISCONN_ROOM_TIMEOUT = -3327, ///< 请求退出连麦超时
79+
ERR_ROOM_REQUEST_CONN_ROOM_INVALID_PARAM = -3328, ///< 无效参数
7880
// Info服务器(查询接口机IP), 服务器错误码,数值范围[-100000, -110000],但命名、含义在确认中
7981

8082
ERR_SERVER_INFO_UNPACKING_ERROR = -100000, ///< 请求解包错误

Mac/SDK/TXLiteAVSDK_TRTC_Mac.framework/Versions/A/Headers/TXLiteAVSDK.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,16 @@
1212
#import <TXLiteAVSDK_TRTC_Mac/TRTCCloudDef.h>
1313
#import <TXLiteAVSDK_TRTC_Mac/TRTCCloudDelegate.h>
1414
#import <TXLiteAVSDK_TRTC_Mac/TRTCStatistics.h>
15+
#import <TXLiteAVSDK_TRTC_Mac/TXAudioCustomProcessDelegate.h>
16+
#import <TXLiteAVSDK_TRTC_Mac/TXAudioRawDataDelegate.h>
1517
#import <TXLiteAVSDK_TRTC_Mac/TXLiteAVCode.h>
18+
#import <TXLiteAVSDK_TRTC_Mac/TXLiveAudioSessionDelegate.h>
19+
#import <TXLiteAVSDK_TRTC_Mac/TXLiveBase.h>
20+
#import <TXLiteAVSDK_TRTC_Mac/TXLivePlayConfig.h>
21+
#import <TXLiteAVSDK_TRTC_Mac/TXLivePlayListener.h>
22+
#import <TXLiteAVSDK_TRTC_Mac/TXLivePlayer.h>
23+
#import <TXLiteAVSDK_TRTC_Mac/TXLiveRecordListener.h>
24+
#import <TXLiteAVSDK_TRTC_Mac/TXLiveRecordTypeDef.h>
25+
#import <TXLiteAVSDK_TRTC_Mac/TXLiveSDKEventDef.h>
26+
#import <TXLiteAVSDK_TRTC_Mac/TXLiveSDKTypeDef.h>
27+
#import <TXLiteAVSDK_TRTC_Mac/TXVideoCustomProcessDelegate.h>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#ifndef TXLiveAudioSessionDelegate_h
2+
#define TXLiveAudioSessionDelegate_h
3+
4+
#import <AVFoundation/AVFoundation.h>
5+
6+
@protocol TXLiveAudioSessionDelegate <NSObject>
7+
#if TARGET_OS_IPHONE
8+
9+
@optional
10+
- (BOOL)setActive:(BOOL)active error:(NSError **)outError;
11+
12+
@optional
13+
- (BOOL)setMode:(NSString *)mode error:(NSError **)outError;
14+
15+
@optional
16+
- (BOOL)setCategory:(NSString *)category error:(NSError **)outError;
17+
18+
@optional
19+
- (BOOL)setCategory:(NSString *)category withOptions:(AVAudioSessionCategoryOptions)options error:(NSError **)outError;
20+
21+
@optional
22+
- (BOOL)setCategory:(NSString *)category mode:(NSString *)mode options:(AVAudioSessionCategoryOptions)options error:(NSError **)outError;
23+
@optional
24+
- (BOOL)setPreferredIOBufferDuration:(NSTimeInterval)duration error:(NSError **)outError;
25+
26+
@optional
27+
- (BOOL)setPreferredSampleRate:(double)sampleRate error:(NSError **)outError;
28+
29+
@optional
30+
- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride error:(NSError **)outError;
31+
#endif
32+
@end
33+
#endif /* TXLiveAudioSessionDelegate_h */
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#import "TXLiveAudioSessionDelegate.h"
2+
3+
typedef NS_ENUM(NSInteger, TX_Enum_Type_LogLevel) {
4+
///输出所有级别的log
5+
LOGLEVEL_VERBOSE = 0,
6+
/// 输出 DEBUG,INFO,WARNING,ERROR 和 FATAL 级别的log
7+
LOGLEVEL_DEBUG = 1,
8+
/// 输出 INFO,WARNNING,ERROR 和 FATAL 级别的log
9+
LOGLEVEL_INFO = 2,
10+
/// 只输出WARNNING,ERROR 和 FATAL 级别的log
11+
LOGLEVEL_WARN = 3,
12+
/// 只输出ERROR 和 FATAL 级别的log
13+
LOGLEVEL_ERROR = 4,
14+
/// 只输出 FATAL 级别的log
15+
LOGLEVEL_FATAL = 5,
16+
/// 不输出任何sdk log
17+
LOGLEVEL_NULL = 6,
18+
};
19+
20+
@protocol TXLiveBaseDelegate <NSObject>
21+
@optional
22+
23+
/**
24+
@brief Log回调 
25+
@discussion
26+
1.实现TXLiveBaseDelegate,建议在一个比较早的初始化类中如AppDelegate
27+
2.在初始化中设置此回调,eg:[TXLiveBase sharedInstance].delegate = self;
28+
3.level类型参见TX_Enum_Type_LogLevel
29+
4.module值暂无具体意义,目前为固定值TXLiteAVSDK
30+
*/
31+
-(void) onLog:(NSString*)log LogLevel:(int)level WhichModule:(NSString*)module;
32+
33+
@end
34+
35+
@interface TXLiveBase : NSObject
36+
37+
/// 通过这个delegate将全部log回调给SDK使用者,由SDK使用者来决定log如何处理
38+
@property (nonatomic, weak) id<TXLiveBaseDelegate> delegate;
39+
40+
+ (instancetype) sharedInstance;
41+
42+
/** 设置log输出级别
43+
* @param level 参见 LOGLEVEL
44+
*
45+
*/
46+
+ (void) setLogLevel:(TX_Enum_Type_LogLevel)level;
47+
48+
/**
49+
* 启用或禁用控制台日志打印
50+
* @param enabled 指定是否启用
51+
*/
52+
+ (void) setConsoleEnabled:(BOOL)enabled;
53+
54+
+ (void) setAppVersion:(NSString *)verNum;
55+
56+
+ (void)setAudioSessionDelegate:(id<TXLiveAudioSessionDelegate>)delegate;
57+
58+
/// 获取SDK版本信息
59+
+ (NSString *)getSDKVersionStr;
60+
61+
///  获取pitu版本信息
62+
+ (NSString *)getPituSDKVersion;
63+
64+
/// 设置appID,云控使用
65+
+ (void)setAppID:(NSString*)appID;
66+
67+
/// 设置sdk的licence下载url和key
68+
+ (void)setLicenceURL:(NSString *)url key:(NSString *)key;
69+
@end

0 commit comments

Comments
 (0)