Skip to content

Commit

Permalink
support x64
Browse files Browse the repository at this point in the history
  • Loading branch information
sbd021 committed Sep 6, 2019
1 parent 45b2d63 commit 07124b0
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

* Cmake of Windows version

* visual studio 2013
* visual studio 2015(also support vs2013 and vs2017)

* QT 5.9.2(msvc2015) if you need UI
* QT 5.9.2(msvc2015, any version QT adjust to visual studio version) if you need UI

* Version

* agora sdk windows version 2.9.0 and above(x86).
* obs studio 21.1b and above(x86).
* agora sdk windows version 2.9.0 and above(x86), also support x64.
* obs studio 21.1b and above(x86), also support x64.

* Build project with CMake-gui:

Expand All @@ -24,10 +24,10 @@
* Set variables in windows environment:
* DepsPath

The path where win32 is located after decompressing dedependencies2013.zip
The path where win32 or win64 is located after decompressing dedependencies2015.zip(dedependencies2013.zip or dedependencies2017.zip). dedependencies2013 not support win64.
* QTDir

The path where win32 is loacted after installed QT 5.8
The path where win32 is loacted after installed QT 5.9.2
* Uncheck ENABLE\_SCRIPTING

* After configure is ok,then click generate, vs project can be generated.
Expand Down
8 changes: 4 additions & 4 deletions UI/window-basic-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6262,17 +6262,17 @@ void OBSBasic::InitAgoraServiceSettings()
{
obs_data_t* settings = obs_service_get_settings(agoraService);
std::string rtmpcustom = "rtmp_custonm";
if (rtmpcustom.compare( obs_service_get_type(service) )== 0)
if (rtmpcustom.compare(obs_service_get_type(service)) == 0)
{
obs_data_set_string(settings, "agora_url", obs_service_get_url(service));
obs_data_set_string(settings, "agora_key", obs_service_get_key(service));
}

obs_data_set_int(settings, "agora_video_bitrate", 2400);

int out_cx = config_get_uint(basicConfig, "Video", "OutputCX");
int out_cy = config_get_uint(basicConfig, "Video", "OutputCY");

obs_data_set_int(settings, "agora_out_cx", out_cx);
obs_data_set_int(settings, "agora_out_cy", out_cy);

Expand Down Expand Up @@ -6761,4 +6761,4 @@ void OBSBasic::OnJoinChannelSuccess(QString channel, long long uid, long long el
void OBSBasic::OnError(int err, const char* msg)
{

}
}
Binary file modified dependencies2015.zip
Binary file not shown.
Binary file modified dependencies2017.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions plugins/win-agora/Agora/ExtendAudioFrameObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ bool CExtendAudioFrameObserver::onRecordAudioFrame(AudioFrame& audioFrame)
unsigned int datalen = 0;
pCircleBuffer->readBuffer(this->pPlayerData, nSize, &datalen);

if (nSize > 0 && datalen == nSize)
{
if (agora_sdk_captrue_mic_audio) {

if (agora_sdk_captrue_mic_audio) {
if (nSize > 0 && datalen == nSize)
{
//int nMixLen = datalen > nSize ? nSize : datalen;
int len = datalen / sizeof(int16_t);
for (int i = 0; i < len; i++) {
Expand All @@ -86,8 +86,8 @@ bool CExtendAudioFrameObserver::onRecordAudioFrame(AudioFrame& audioFrame)
*obsbuffer = mix;
}
memcpy(audioFrame.buffer, pPlayerData, datalen);
}

}
else
memcpy(audioFrame.buffer, pPlayerData, datalen);
}
Expand Down
14 changes: 7 additions & 7 deletions readme.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

*English: [English](README.md)*

* 编译基于win32(x86)
* agora sdk版本2.2.1
* 编译基于win32(x86),也支持x64
* agora sdk版本2.9.0
* obs stduio 版本21.1

## 编译环境

* CMake 2.8.12以上
* vs2013
* QT 5.8(可选,如果不需要界面,可以不需要QT。默认是有界面的)
* vs2015
* QT 5.9.2(可选,如果不需要界面,可以不需要QT。默认是有界面的。任何适配对应的visual stduio版本的QT)

配好环境,CMake上选择源码路径和生成路径,编译器选择vs2013,编译即可生成vs解决方案。
配好环境,CMake上选择源码路径和生成路径,编译器选择vs2015,编译即可生成vs解决方案。


## 使用CMake-gui 构建vs项目:
Expand All @@ -22,10 +22,10 @@
* 设置windows环境变量:
* DepsPath

**解压dedependencies2013.zip** 之后的目录下有个win32文件夹,作为路径。(vs2015对应dedependencies2015.zip,vs2017对应dedependencies2017.zip)
**解压dedependencies2015.zip** 之后的目录下有个win32或者win64文件夹,作为路径。(vs2015对应dedependencies2013.zip,vs2017对应dedependencies2017.zip) 。dedependencies2013目前不支持win64。
* QTDir

QT 5.8 目录下的msvc2013。其他5.0以上版本的QT也可以,只要支持对应的vs版本即可。比如:QT5.8对应的vs2013的版本应该选择msvc2013。QT 5.9对应的vs2015是msvc_2015
QT 5.8 目录下的msvc2013。其他5.0以上版本的QT也可以,只要支持对应的vs版本即可。比如:QT5.8对应的vs2013的版本应该选择msvc2013。QT 5.9.2对应的vs2015是msvc_2015
* 取消 ENABLE\_SCRIPTING

如果不需要使用python或者lua脚本调用obs库接口,可以取消。
Expand Down

0 comments on commit 07124b0

Please sign in to comment.