From 6a460beeb0595db5f0b297fa62b1f9d0dd44ccec Mon Sep 17 00:00:00 2001 From: CLuCheng <1551394539@qq.com> Date: Mon, 7 Sep 2020 11:27:28 +0800 Subject: [PATCH 1/3] repair crash. --- .../Language/ChineseSimplified/ChineseSimplified.h | 12 +++++++----- .../Language/ChineseSimplified/Source.def | 3 +++ .../Language/English/English.h | 3 +++ .../Language/English/Source.def | 4 ++++ .../OpenVideoCall/EnterChannelDlg.cpp | 12 ++++++------ .../OpenVideoCall/OpenVideoCall.vcxproj | 4 ++++ 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/ChineseSimplified.h b/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/ChineseSimplified.h index 811549e9..b262678a 100644 --- a/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/ChineseSimplified.h +++ b/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/ChineseSimplified.h @@ -39,15 +39,17 @@ extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_BTJOIN; extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_CHTIP; extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_KEYTIP; -extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_ENCTYPE; -extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128XTS; +extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_ENCTYPE ; +extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128XTS ; extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128GCM; extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128CCM; -extern CHINESESIMPLIFIED_API LPCTSTR IDS_CHN_AES128CTR; +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_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; diff --git a/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/Source.def b/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/Source.def index ebb6cb8a..5a6c7770 100644 --- a/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/Source.def +++ b/Group-Video/OpenVideoCall-Windows-MFC/Language/ChineseSimplified/Source.def @@ -29,6 +29,7 @@ IDS_CHN_CHTIP DATA; IDS_CHN_KEYTIP DATA; IDS_CHN_ENCTYPE DATA; +IDS_CHN_ENCTYPE DATA; IDS_CHN_AES128XTS DATA; IDS_CHN_AES128GCM DATA; IDS_CHN_AES128CCM DATA; @@ -37,6 +38,8 @@ IDS_CHN_AES256XTS DATA; IDS_CHN_AES256GCM DATA; IDS_CHN_AES256CCM DATA; IDS_CHN_AES256CTR DATA; +IDS_CHN_SM4_128ECB DATA; +IDS_CHN_AES_128_ECB DATA; IDS_SET_RESOLUTION DATA; IDS_SET_MFR DATA; diff --git a/Group-Video/OpenVideoCall-Windows-MFC/Language/English/English.h b/Group-Video/OpenVideoCall-Windows-MFC/Language/English/English.h index 720907e3..4318a898 100644 --- a/Group-Video/OpenVideoCall-Windows-MFC/Language/English/English.h +++ b/Group-Video/OpenVideoCall-Windows-MFC/Language/English/English.h @@ -49,6 +49,9 @@ extern ENGLISH_API LPCTSTR IDS_CHN_AES256XTS; extern ENGLISH_API LPCTSTR IDS_CHN_AES256GCM; extern ENGLISH_API LPCTSTR IDS_CHN_AES256CCM; extern ENGLISH_API LPCTSTR IDS_CHN_AES256CTR; +extern ENGLISH_API LPCTSTR IDS_CHN_SM4_128ECB; +extern ENGLISH_API LPCTSTR IDS_CHN_AES_128_ECB; + extern ENGLISH_API LPCTSTR IDS_SET_RESOLUTION; extern ENGLISH_API LPCTSTR IDS_SET_MFR; diff --git a/Group-Video/OpenVideoCall-Windows-MFC/Language/English/Source.def b/Group-Video/OpenVideoCall-Windows-MFC/Language/English/Source.def index d1e513ec..737ca855 100644 --- a/Group-Video/OpenVideoCall-Windows-MFC/Language/English/Source.def +++ b/Group-Video/OpenVideoCall-Windows-MFC/Language/English/Source.def @@ -29,6 +29,7 @@ IDS_CHN_CHTIP DATA; IDS_CHN_KEYTIP DATA; IDS_CHN_ENCTYPE DATA; +IDS_CHN_ENCTYPE DATA; IDS_CHN_AES128XTS DATA; IDS_CHN_AES128GCM DATA; IDS_CHN_AES128CCM DATA; @@ -37,6 +38,9 @@ IDS_CHN_AES256XTS DATA; IDS_CHN_AES256GCM DATA; IDS_CHN_AES256CCM DATA; IDS_CHN_AES256CTR DATA; +IDS_CHN_SM4_128ECB DATA; +IDS_CHN_AES_128_ECB DATA; + IDS_SET_RESOLUTION DATA; IDS_SET_MFR DATA; diff --git a/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/EnterChannelDlg.cpp b/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/EnterChannelDlg.cpp index 1fd9678a..7caf88de 100644 --- a/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/EnterChannelDlg.cpp +++ b/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/EnterChannelDlg.cpp @@ -77,7 +77,7 @@ BOOL CEnterChannelDlg::OnInitDialog() InitCtrls(); return TRUE; // return TRUE unless you set the focus to a control - // 异常: OCX 属性页应返回 FALSE + } void CEnterChannelDlg::InitCtrls() @@ -184,7 +184,6 @@ void CEnterChannelDlg::DrawClient(CDC *lpDC) void CEnterChannelDlg::OnBnClickedBtntestChannel() { - // TODO: 在此添加控件通知处理程序代码 m_dlgDevice.ShowWindow(SW_SHOW); m_dlgDevice.CenterWindow(); } @@ -192,19 +191,21 @@ void CEnterChannelDlg::OnBnClickedBtntestChannel() void CEnterChannelDlg::OnBnClickedBtnjoinChannel() { - // TODO: 在此添加控件通知处理程序代码 // 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 = m_cmbEncType.GetCurSel(); + config.encryptionMode = (agora::rtc::ENCRYPTION_MODE)m_cmbEncType.GetCurSel(); // set encrypt key - config.encryptionKey = strKey; + config.encryptionKey = szEncryptKey; // EnableEncryption of engine. CAgoraObject::GetAgoraObject()->EnableEncryption(true, config); } @@ -214,7 +215,6 @@ void CEnterChannelDlg::OnBnClickedBtnjoinChannel() void CEnterChannelDlg::OnBnClickedBtnsetChannel() { - // TODO: 在此添加控件通知处理程序代码 // SHORT sKeyStat = ::GetAsyncKeyState(VK_CONTROL); GetParent()->SendMessage(WM_GONEXT, 0, 0); diff --git a/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/OpenVideoCall.vcxproj b/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/OpenVideoCall.vcxproj index 017fa254..3aa44f01 100644 --- a/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/OpenVideoCall.vcxproj +++ b/Group-Video/OpenVideoCall-Windows-MFC/OpenVideoCall/OpenVideoCall.vcxproj @@ -106,10 +106,12 @@ Disabled WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true + ..\sdk\include Windows true + ..\sdk\lib false @@ -165,12 +167,14 @@ true WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true + ..\sdk\include Windows true true true + ..\sdk\lib false From 9438e67c1d6cacde5607f8561b2facb719bda2de Mon Sep 17 00:00:00 2001 From: CLuCheng <1551394539@qq.com> Date: Mon, 7 Sep 2020 13:34:51 +0800 Subject: [PATCH 2/3] repair ENCRYPTIONMODE --- .../OpenVideoCall.vcxproj | 277 ++++++------------ .../OpenVideoCall.vcxproj.filters | 39 +-- .../OpenVideoCall-Windows/agoraobject.cpp | 2 +- .../OpenVideoCall-Windows/openvideocall.cpp | 4 +- 4 files changed, 107 insertions(+), 215 deletions(-) diff --git a/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj b/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj index f8e56ec7..f618c5a7 100644 --- a/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj +++ b/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj @@ -16,7 +16,8 @@ QtVS_v303 10.0.19041.0 10.0.19041.0 - $(MSBuildProjectDirectory)\QtMsBuild + $(MSBuildProjectDirectory)\QtMsBuild + v141 @@ -36,7 +37,10 @@ debug\ OpenVideoCall - + + + + @@ -44,11 +48,39 @@ - debug\debug\OpenVideoCalltruetruerelease\release\OpenVideoCalltruefalsetrueQT_5.12_x86core;network;gui;widgets;qml;quickwidgets;quickQT_5.12_x86core;network;gui;widgets;qml;quickwidgets;quick - + + + + + + debug\ + debug\ + OpenVideoCall + true + true + + + release\ + release\ + OpenVideoCall + true + false + true + + + QT_5.12_x86 + core;network;gui;widgets;qml;quickwidgets;quick + + + QT_5.12_x86 + core;network;gui;widgets;qml;quickwidgets;quick + + + + - .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;./../../libs/include;release;/include;%(AdditionalIncludeDirectories) + .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;.\sdk\include;release;/include;%(AdditionalIncludeDirectories) -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) release\ false @@ -59,15 +91,17 @@ MaxSpeed _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_NO_DEBUG;NDEBUG;%(PreprocessorDefinitions) false - + + MultiThreadedDLL true true Level3 - true + true + agora_rtc_sdk.lib;User32.LIB;shell32.lib;%(AdditionalDependencies) - D:\AgoraIO\basic-video-call\libs\x86;C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.6.11-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories) + .\sdk\lib;C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.6.11-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories) "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) true false @@ -90,10 +124,30 @@ copy ..\..\libs\x86\*.dll .\Release && windeployqt Release\OpenVideoCall.exe copy ..\..\libs\x86\*.dll .\Release && windeployqt Release\OpenVideoCall.exe - msvc./$(Configuration)/moc_predefs.hMoc'ing %(Identity)...output$(Configuration)moc_%(Filename).cppopenvideocalldefaultRcc'ing %(Identity)...$(Configuration)qrc_%(Filename).cppUic'ing %(Identity)...$(ProjectDir)ui_%(Filename).h + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + openvideocall + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + Uic'ing %(Identity)... + $(ProjectDir) + ui_%(Filename).h + + - .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;./../../libs/include;debug;/include;%(AdditionalIncludeDirectories) + .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;..\..\libs\include;debug;/include;%(AdditionalIncludeDirectories) -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) debug\ false @@ -108,10 +162,11 @@ true true Level3 - true + true + agora_rtc_sdk.lib;User32.LIB;shell32.lib;%(AdditionalDependencies) - D:\AgoraIO\basic-video-call\libs\x86;C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.6.11-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories) + ..\..\libs\x86;C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.6.11-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories) "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) true true @@ -133,7 +188,27 @@ copy ..\..\libs\x86\*.dll .\Debug copy ..\..\libs\x86\*.dll .\Debug - msvc./$(Configuration)/moc_predefs.hMoc'ing %(Identity)...output$(Configuration)moc_%(Filename).cppopenvideocalldefaultRcc'ing %(Identity)...$(Configuration)qrc_%(Filename).cppUic'ing %(Identity)...$(ProjectDir)ui_%(Filename).h + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + openvideocall + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + Uic'ing %(Identity)... + $(ProjectDir) + ui_%(Filename).h + + @@ -151,116 +226,26 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Document true @@ -277,93 +262,21 @@ release\moc_predefs.h;%(Outputs) true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -407,15 +320,6 @@ - - - - - - - - - @@ -446,6 +350,9 @@ - + + + + \ No newline at end of file diff --git a/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj.filters b/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj.filters index 64baa69d..f4a1bfa3 100644 --- a/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj.filters +++ b/Group-Video/OpenVideoCall-Windows/OpenVideoCall.vcxproj.filters @@ -130,39 +130,12 @@ - - - - - - - - - - - - - - - - - - Generated Files Generated Files - - - - - - - - - @@ -338,6 +311,18 @@ Resource Files + + + + + + + + + + + + diff --git a/Group-Video/OpenVideoCall-Windows/agoraobject.cpp b/Group-Video/OpenVideoCall-Windows/agoraobject.cpp index c0b3eaa6..d11a4bb2 100644 --- a/Group-Video/OpenVideoCall-Windows/agoraobject.cpp +++ b/Group-Video/OpenVideoCall-Windows/agoraobject.cpp @@ -482,7 +482,7 @@ BOOL CAgoraObject::SetEncryptionMode(const char* secret,const char* secretMode) BOOL CAgoraObject::EnableEncryption(bool enabled, const EncryptionConfig & config) { - int nRet = m_lpAgoraEngine->enableEncryption(enabled, config); + int nRet = m_rtcEngine->enableEncryption(enabled, config); return nRet == 0 ? TRUE : FALSE; } diff --git a/Group-Video/OpenVideoCall-Windows/openvideocall.cpp b/Group-Video/OpenVideoCall-Windows/openvideocall.cpp index f4393569..1ada8e92 100644 --- a/Group-Video/OpenVideoCall-Windows/openvideocall.cpp +++ b/Group-Video/OpenVideoCall-Windows/openvideocall.cpp @@ -116,7 +116,7 @@ void OpenVideoCall::on_btn_join_clicked() // configuration of encrypt EncryptionConfig config; // set encrypt mode - config.encryptionMode = ui->com_encryp->currentIndex(); + config.encryptionMode = (ENCRYPTION_MODE)(ui->com_encryp->currentIndex() + 1); // set encrypt key config.encryptionKey = qsEncrypSecret.toUtf8().data(); // EnableEncryption of engine. @@ -134,7 +134,7 @@ void OpenVideoCall::on_com_encryp_currentIndexChanged(const QString &arg1) // configuration of encrypt EncryptionConfig config; // set encrypt mode - config.encryptionMode = ui->com_encryp->currentIndex(); + config.encryptionMode = (ENCRYPTION_MODE)(ui->com_encryp->currentIndex() + 1); // set encrypt key config.encryptionKey = qsEncrypSecret.toUtf8().data(); // EnableEncryption of engine. From 2d8a9991ae2bc638d602aedf55a04c34fb02c929 Mon Sep 17 00:00:00 2001 From: lijuan <2420082764@qq.com> Date: Thu, 12 Nov 2020 11:36:47 +0800 Subject: [PATCH 3/3] fix bug --- One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/package.json | 2 +- .../Agora-Web-Tutorial-1to1-Webpack/src/rtc-client.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/package.json b/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/package.json index 20804a20..754711d4 100644 --- a/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/package.json +++ b/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/package.json @@ -17,7 +17,7 @@ "lint-fix": "eslint --fix src/ " }, "dependencies": { - "agora-rtc-sdk": "^3.0.2", + "agora-rtc-sdk": "^3.2.3", "jquery": "^3.4.1", "materialize-css": "^1.0.0" }, diff --git a/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/src/rtc-client.js b/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/src/rtc-client.js index ccbcf2ce..760aa270 100644 --- a/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/src/rtc-client.js +++ b/One-to-One-Video/Agora-Web-Tutorial-1to1-Webpack/src/rtc-client.js @@ -276,7 +276,7 @@ export default class RTCClient { _updateVideoInfo () { this._localStream && this._localStream.getStats((stats) => { const localStreamProfile = [ - ['Uid: ', this._localStream.getId()].join(''), + ['Uid: ', this._localStream && this._localStream.getId()].join(''), ['SDN access delay: ', stats.accessDelay, 'ms'].join(''), ['Video send: ', stats.videoSendFrameRate, 'fps ', stats.videoSendResolutionWidth + 'x' + stats.videoSendResolutionHeight].join(''), ].join('
')