Steven před 5 roky
rodič
revize
07d4443fcc
15 změnil soubory, kde provedl 367 přidání a 73 odebrání
  1. 4 4
      MusicGradeExam/MusicGradeExam.xcodeproj/project.pbxproj
  2. 1 0
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCAudioMixer.h
  3. 2 2
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCCameraOutputStream.h
  4. 38 26
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCCodeDefine.h
  5. 90 0
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCCryptoDelegate.h
  6. 71 0
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCEffectManager.h
  7. 34 0
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCEffectProtocol.h
  8. 90 20
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCEngine.h
  9. 0 1
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCInputStream.h
  10. 33 3
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCLibDefine.h
  11. 1 1
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCMicOutputStream.h
  12. 0 15
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCUser.h
  13. 3 1
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RongRTCLib.h
  14. binární
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Info.plist
  15. binární
      MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/RongRTCLib

+ 4 - 4
MusicGradeExam/MusicGradeExam.xcodeproj/project.pbxproj

@@ -40,7 +40,6 @@
 		273EFB6624DD36420069DB4D /* Emoji.plist in Resources */ = {isa = PBXBuildFile; fileRef = 273EFB5924DD36410069DB4D /* Emoji.plist */; };
 		273EFB6724DD36420069DB4D /* RongCloud.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 273EFB5A24DD36410069DB4D /* RongCloud.bundle */; };
 		273EFB6824DD36420069DB4D /* RongSight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 273EFB5C24DD36410069DB4D /* RongSight.framework */; };
-		273EFB6924DD36420069DB4D /* RongRTCLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 273EFB5D24DD36420069DB4D /* RongRTCLib.framework */; };
 		273EFB7024E672850069DB4D /* TicketRefreshModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 273EFB6F24E672830069DB4D /* TicketRefreshModel.m */; };
 		27476F4824BBFB5900181362 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27476F4724BBFB5900181362 /* AppDelegate.m */; };
 		27476F4E24BBFB5900181362 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27476F4D24BBFB5900181362 /* ViewController.m */; };
@@ -354,6 +353,7 @@
 		27DBF9D324D8F67B00202145 /* KSStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27DBF9D224D8F67B00202145 /* KSStatusView.m */; };
 		27DBF9D624DAAE6200202145 /* WaitExamBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 27DBF9D524DAAE6100202145 /* WaitExamBottomView.m */; };
 		27DBF9D824DAAE7500202145 /* WaitExamBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27DBF9D724DAAE7500202145 /* WaitExamBottomView.xib */; };
+		27E32B0224F4DF0D0007CA8F /* RongRTCLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27E32B0124F4DF0D0007CA8F /* RongRTCLib.framework */; };
 		27EF3EEE24BEE35E002068A2 /* MessageListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EF3EED24BEE35E002068A2 /* MessageListModel.m */; };
 		27EF3EF224BEE885002068A2 /* NotifyMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EF3EF024BEE885002068A2 /* NotifyMessageCell.m */; };
 		27EF3EF324BEE885002068A2 /* NotifyMessageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 27EF3EF124BEE885002068A2 /* NotifyMessageCell.xib */; };
@@ -448,7 +448,6 @@
 		273EFB5924DD36410069DB4D /* Emoji.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Emoji.plist; sourceTree = "<group>"; };
 		273EFB5A24DD36410069DB4D /* RongCloud.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = RongCloud.bundle; sourceTree = "<group>"; };
 		273EFB5C24DD36410069DB4D /* RongSight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RongSight.framework; sourceTree = "<group>"; };
-		273EFB5D24DD36420069DB4D /* RongRTCLib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RongRTCLib.framework; sourceTree = "<group>"; };
 		273EFB6E24E672830069DB4D /* TicketRefreshModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TicketRefreshModel.h; sourceTree = "<group>"; };
 		273EFB6F24E672830069DB4D /* TicketRefreshModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TicketRefreshModel.m; sourceTree = "<group>"; };
 		27476F4324BBFB5900181362 /* 酷乐秀.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "酷乐秀.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1040,6 +1039,7 @@
 		27DBF9D524DAAE6100202145 /* WaitExamBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WaitExamBottomView.m; sourceTree = "<group>"; };
 		27DBF9D724DAAE7500202145 /* WaitExamBottomView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = WaitExamBottomView.xib; sourceTree = "<group>"; };
 		27E32B0024ECD9910007CA8F /* 酷乐秀.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "酷乐秀.entitlements"; sourceTree = "<group>"; };
+		27E32B0124F4DF0D0007CA8F /* RongRTCLib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = RongRTCLib.framework; sourceTree = "<group>"; };
 		27EF3EEC24BEE35E002068A2 /* MessageListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageListModel.h; sourceTree = "<group>"; };
 		27EF3EED24BEE35E002068A2 /* MessageListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageListModel.m; sourceTree = "<group>"; };
 		27EF3EEF24BEE885002068A2 /* NotifyMessageCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotifyMessageCell.h; sourceTree = "<group>"; };
@@ -1098,7 +1098,7 @@
 				274772AF24BC0DDF00181362 /* libiconv.tbd in Frameworks */,
 				274772AD24BC0DD000181362 /* libbz2.tbd in Frameworks */,
 				274772AB24BC0DC900181362 /* libz.tbd in Frameworks */,
-				273EFB6924DD36420069DB4D /* RongRTCLib.framework in Frameworks */,
+				27E32B0224F4DF0D0007CA8F /* RongRTCLib.framework in Frameworks */,
 				274772A924BC0DC100181362 /* libc++.tbd in Frameworks */,
 				274772A724BC0DB500181362 /* VideoToolbox.framework in Frameworks */,
 				274772A524BC0DAE00181362 /* AudioToolbox.framework in Frameworks */,
@@ -2386,7 +2386,7 @@
 		2747726624BC0C7C00181362 /* RongCloud */ = {
 			isa = PBXGroup;
 			children = (
-				273EFB5D24DD36420069DB4D /* RongRTCLib.framework */,
+				27E32B0124F4DF0D0007CA8F /* RongRTCLib.framework */,
 				273EFB5324DD36410069DB4D /* IMKit */,
 				273EFB4D24DD36410069DB4D /* IMLib */,
 				273EFB5B24DD36410069DB4D /* Sight */,

+ 1 - 0
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCAudioMixer.h

@@ -9,6 +9,7 @@
 #import <Foundation/Foundation.h>
 #import <CoreAudio/CoreAudioTypes.h>
 #import "RCRTCGlobals.h"
+#import "RCRTCEffectProtocol.h"
 
 /*!
  无限期循环

+ 2 - 2
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCCameraOutputStream.h

@@ -42,14 +42,14 @@ NS_ASSUME_NONNULL_BEGIN
  
  注:如果用户传正常数据,则内部会自行 CFRelease CMSampleBufferRef 对象,上层不需要再考虑释放问题
  */
-@property (nonatomic, copy, nullable) RCRTCVideoCMSampleBufferCallback videoSendBufferCallback;
+@property (atomic, copy, nullable) RCRTCVideoCMSampleBufferCallback videoSendBufferCallback;
 
 /*!
  本地摄像头采集的视频在即将预览前会往上层抛一个视频帧回调,用户可以处理视频帧数据之后然后回传给 RTC,RTC 使用用户处理的视频帧进行预览
  
  注:如果用户传正常数据,则内部会自行 CFRelease CMSampleBufferRef 对象,上层不需要再考虑释放问题
  */
-@property (nonatomic, copy, nullable) RCRTCVideoCMSampleBufferCallback videoDisplayBufferCallback;
+@property (atomic, copy, nullable) RCRTCVideoCMSampleBufferCallback videoDisplayBufferCallback;
 
 /*!
  初始化

+ 38 - 26
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCCodeDefine.h

@@ -6,8 +6,7 @@
 //  Copyright © 2019 RongCloud. All rights reserved.
 //
 
-#ifndef RongRTCError_h
-#define RongRTCError_h
+#import <Foundation/Foundation.h>
 
 /*!
  音视频错误码定义
@@ -15,60 +14,59 @@
  服务器返回错误以 4 开头,后两位是业务代码,最后两位是错误码 4XXXX,如 400XX 基础连接部分
  本地返回错误以 5 开头,后两位是业务代码,最后两位是错误码 5XXXX,如 500XX 初始化基础连接部分
  */
-typedef NS_ENUM (NSInteger, RCRTCCode)
-{
+typedef NS_ENUM (NSInteger, RCRTCCode) {
     /*!
      成功
      */
-    RCRTCCodeSuccess = 0,
+    RCRTCCodeSuccess                          = 0,
     /*!
      初始化失败, 信令服务(IM Server)未连接
      */
-    RCRTCCodeSignalServerNotConnect = 50000,
+    RCRTCCodeSignalServerNotConnect           = 50000,
     /*!
      参数错误
      */
-    RCRTCCodeParameterError = 50001,
+    RCRTCCodeParameterError                   = 50001,
     /*!
      加入相同房间错误,表示用户在客户端重复加入相同的房间
      */
-    RCRTCCodeJoinToSameRoom = 50002,
+    RCRTCCodeJoinToSameRoom                   = 50002,
     /*!
      不在房间中
      */
-    RCRTCCodeNotInRTCRoom = 50003,
+    RCRTCCodeNotInRTCRoom                     = 50003,
     /*!
      请检查是否开通音视频服务
      */
-    RCRTCCodeEngineError = 50004,
+    RCRTCCodeEngineError                      = 50004,
     /*!
      RTC token为空,请查看是否还在房间内或者房间是否销毁
      */
-    RCRTCCodeRTCTokenIsNull = 50006,
+    RCRTCCodeRTCTokenIsNull                   = 50006,
     /*!
      HTTP 请求超时
      */
-    RCRTCCodeHttpTimeoutError = 50010,
+    RCRTCCodeHttpTimeoutError                 = 50010,
     /*!
      HTTP 响应错误(含 500,404,405 等错误)
      */
-    RCRTCCodeHttpResponseError = 50011,
+    RCRTCCodeHttpResponseError                = 50011,
     /*!
      HTTP 请求错误(含网络不可达,请求未能为能正常发出)
      */
-    RCRTCCodeHttpRequestError = 50012,
+    RCRTCCodeHttpRequestError                 = 50012,
     /*!
      发布重复资源
      */
-    RCRTCCodePublishDuplicateResources = 50020,
+    RCRTCCodePublishDuplicateResources        = 50020,
     /*!
      初步会话协商错误,没有消息的音视频参数
      */
-    RCRTCCodeSessionDegotiateOfferError = 50021,
+    RCRTCCodeSessionDegotiateOfferError       = 50021,
     /*!
      会话协商错误,协商数据不匹配或者其他问题
      */
-    RCRTCCodeSessionDegotiateSetRemoteError = 50022,
+    RCRTCCodeSessionDegotiateSetRemoteError   = 50022,
     /*!
      发布的流的个数已经到达上限
      */
@@ -76,35 +74,49 @@ typedef NS_ENUM (NSInteger, RCRTCCode)
     /*!
      取消发布不存在的资源
      */
-    RCRTCCodeUnpublishUnexistStream = 50024,
+    RCRTCCodeUnpublishUnexistStream           = 50024,
     /*!
      订阅不存在的音视频资源
      */
-    RCRTCCodeSubscribeNotExistResources = 50030,
+    RCRTCCodeSubscribeNotExistResources       = 50030,
     /*!
      资源重复订阅
      */
-    RCRTCCodeSubscribeDuplicateResources = 50031,
+    RCRTCCodeSubscribeDuplicateResources      = 50031,
     /*!
      取消订阅不存在的音视频资源
      */
-    RCRTCCodeUnsubscribeNotExistResouce = 50032,
+    RCRTCCodeUnsubscribeNotExistResouce       = 50032,
     /*!
      SDK 内部业务逻辑错误码
      */
-    RCRTCCodeSDKInternalError = 50071,
+    RCRTCCodeSDKInternalError                 = 50071,
     /*!
      cdn 地址配置数量到达上限(最大为10个)
      */
-    RCRTCCodeCDNCountReachToLimit = 50080,
+    RCRTCCodeCDNCountReachToLimit             = 50080,
     /*!
      帧时间戳非法
      */
-    RCRTCCodeIllegalFrameTimestamp = 50081,
+    RCRTCCodeIllegalFrameTimestamp            = 50081,
     /*!
      解码视频帧失败
      */
-    RCRTCCodeDecodeVideoFrameError = 50082,
+    RCRTCCodeDecodeVideoFrameError            = 50082,
+    /*
+     音效文件数量已经到达最大数量
+     */
+    RCRTCCodeEffectFileCountHasBeenReached    = 50090,
+    /*
+     处理非法的 soundId,如停止播放没有播放过的音效文件 id,
+     此音效 ID 没有预设或者播放过。
+     */
+    RCRTCCodeHandlingIllegalEffectSoundId     = 50091,
 };
 
-#endif /* RongRTCError_h */
+
+@interface RCRTCCodeDefine : NSObject
+
++ (NSString *)codeDesc:(RCRTCCode)code;
+
+@end

+ 90 - 0
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCCryptoDelegate.h

@@ -0,0 +1,90 @@
+//
+//  RCRTCCryptoDelegate.h
+//  RongRTCLib
+//
+//  Created by RongCloud on 2020/7/28.
+//  Copyright © 2020 RongCloud. All rights reserved.
+//
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+自定义加密代理
+*/
+@protocol RCRTCCustomizedEncryptorDelegate <NSObject>
+
+/*!
+加密回调
+
+@param payloadData 需要加密的数据起始地址
+@param payloadSize 需要加密的数据的大小
+@param encryptedFrame 加密后数据起始地址
+@param bytesWritten 加密后数据的大小
+ 
+@discussion
+如果使用自定义加密需要实现该方法进行加密操作。
+
+@remarks 加解密配置
+
+*/
+- (int)EncryptPayloadData:(const uint8_t *)payloadData
+              payloadSize:(size_t)payloadSize
+           encryptedFrame:(uint8_t *)encryptedFrame
+             bytesWritten:(size_t *)bytesWritten;
+
+/*!
+加密后数据大小
+
+@param frameSize 加密前数据的大小
+ 
+@discussion
+如果使用自定义加密需要根据自己的加密算法返回加密后数据的大小,SDK 会根据返回加密后数据的大小进行内存申请
+
+@remarks 加解密配置
+
+*/
+- (size_t)GetMaxCiphertextByteSize:(size_t)frameSize;
+
+@end
+
+/*!
+自定义解密代理
+*/
+@protocol RCRTCCustomizedDecryptorDelegate <NSObject>
+
+/*!
+解密回调
+
+@param encryptedFrame 需要解密的数据起始地址
+@param encryptedFrameSize 需要解密的数据的大小
+@param frame 解密后数据起始地址
+@param bytesWritten 解密后数据的大小
+ 
+@discussion
+如果使用自定义解密需要实现该方法进行解密操作。
+
+@remarks 加解密配置
+
+*/
+- (int)DecryptFrame:(const uint8_t *)encryptedFrame
+          frameSize:(size_t)encryptedFrameSize
+              frame:(nonnull uint8_t *)frame
+       bytesWritten:(nonnull size_t *)bytesWritten;
+
+/*!
+解密后数据大小
+
+@param frameSize 解密前数据的大小
+ 
+@discussion
+如果使用自定义解密需要根据自己的解密算法返回解密后数据的大小,SDK 会根据返回解密后数据的大小进行内存申请
+
+@remarks 加解密配置
+
+*/
+- (size_t)GetMaxPlaintextByteSize:(size_t)frameSize;
+
+@end
+
+NS_ASSUME_NONNULL_END
+

+ 71 - 0
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCEffectManager.h

@@ -0,0 +1,71 @@
+//
+//  RCRTCEffectManager.h
+//  RongRTCLib
+//
+//  Created by 孙承秀 on 2020/8/18.
+//  Copyright © 2020 RongCloud. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#import "RCRTCCodeDefine.h"
+NS_ASSUME_NONNULL_BEGIN
+@interface RCRTCEffectManager : NSObject
+
+/// 播放指定音效文件,filePath 必须可用,需要指定唯一的 ID,如果调用`preloadEffect`接口设置过 ID,此 ID 要与其相同
+/// 如果前后传入相同的 ID,但是 filePath 不同,会覆盖,播放最新的 filePath 音效
+/// @param soundId 音效的唯一 ID
+/// @param filePath 音效的路径
+/// @param loopCount 音效的循环次数
+/// @param publish 是否将音效推送到远端,设置为 YES,其他端可听到此音效声音,如果设置为 NO,只有本端可以听到
+- (RCRTCCode)playEffect:(NSInteger)soundId filePath:(NSString *_Nullable)filePath loopCount:(int)loopCount publish:(BOOL)publish;
+
+/// 停止指定的音效
+/// @param soundId 音效唯一 ID
+- (RCRTCCode)stopEffect:(NSInteger)soundId;
+
+/// 停止所有的音效
+- (RCRTCCode)stopAllEffects;
+
+/// 暂停指定的音效文件
+/// @param soundId 指定的音效 ID
+- (RCRTCCode)pauseEffect:(NSInteger)soundId;
+
+/// 暂停所有的音效
+- (RCRTCCode)pauseAllEffects;
+
+/// 恢复播放指定的音效
+/// @param soundId 指定的音效 ID
+- (RCRTCCode)resumeEffect:(NSInteger)soundId;
+
+/// 恢复播放所有的音效
+- (RCRTCCode)resumeAllEffects;
+
+/// 预加载指定的音效文件,filePath 必须可用
+/// @param soundId 指定的音效 ID
+/// @param filePath 音效路径
+- (RCRTCCode)preloadEffect:(NSInteger)soundId filePath:(NSString *_Nullable)filePath;
+
+/// 取消加载的音效文件
+/// @param soundId 指定的音效 ID
+- (RCRTCCode)unloadEffect:(NSInteger)soundId;
+
+/// 设置全局的音效的音量
+/// @param volume 音量 [0,100],默认为 100.
+- (RCRTCCode)setEffectsVolume:(NSUInteger)volume;
+
+/// 设置指定音效的音效音量
+/// @param soundId 指定的音效 ID
+/// @param volume 音量 [0,100],默认为 100
+- (RCRTCCode)setVolumeOfEffect:(NSInteger)soundId withVolume:(NSUInteger)volume;
+
+/// 获取指定音效的音量
+- (NSUInteger)getVolumeOfEffectId:(NSInteger)soundId;
+
+/// 获取全局音效的音量
+- (NSUInteger)getEffectsVolume;
+
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 34 - 0
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCEffectProtocol.h

@@ -0,0 +1,34 @@
+//
+//  RCRTCEffectProtocol.h
+//  RongRTCLib
+//
+//  Created by 孙承秀 on 2020/8/16.
+//  Copyright © 2020 RongCloud. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "RCRTCCodeDefine.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol RCRTCEffectProtocol <NSObject>
+
+- (RCRTCCode)playEffect:(NSInteger)soundId filePath:(NSString *_Nullable)filePath loopCount:(int)loopCount publish:(BOOL)publish;
+- (RCRTCCode)stopEffect:(NSInteger)soundId;
+- (RCRTCCode)stopAllEffects;
+
+- (float)getEffectsVolume;
+
+/// 获取指定音效的音量
+- (float)getEffectsVolumeOfEffect:(NSInteger)soundId;
+- (RCRTCCode)setEffectsVolume:(float)volume;
+- (RCRTCCode)setVolumeOfEffect:(NSInteger)soundId withVolume:(float)volume;
+- (RCRTCCode)preloadEffect:(NSInteger)soundId filePath:(NSString *_Nullable)filePath;
+- (RCRTCCode)unloadEffect:(NSInteger)soundId;
+- (RCRTCCode)pauseEffect:(NSInteger)soundId;
+- (RCRTCCode)pauseAllEffects;
+- (RCRTCCode)resumeEffect:(NSInteger)soundId;
+- (RCRTCCode)resumeAllEffects;
+@end
+
+NS_ASSUME_NONNULL_END

+ 90 - 20
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCEngine.h

@@ -11,7 +11,8 @@
 #import "RCRTCLibDefine.h"
 #import "RCRTCRoomConfig.h"
 #import "RCRTCCodeDefine.h"
-
+#import "RCRTCCryptoDelegate.h"
+#import "RCRTCEffectManager.h"
 NS_ASSUME_NONNULL_BEGIN
 
 @class RCRTCRoom;
@@ -27,9 +28,9 @@ NS_ASSUME_NONNULL_BEGIN
 /*!
  音视频 SDK 对应版本
  
- RongRTCLib version: 4.0.1.1
- RongRTCLib commit: 41a03b2
- RongRTCLib time: 202008031520
+ RongRTCLib version: 4.0.2
+ RongRTCLib commit: 62f3906
+ RongRTCLib time: 202008191812
  */
 
 
@@ -43,6 +44,11 @@ NS_ASSUME_NONNULL_BEGIN
  */
 + (RCRTCEngine *)sharedInstance;
 
+/**
+ 音效管理器,通过调用 `RCRTCEffectManager.h` 中的 API 实现所有音效功能。
+ */
+@property (nonatomic , strong , readonly) RCRTCEffectManager *effectManager;
+
 /*!
  当前已加入的房间
  */
@@ -51,12 +57,12 @@ NS_ASSUME_NONNULL_BEGIN
 /*!
  默认音频流
  */
-@property (nonatomic, strong, readonly) RCRTCMicOutputStream *defaultAudioStream;
+@property (atomic, strong, readonly) RCRTCMicOutputStream *defaultAudioStream;
 
 /*!
  默认视频流
  */
-@property (nonatomic, strong, readonly) RCRTCCameraOutputStream *defaultVideoStream;
+@property (atomic, strong, readonly) RCRTCCameraOutputStream *defaultVideoStream;
 
 /*!
  sdk 状态监视器代理
@@ -100,6 +106,66 @@ NS_ASSUME_NONNULL_BEGIN
 - (BOOL)useSpeaker:(BOOL)useSpeaker;
 
 /*!
+切换音频输出流是否进行自定义加密
+
+@param audioEncryptorDelegate 加密代理,接口传入 RCRTCCustomizedEncryptorDelegate 的非空实现对象表示开启自定义加密;
+如果传入 nil 代表关闭自定义加密。
+ 
+@discussion
+该接口设置为全局设置,对所有发送音频进行加密,开启时机为加入房间前或者观众订阅流前,关闭时机为离开房间或者观众取消订阅流后,
+其它时机调用可能会不生效或者其它负面效果。
+
+@remarks 加解密配置
+
+*/
+- (void) setAudioCustomizedEncryptorDelegate:(id <RCRTCCustomizedEncryptorDelegate>) audioEncryptorDelegate;
+
+/*!
+切换音频输入流是否进行自定义解密
+
+@param audioDecryptorDelegate 加密代理,接口传入 RCRTCDecryptorDelegate 的非空实现对象表示开启自定义解密;
+如果传入 nil 代表关闭自定义解密。
+ 
+@discussion
+该接口设置为全局设置,对所有接收音频进行解密,开启时机为加入房间前或者观众订阅流前,关闭时机为离开房间或者观众取消订阅流后,
+其它时机调用可能会不生效或者其它负面效果。
+
+@remarks 加解密配置
+
+*/
+- (void) setAudioCustomizedDecryptorDelegate:(id <RCRTCCustomizedDecryptorDelegate>) audioDecryptorDelegate;
+
+/*!
+切换视频输出流是否进行自定义加密
+
+@param videoEncryptorDelegate 加密代理,接口传入 RCRTCCustomizedEncryptorDelegate 的非空实现对象表示开启自定义加密;
+如果传入 nil 代表关闭自定义加密。
+ 
+@discussion
+该接口设置为全局设置,对所有发送视频进行加密,开启时机为加入房间前或者观众订阅流前,关闭时机为离开房间或者观众取消订阅流后,
+其它时机调用可能会不生效或者其它负面效果。
+
+@remarks 加解密配置
+
+*/
+- (void) setVideoCustomizedEncryptorDelegate:(id <RCRTCCustomizedEncryptorDelegate>) videoEncryptorDelegate;
+
+/*!
+切换视频输入流是否进行自定义解密
+
+@param videoDecryptorDelegate 加密代理,接口传入 RCRTCDecryptorDelegate 的非空实现对象表示开启自定义解密;
+如果传入 nil 代表关闭自定义解密。
+ 
+@discussion
+该接口设置为全局设置,对所有接收视频进行解密,开启时机为加入房间前或者观众订阅流前,关闭时机为离开房间或者观众取消订阅流后,
+其它时机调用可能会不生效或者其它负面效果。
+
+@remarks 加解密配置
+
+*/
+- (void) setVideoCustomizedDecryptorDelegate:(id <RCRTCCustomizedDecryptorDelegate>) videoDecryptorDelegate;
+
+/*!
  加入房间
  
  @param roomId 房间 Id, 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式 最长 64 个字符
@@ -145,7 +211,7 @@ NS_ASSUME_NONNULL_BEGIN
  
  @param url 主播直播的 url
  @param liveType 当前直播类型
- @param completion  动作的回调, 会依次回调主播的 RCRTCLiveInputStream, 根据 streamType 区分是音频流还是视频流, 如主播发布了音视频流, 此回调会回调两次, 分别为音频的 RCRTCLiveInputStream,  和视频的 RCRTCLiveInputStream 。
+ @param completion  动作的回调, 会依次回调主播的 RCRTCInputStream, 根据 streamType 区分是音频流还是视频流, 如主播发布了音视频流, 此回调会回调两次, 分别为音频的 RCRTCInputStream,  和视频的 RCRTCInputStream 。
  @discussion
  仅直播模式可用,  作为观众, 直接观看主播的直播, 无需加入房间, 通过传入主播的 url, 仅观众端可用
  
@@ -153,32 +219,36 @@ NS_ASSUME_NONNULL_BEGIN
  */
 - (void)subscribeLiveStream:(NSString *)url
                    liveType:(RCRTCLiveType)liveType
+                 completion:(nullable RCRTCLiveCallback)completion DEPRECATED_MSG_ATTRIBUTE("已废弃, 请使用 subscribeLiveStream:streamType:completion: 替换, 当前方法会在后续版本中删除");
+
+/*!
+仅直播模式可用,  作为观众, 直接观看主播的直播, 无需加入房间, 通过传入主播的 url, 仅观众端可用,此接口可具体订阅音频流或视频流或大小流
+
+@param url 主播直播的 url
+@param streamType 需要具体订阅的媒体类型
+@param completion  动作的回调, 会依次回调主播的 RCRTCInputStream, 根据 streamType 区分是音频流还是视频流, 如主播发布了音视频流, 此回调会回调两次, 分别为音频的 RCRTCInputStream,  和视频的 RCRTCInputStream 。
+@discussion
+仅直播模式可用,  作为观众, 直接观看主播的直播, 无需加入房间, 通过传入主播的 url, 仅观众端可用
+
+@remarks 资源管理
+*/
+- (void)subscribeLiveStream:(NSString *)url
+                 streamType:(RCRTCAVStreamType)streamType
                  completion:(nullable RCRTCLiveCallback)completion;
 
 /*!
  仅直播模式可用, 作为观众, 退出观看主播的直播, 仅观众端使用
- @param url 主播直播的 url, 如果为空, 则为最后一次 `subscribeLiveStream` 接口传入的 url
+ @param url 主播直播的 url
  @param completion 动作的回调
  @discussion
  仅直播模式可用, 作为观众, 退出观看主播的直播, 仅观众端使用
  
  @remarks 资源管理
  */
-- (void)unsubscribeLiveStream:(nullable NSString *)url
+- (void)unsubscribeLiveStream:(NSString *)url
                    completion:(void (^)(BOOL isSuccess, RCRTCCode code))completion;
 
 /*!
- 获取当前客户端全局唯一的 ID
- 
- @discussion
- 获取当前客户端全局唯一的 ID
- 
- @remarks 资源管理
- @return 当前客户端全局唯一的 ID
- */
-- (NSString *)getClientId;
-
-/*!
  获取 RongRTCLib 版本号
  
  @discussion

+ 0 - 1
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCInputStream.h

@@ -16,7 +16,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @class RCRTCRemoteVideoView;
 @class RCRTCInputStream;
-@class RTCMediaStream;
 
 /*!
  接收到的音视频流

+ 33 - 3
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCLibDefine.h

@@ -114,7 +114,7 @@ typedef NS_ENUM(NSUInteger, RCRTCVideoSizePreset) {
     /*!
      分辨率 176X132
      */
-    RCRTCVideoSizePreset176x132,
+    RCRTCVideoSizePreset176x144,
     /*!
      分辨率 256X144
      */
@@ -285,6 +285,36 @@ typedef NS_ENUM(NSUInteger, RCRTCLiveType) {
      */
     RCRTCLiveTypeAudio = 1
 };
+/*!
+ 观众订阅直播类型直播类型
+ */
+typedef NS_ENUM(NSUInteger, RCRTCAVStreamType) {
+    /*!
+     仅订阅音频
+     */
+    RCRTCAVStreamTypeAudio = 0,
+    
+    /*!
+     仅订阅视频(大流)
+     */
+    RCRTCAVStreamTypeVideo = 1,
+    
+    /*!
+    订阅音频+视频(大流)
+    */
+    RCRTCAVStreamTypeAudioVideo = 2,
+    
+    /*!
+    仅订阅视频(小流)
+    */
+    RCRTCAVStreamTypeVideo_tiny = 3,
+    
+    /*!
+    订阅音频+视频(小流)
+    */
+    RCRTCAVStreamTypeAudioVideo_tiny = 4,
+    
+};
 
 /*!
  设置音频通话模式, 默认为普通通话模式 RCRTCAudioScenarioDefault
@@ -340,7 +370,7 @@ typedef CMSampleBufferRef _Nullable (^RCRTCVideoCMSampleBufferCallback)(BOOL val
  
  @remarks 音频流处理
  */
-typedef void(^RCRTCAudioPCMBufferCallback)(BOOL isOutput,const short * _Nullable audioSamples,const int length,const int channels,const int sampleRate);
+typedef void (^RCRTCAudioPCMBufferCallback)(BOOL isOutput, const short *_Nullable audioSamples, const int length, const int channels, const int sampleRate);
 
 /*!
  发送到音频输入输出的回调
@@ -354,6 +384,6 @@ typedef void(^RCRTCAudioPCMBufferCallback)(BOOL isOutput,const short * _Nullable
  
  @remarks 音频流处理
  */
-typedef void(^RCRTCAudioDataCallback)(UInt32 inNumberFrames, AudioBufferList * _Nonnull ioData, const AudioTimeStamp * _Nonnull inTimeStamp, const AudioStreamBasicDescription asbd);
+typedef void (^RCRTCAudioDataCallback)(UInt32 inNumberFrames, AudioBufferList *_Nonnull ioData, const AudioTimeStamp *_Nonnull inTimeStamp, const AudioStreamBasicDescription asbd);
 
 #endif /* RCRTCLibDefine_h */

+ 1 - 1
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCMicOutputStream.h

@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, assign) NSUInteger recordingVolume;
 
 /*!
-音频码率
+ 音频码率
 */
 @property (nonatomic, assign, readonly) NSInteger bitrateValue;
 

+ 0 - 15
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RCRTCUser.h

@@ -7,9 +7,6 @@
 //
 
 #import <Foundation/Foundation.h>
-#import <AVFoundation/AVFoundation.h>
-#import <CoreMedia/CoreMedia.h>
-#import <UIKit/UIKit.h>
 #import "RCRTCLibDefine.h"
 
 
@@ -40,18 +37,6 @@ NS_ASSUME_NONNULL_BEGIN
  */
 @property (nonatomic, copy, readonly) NSString *extra;
 
-/*!
- 根据流 Id 获取流
- 
- @param streamId 流 Id
- @discussion
- 根据流 Id 获取流
- 
- @remarks 资源管理
- @return 流对象
- */
-- (nullable RCRTCStream *)getStream:(nonnull NSString *)streamId;
-
 @end
 
 

+ 3 - 1
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Headers/RongRTCLib.h

@@ -51,4 +51,6 @@ FOUNDATION_EXPORT const unsigned char RongRTCLibVersionString[];
 #import <RongRTCLib/RCRTCVideoSourceInterface.h>
 #import <RongRTCLib/RCRTCVideoStreamConfig.h>
 #import <RongRTCLib/RCRTCVideoOutputStream.h>
-
+#import <RongRTCLib/RCRTCEffectProtocol.h>
+#import <RongRTCLib/RCRTCCryptoDelegate.h>
+#import <RongRTCLib/RCRTCEffectManager.h>

binární
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/Info.plist


binární
MusicGradeExam/MusicGradeExam/RongCloud/RongRTCLib.framework/RongRTCLib