Skip to content

Commit

Permalink
Merge branch 'master' into dev/3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CLuCheng authored Sep 7, 2020
2 parents 9438e67 + 34755e5 commit 4b402d9
Show file tree
Hide file tree
Showing 27 changed files with 92 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Group-Video/OpenVideoCall-Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
exclude group: 'com.google.android', module: 'android'
}

implementation 'io.agora.rtc:full-sdk:2.9.2'
implementation 'io.agora.rtc:full-sdk:3.1.0'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.3'
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import io.agora.openvcall.model.*;
import io.agora.propeller.Constant;
import io.agora.rtc.RtcEngine;
import io.agora.rtc.internal.EncryptionConfig;
import io.agora.rtc.video.VideoCanvas;
import io.agora.rtc.video.VideoEncoderConfiguration;

Expand Down Expand Up @@ -361,9 +362,18 @@ protected void disablePreProcessor() {
}

protected void configEngine(VideoEncoderConfiguration.VideoDimensions videoDimension, VideoEncoderConfiguration.FRAME_RATE fps, String encryptionKey, String encryptionMode) {
EncryptionConfig config = new EncryptionConfig();
if (!TextUtils.isEmpty(encryptionKey)) {
rtcEngine().setEncryptionMode(encryptionMode);
rtcEngine().setEncryptionSecret(encryptionKey);
config.encryptionKey = encryptionKey;

if(TextUtils.equals(encryptionMode, "AES-128-XTS")) {
config.encryptionMode = EncryptionConfig.EncryptionMode.AES_128_XTS;
} else if(TextUtils.equals(encryptionMode, "AES-256-XTS")) {
config.encryptionMode = EncryptionConfig.EncryptionMode.AES_256_XTS;
}
rtcEngine().enableEncryption(true, config);
} else {
rtcEngine().enableEncryption(false, config);
}

log.debug("configEngine " + videoDimension + " " + fps + " " + encryptionMode);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 下列 ifdef 块是创建使从 DLL 导出更简单的
// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 CHINESESIMPLIFIED_EXPORTS
// 符号编译的。在使用此 DLL 的
// 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
// CHINESESIMPLIFIED_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
// 符号视为是被导出的。
// 下列 ifdef 块是创建使从 DLL 导出更简单的
// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 CHINESESIMPLIFIED_EXPORTS
// 符号编译的。在使用此 DLL 的
// 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
// CHINESESIMPLIFIED_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
// 符号视为是被导出的。
#ifdef CHINESESIMPLIFIED_EXPORTS
#define CHINESESIMPLIFIED_API __declspec(dllexport)
#else
Expand Down Expand Up @@ -46,11 +46,13 @@ extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128CCM;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128CTR ;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES256XTS;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES256GCM;

extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES256CCM ;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES256CTR ;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_SM4_128ECB ;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES_128_ECB ;


extern CHINESESIMPLIFIED_API LPCTSTR IDS_SET_RESOLUTION;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_SET_MFR;
extern CHINESESIMPLIFIED_API LPCTSTR IDS_SET_MR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ IDS_CHN_AES256CTR DATA;
IDS_CHN_SM4_128ECB DATA;
IDS_CHN_AES_128_ECB DATA;


IDS_SET_RESOLUTION DATA;
IDS_SET_MFR DATA;
IDS_SET_MR DATA;
Expand Down
12 changes: 6 additions & 6 deletions Group-Video/OpenVideoCall-Windows-MFC/Language/English/English.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 下列 ifdef 块是创建使从 DLL 导出更简单的
// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 ENGLISH_EXPORTS
// 符号编译的。在使用此 DLL 的
// 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
// ENGLISH_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
// 符号视为是被导出的。
// 下列 ifdef 块是创建使从 DLL 导出更简单的
// 宏的标准方法。此 DLL 中的所有文件都是用命令行上定义的 ENGLISH_EXPORTS
// 符号编译的。在使用此 DLL 的
// 任何其他项目上不应定义此符号。这样,源文件中包含此文件的任何其他项目都会将
// ENGLISH_API 函数视为是从 DLL 导入的,而此 DLL 则将用此宏定义的
// 符号视为是被导出的。
#ifdef ENGLISH_EXPORTS
#define ENGLISH_API __declspec(dllexport)
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ IDS_CHN_SM4_128ECB DATA;
IDS_CHN_AES_128_ECB DATA;



IDS_SET_RESOLUTION DATA;
IDS_SET_MFR DATA;
IDS_SET_MR DATA;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// EnterChannelDlg.cpp : 实现文件
// EnterChannelDlg.cpp : 实现文件
//

#include "stdafx.h"
Expand All @@ -9,7 +9,7 @@
#include "afxdialogex.h"


// CEnterChannelDlg 对话框
// CEnterChannelDlg 对话框

IMPLEMENT_DYNAMIC(CEnterChannelDlg, CDialogEx)

Expand Down Expand Up @@ -43,7 +43,7 @@ BEGIN_MESSAGE_MAP(CEnterChannelDlg, CDialogEx)
END_MESSAGE_MAP()


// CEnterChannelDlg 消息处理程序
// CEnterChannelDlg 消息处理程序
BOOL CEnterChannelDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN){
Expand All @@ -63,7 +63,7 @@ BOOL CEnterChannelDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();

// TODO: 在此添加额外的初始化
// TODO: 在此添加额外的初始化
m_ftEncy.CreateFont(17, 0, 0, 0, FW_BOLD, FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, _T("Arial"));
m_ftHead.CreateFont(15, 0, 0, 0, FW_NORMAL, FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, _T("Arial"));
m_ftDesc.CreateFont(15, 0, 0, 0, FW_NORMAL, FALSE, FALSE, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, _T("Arial"));
Expand Down Expand Up @@ -193,19 +193,17 @@ void CEnterChannelDlg::OnBnClickedBtnjoinChannel()
{
// CString str = CAgoraObject::GetAgoraObject()->GetCallID();
CString strKey;

m_ctrEncKey.GetWindowText(strKey);
if (strKey.GetLength() > 0)
{

char szEncryptKey[2 * MAX_PATH] = { 0 };
WideCharToMultiByte(CP_UTF8, 0, strKey.GetBuffer(0), strKey.GetLength(), szEncryptKey, 2 * MAX_PATH, NULL, NULL);
// configuration of encrypt
EncryptionConfig config;
// set encrypt mode
config.encryptionMode = (agora::rtc::ENCRYPTION_MODE)m_cmbEncType.GetCurSel();
config.encryptionMode = ENCRYPTION_MODE(m_cmbEncType.GetCurSel() + 1);
// set encrypt key
config.encryptionKey = szEncryptKey;
char szKey[520] = { 0 };
WideCharToMultiByte(CP_UTF8, 0, strKey.GetBuffer(0), strKey.GetLength(), szKey, 520, NULL, NULL);
config.encryptionKey = szKey;
// EnableEncryption of engine.
CAgoraObject::GetAgoraObject()->EnableEncryption(true, config);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
TargetAttributes = {
076C59711DDDBC3500F813E2 = {
CreatedOnToolsVersion = 8.1;
DevelopmentTeam = SW3CA7M752;
DevelopmentTeam = GM72UGLGZW;
ProvisioningStyle = Manual;
};
};
Expand Down Expand Up @@ -495,9 +495,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
CODE_SIGN_IDENTITY = "Apple Development: Qianze Zhang (3C9KJFP729)";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = SW3CA7M752;
DEVELOPMENT_TEAM = GM72UGLGZW;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -513,7 +513,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.agora.OpenVideoCall;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "dc253ab3-71e4-40a3-a57c-a3a763407202";
PROVISIONING_PROFILE_SPECIFIER = AgoraAppsDevProfile;
PROVISIONING_PROFILE_SPECIFIER = App;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -522,9 +522,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
CODE_SIGN_IDENTITY = "Apple Development: Qianze Zhang (3C9KJFP729)";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = SW3CA7M752;
DEVELOPMENT_TEAM = GM72UGLGZW;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -540,7 +540,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.agora.OpenVideoCall;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "dc253ab3-71e4-40a3-a57c-a3a763407202";
PROVISIONING_PROFILE_SPECIFIER = AgoraAppsDevProfile;
PROVISIONING_PROFILE_SPECIFIER = App;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import <Foundation/Foundation.h>
#import <AgoraRtcKit/AgoraRtcEngineKit.h>

typedef NS_ENUM(int, EncryptionType) {
EncryptionTypeXTS128,
Expand All @@ -16,7 +17,7 @@ typedef NS_ENUM(int, EncryptionType) {

@interface Encryption : NSObject
@property (nonatomic, copy, readonly) NSString *modeString;
@property (nonatomic, copy, readonly) AgoraEncryptionMode modeValue;
@property (nonatomic, readonly) AgoraEncryptionMode modeValue;
@property (nonatomic, copy, readonly) NSString *description;
@property (nonatomic, assign) EncryptionType type;
@property (nonatomic, copy) NSString *secret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>provisioningProfiles</key>
<dict>
<key>io.agora.OpenVideoCall</key>
<string>AgoraAppsDevProfile</string>
<string>App</string>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
TargetAttributes = {
07F52EB01D62F39D006DDCD4 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = SW3CA7M752;
DevelopmentTeam = GM72UGLGZW;
LastSwiftMigration = 1000;
ProvisioningStyle = Manual;
SystemCapabilities = {
Expand Down Expand Up @@ -490,9 +490,9 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
DEVELOPMENT_TEAM = SW3CA7M752;
CODE_SIGN_IDENTITY = "Apple Development: Qianze Zhang (3C9KJFP729)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development: Qianze Zhang (3C9KJFP729)";
DEVELOPMENT_TEAM = GM72UGLGZW;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -508,7 +508,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.agora.OpenVideoCall;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = AgoraAppsDevProfile;
PROVISIONING_PROFILE_SPECIFIER = App;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
Expand All @@ -522,9 +522,9 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
DEVELOPMENT_TEAM = SW3CA7M752;
CODE_SIGN_IDENTITY = "Apple Development: Qianze Zhang (3C9KJFP729)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development: Qianze Zhang (3C9KJFP729)";
DEVELOPMENT_TEAM = GM72UGLGZW;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -540,7 +540,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.agora.OpenVideoCall;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = AgoraAppsDevProfile;
PROVISIONING_PROFILE_SPECIFIER = App;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private extension RoomViewController {
// Step 4, enable encryption mode
if let type = settings.encryptionType, let text = type.text, !text.isEmpty {
let config = AgoraEncryptionConfig()
config.encryptionKey = NSString(utf8String: text)
config.encryptionKey = text
config.encryptionMode = type.modeValue()
agoraKit.enableEncryption(true, encryptionConfig: config)
}
Expand Down
2 changes: 1 addition & 1 deletion Group-Video/OpenVideoCall-iOS/exportPlist.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>provisioningProfiles</key>
<dict>
<key>io.agora.OpenVideoCall</key>
<string>AgoraAppsDevProfile</string>
<string>App</string>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
TargetAttributes = {
1A8E8D371D396CAA002FA67C = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = SW3CA7M752;
DevelopmentTeam = GM72UGLGZW;
ProvisioningStyle = Manual;
SystemCapabilities = {
com.apple.BackgroundModes = {
Expand Down Expand Up @@ -354,9 +354,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
CODE_SIGN_IDENTITY = "Apple Development: Qianze Zhang (3C9KJFP729)";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = SW3CA7M752;
DEVELOPMENT_TEAM = GM72UGLGZW;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -371,17 +371,17 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "io.agora.Agora-iOS-Tutorial-Objective-C";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = AgoraAppsDevProfile;
PROVISIONING_PROFILE_SPECIFIER = App;
};
name = Debug;
};
1A8E8D671D396CAA002FA67C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Yuhua Gong (YBKA3W5TF4)";
CODE_SIGN_IDENTITY = "Apple Development: Qianze Zhang (3C9KJFP729)";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = SW3CA7M752;
DEVELOPMENT_TEAM = GM72UGLGZW;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -396,7 +396,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = "io.agora.Agora-iOS-Tutorial-Objective-C";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = AgoraAppsDevProfile;
PROVISIONING_PROFILE_SPECIFIER = App;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ - (void)rtcEngine:(AgoraRtcEngineKit *)engine firstRemoteVideoDecodedOfUid:(NSUI
// Bind remote video stream to view
}

- (void)rtcEngine:(AgoraRtcEngineKit *)engine remoteVideoStateChangedOfUid:(NSUInteger)uid state:(AgoraVideoRemoteState)state reason:(AgoraVideoRemoteStateReason)reason elapsed:(NSInteger)elapsed
{
NSLog(@"remoteVideoStateChangedOfUid %@ %@ %@", @(uid), @(state), @(reason));
}

- (IBAction)hangUpButton:(UIButton *)sender {
[self leaveChannel];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ To build and run the sample application, get an App ID:
1. Download the [Agora Video SDK](https://www.agora.io/en/download/). Unzip the downloaded SDK package and copy the following files from the SDK `libs` folder into the sample application `Agora iOS Tutorial Objective-C` folder.
- `AograRtcEngineKit.framework`
- `AgoraRtcCryptoLoader.framework`
- `libcrypto.a`

2. Connect your iPhone or iPad device and run the project. Ensure a valid provisioning profile is applied or your project will not run.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

- AgoraRtcEngineKit.framework
- AgoraRtcCryptoLoader.framework
- libcrypto.a

2. 最后使用 XCode 打开 Agora iOS Tutorial Objective-C.xcodeproj,连接 iPhone/iPad 测试设备,设置有效的开发者签名后即可运行。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>provisioningProfiles</key>
<dict>
<key>io.agora.Agora-iOS-Tutorial-Objective-C</key>
<string>AgoraAppsDevProfile</string>
<string>App</string>
</dict>
</dict>
</plist>
Loading

0 comments on commit 4b402d9

Please sign in to comment.