Skip to content

Commit 90f89a5

Browse files
sbd021xianing
authored andcommitted
3.6.1.1 windows x64
1 parent eed4f73 commit 90f89a5

File tree

8 files changed

+104
-64
lines changed

8 files changed

+104
-64
lines changed

windows/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,5 @@ libs/
258258

259259
ThirdParty/
260260

261-
MediaPlayerPart/
261+
MediaPlayerPart/
262+
MediaPlayerPart64/

windows/APIExample/APIExample/APIExample.vcxproj

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<ProjectGuid>{DB16CA2F-3910-4449-A5BD-6A602B33BE0F}</ProjectGuid>
2424
<Keyword>MFCProj</Keyword>
2525
<RootNamespace>APIExample</RootNamespace>
26-
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
26+
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
2727
</PropertyGroup>
2828
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -93,8 +93,8 @@
9393
<WarningLevel>Level3</WarningLevel>
9494
<Optimization>Disabled</Optimization>
9595
<SDLCheck>false</SDLCheck>
96-
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
97-
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir);$(ProjectDir)RtcChannelHelperPlugin;$(solutionDir)MediaPlayerPart\include</AdditionalIncludeDirectories>
96+
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
97+
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir);$(ProjectDir)RtcChannelHelperPlugin;$(solutionDir)MediaPlayerPart\high_level_api\include</AdditionalIncludeDirectories>
9898
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
9999
</ClCompile>
100100
<Link>
@@ -118,7 +118,8 @@
118118
if exist $(SolutionDir)libs (copy $(SolutionDir)libs\x86\*.dll $(SolutionDir)$(Configuration))
119119
if exist zh-cn.ini (copy zh-cn.ini $(SolutionDir)$(Configuration))
120120
if exist en.ini (copy en.ini $(SolutionDir)$(Configuration))
121-
if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\AgoraMediaPlayer.dll $(SolutionDir)$(Configuration))</Command>
121+
if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\AgoraMediaPlayer.dll $(SolutionDir)$(Configuration))
122+
if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\libagora-player-ffmpeg.dll $(SolutionDir)$(Configuration))</Command>
122123
</PostBuildEvent>
123124
<Manifest>
124125
<AdditionalManifestFiles>
@@ -135,18 +136,19 @@ if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\A
135136
</ItemDefinitionGroup>
136137
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
137138
<ClCompile>
138-
<PrecompiledHeader>Use</PrecompiledHeader>
139+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
139140
<WarningLevel>Level3</WarningLevel>
140141
<Optimization>Disabled</Optimization>
141142
<SDLCheck>true</SDLCheck>
142-
<PreprocessorDefinitions>_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_WIN32_WINNT</PreprocessorDefinitions>
143-
<AdditionalIncludeDirectories>$(SolutionDir)\libs\include;..\libs\include;</AdditionalIncludeDirectories>
143+
<PreprocessorDefinitions>_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
144+
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir);$(ProjectDir)RtcChannelHelperPlugin;$(solutionDir)MediaPlayerPart64\high_level_api\include</AdditionalIncludeDirectories>
144145
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
145146
</ClCompile>
146147
<Link>
147148
<SubSystem>Windows</SubSystem>
148-
<AdditionalLibraryDirectories>$(SolutionDir)\libs\x86_64</AdditionalLibraryDirectories>
149+
<AdditionalLibraryDirectories>$(SolutionDir)\libs\x86_64;$(SolutionDir)ThirdParty\libyuv\debug\x64;$(SolutionDir)ThirdParty\DShow\x64;$(SolutionDir)MediaPlayerPart64\lib</AdditionalLibraryDirectories>
149150
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
151+
<AdditionalDependencies>AgoraMediaPlayer.lib;d3d9.lib;dsound.lib;winmm.lib;dxguid.lib</AdditionalDependencies>
150152
</Link>
151153
<Midl>
152154
<MkTypLibCompatible>false</MkTypLibCompatible>
@@ -159,14 +161,20 @@ if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\A
159161
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
160162
</ResourceCompile>
161163
<PostBuildEvent>
162-
<Command>if exist $(SolutionDir)\libs (copy $(SolutionDir)libs\x86_64\agora_rtc_sdk.dll $(SolutionDir)$(Platform)\$(Configuration))
164+
<Command>if exist $(SolutionDir)\libs (copy $(SolutionDir)libs\x86_64\*.dll $(SolutionDir)$(Platform)\$(Configuration))
163165
if exist zh-cn.ini (copy zh-cn.ini $(SolutionDir)$(Platform)\$(Configuration))
164166
if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
167+
copy Advanced\MediaIOCustomVideoCaptrue\screen.yuv $(SolutionDir)$(Platform)\$(Configuration)
168+
if exist $(SolutionDir)MediaPlayerPart64 (copy $(SolutionDir)MediaPlayerPart64\dll\AgoraMediaPlayer.dll $(SolutionDir)$(Platform)\$(Configuration))
169+
if exist $(SolutionDir)MediaPlayerPart64 (copy $(SolutionDir)MediaPlayerPart64\dll\libagora-player-ffmpeg.dll $(SolutionDir)$(Platform)\$(Configuration))
165170
</Command>
166171
</PostBuildEvent>
167172
<Manifest>
168173
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
169174
</Manifest>
175+
<PreBuildEvent>
176+
<Command>$(SolutionDir)installThirdParty.bat x64</Command>
177+
</PreBuildEvent>
170178
</ItemDefinitionGroup>
171179
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
172180
<ClCompile>
@@ -215,22 +223,23 @@ if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\A
215223
</ItemDefinitionGroup>
216224
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
217225
<ClCompile>
218-
<PrecompiledHeader>Use</PrecompiledHeader>
226+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
219227
<WarningLevel>Level3</WarningLevel>
220228
<Optimization>MaxSpeed</Optimization>
221229
<FunctionLevelLinking>true</FunctionLevelLinking>
222230
<IntrinsicFunctions>true</IntrinsicFunctions>
223231
<SDLCheck>true</SDLCheck>
224-
<PreprocessorDefinitions>_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);_WIN32_WINNT</PreprocessorDefinitions>
225-
<AdditionalIncludeDirectories>$(SolutionDir)libs\include</AdditionalIncludeDirectories>
232+
<PreprocessorDefinitions>_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
233+
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir);$(ProjectDir)RtcChannelHelperPlugin;$(solutionDir)MediaPlayerPart64\high_level_api\include</AdditionalIncludeDirectories>
226234
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
227235
</ClCompile>
228236
<Link>
229237
<SubSystem>Windows</SubSystem>
230238
<EnableCOMDATFolding>true</EnableCOMDATFolding>
231239
<OptimizeReferences>true</OptimizeReferences>
232-
<AdditionalLibraryDirectories>$(SolutionDir)\libs\x86_64</AdditionalLibraryDirectories>
240+
<AdditionalLibraryDirectories>$(SolutionDir)\libs\x86_64;$(SolutionDir)ThirdParty\libyuv\Release\x64;$(SolutionDir)ThirdParty\DShow\x64;$(SolutionDir)MediaPlayerPart64\lib</AdditionalLibraryDirectories>
233241
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
242+
<AdditionalDependencies>AgoraMediaPlayer.lib;d3d9.lib;dsound.lib;winmm.lib;dxguid.lib</AdditionalDependencies>
234243
</Link>
235244
<Midl>
236245
<MkTypLibCompatible>false</MkTypLibCompatible>
@@ -243,14 +252,20 @@ if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\A
243252
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
244253
</ResourceCompile>
245254
<PostBuildEvent>
246-
<Command>if exist $(SolutionDir)\libs (copy $(SolutionDir)libs\x86_64\agora_rtc_sdk.dll $(SolutionDir)$(Platform)\$(Configuration))
255+
<Command>if exist $(SolutionDir)\libs (copy $(SolutionDir)libs\x86_64\*.dll $(SolutionDir)$(Platform)\$(Configuration))
247256
if exist zh-cn.ini (copy zh-cn.ini $(SolutionDir)$(Platform)\$(Configuration))
248257
if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
258+
copy Advanced\MediaIOCustomVideoCaptrue\screen.yuv $(SolutionDir)$(Platform)\$(Configuration)
259+
if exist $(SolutionDir)MediaPlayerPart64 (copy $(SolutionDir)MediaPlayerPart64\dll\AgoraMediaPlayer.dll $(SolutionDir)$(Platform)\$(Configuration))
260+
if exist $(SolutionDir)MediaPlayerPart64 (copy $(SolutionDir)MediaPlayerPart64\dll\libagora-player-ffmpeg.dll $(SolutionDir)$(Platform)\$(Configuration))
249261
</Command>
250262
</PostBuildEvent>
251263
<Manifest>
252264
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
253265
</Manifest>
266+
<PreBuildEvent>
267+
<Command>$(SolutionDir)installThirdParty.bat x64</Command>
268+
</PreBuildEvent>
254269
</ItemDefinitionGroup>
255270
<ItemGroup>
256271
<ClInclude Include="Advanced\AudioEffect\CAgoraEffectDlg.h" />

windows/APIExample/APIExample/Advanced/MediaPlayer/CAgoraMediaPlayer.cpp

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,9 @@ LRESULT CAgoraMediaPlayer::OnmediaPlayerStateChanged(WPARAM wParam, LPARAM lPara
427427
{
428428
CString strState;
429429
CString strError;
430-
switch ((agora::media::MEDIA_PLAYER_STATE)wParam)
430+
switch ((agora::media::base::MEDIA_PLAYER_STATE)wParam)
431431
{
432-
case agora::media::PLAYER_STATE_OPEN_COMPLETED:
432+
case agora::media::base::PLAYER_STATE_OPEN_COMPLETED:
433433
strState = _T("PLAYER_STATE_OPEN_COMPLETED");
434434
m_mediaPlayerState = mediaPLAYER_OPEN;
435435
m_btnPlay.EnableWindow(TRUE);
@@ -438,25 +438,25 @@ LRESULT CAgoraMediaPlayer::OnmediaPlayerStateChanged(WPARAM wParam, LPARAM lPara
438438
m_sldVideo.SetRangeMax((int)duration);
439439

440440
break;
441-
case agora::media::PLAYER_STATE_OPENING:
441+
case agora::media::base::PLAYER_STATE_OPENING:
442442
strState = _T("PLAYER_STATE_OPENING");
443443
break;
444-
case agora::media::PLAYER_STATE_IDLE:
444+
case agora::media::base::PLAYER_STATE_IDLE:
445445
strState = _T("PLAYER_STATE_IDLE");
446446
break;
447-
case agora::media::PLAYER_STATE_PLAYING:
447+
case agora::media::base::PLAYER_STATE_PLAYING:
448448
strState = _T("PLAYER_STATE_PLAYING");
449449
break;
450-
case agora::media::PLAYER_STATE_PLAYBACK_COMPLETED:
450+
case agora::media::base::PLAYER_STATE_PLAYBACK_COMPLETED:
451451
strState = _T("PLAYER_STATE_PLAYBACK_COMPLETED");
452452
break;
453-
case agora::media::PLAYER_STATE_PAUSED:
453+
case agora::media::base::PLAYER_STATE_PAUSED:
454454
strState = _T("PLAYER_STATE_PAUSED");
455455
break;
456-
case agora::media::PLAYER_STATE_STOPPED:
456+
/*case agora::media::base::PLAYER_STATE_STOPPED:
457457
strState = _T("PLAYER_STATE_PAUSED");
458-
break;
459-
case agora::media::PLAYER_STATE_FAILED:
458+
break;*/
459+
case agora::media::base::PLAYER_STATE_FAILED:
460460
strState = _T("PLAYER_STATE_FAILED");
461461
//call media player stop function
462462
m_mediaPlayer->stop();
@@ -466,42 +466,40 @@ LRESULT CAgoraMediaPlayer::OnmediaPlayerStateChanged(WPARAM wParam, LPARAM lPara
466466
break;
467467
}
468468

469-
switch ((agora::media::MEDIA_PLAYER_ERROR)lParam)
469+
switch ((agora::media::base::MEDIA_PLAYER_ERROR)lParam)
470470
{
471-
case agora::media::PLAYER_ERROR_URL_NOT_FOUND:
471+
case agora::media::base::PLAYER_ERROR_URL_NOT_FOUND:
472472
strError = _T("PLAYER_ERROR_URL_NOT_FOUND");
473473
break;
474-
case agora::media::PLAYER_ERROR_NONE:
474+
case agora::media::base::PLAYER_ERROR_NONE:
475475
strError = _T("PLAYER_ERROR_NONE");
476476
break;
477-
case agora::media::PLAYER_ERROR_CODEC_NOT_SUPPORTED:
477+
case agora::media::base::PLAYER_ERROR_CODEC_NOT_SUPPORTED:
478478
strError = _T("PLAYER_ERROR_NONE");
479479
break;
480-
case agora::media::PLAYER_ERROR_INVALID_ARGUMENTS:
480+
case agora::media::base::PLAYER_ERROR_INVALID_ARGUMENTS:
481481
strError = _T("PLAYER_ERROR_INVALID_ARGUMENTS");
482482
break;
483-
case agora::media::PLAY_ERROR_SRC_BUFFER_UNDERFLOW:
484-
strError = _T("PLAY_ERROR_SRC_BUFFER_UNDERFLOW");
485-
break;
486-
case agora::media::PLAYER_ERROR_INTERNAL:
483+
484+
case agora::media::base::PLAYER_ERROR_INTERNAL:
487485
strError = _T("PLAYER_ERROR_INTERNAL");
488486
break;
489-
case agora::media::PLAYER_ERROR_INVALID_STATE:
487+
case agora::media::base::PLAYER_ERROR_INVALID_STATE:
490488
strError = _T("PLAYER_ERROR_INVALID_STATE");
491489
break;
492-
case agora::media::PLAYER_ERROR_NO_RESOURCE:
490+
case agora::media::base::PLAYER_ERROR_NO_RESOURCE:
493491
strError = _T("PLAYER_ERROR_NO_RESOURCE");
494492
break;
495-
case agora::media::PLAYER_ERROR_OBJ_NOT_INITIALIZED:
493+
case agora::media::base::PLAYER_ERROR_OBJ_NOT_INITIALIZED:
496494
strError = _T("PLAYER_ERROR_OBJ_NOT_INITIALIZED");
497495
break;
498-
case agora::media::PLAYER_ERROR_INVALID_CONNECTION_STATE:
496+
case agora::media::base::PLAYER_ERROR_INVALID_CONNECTION_STATE:
499497
strError = _T("PLAYER_ERROR_INVALID_CONNECTION_STATE");
500498
break;
501-
case agora::media::PLAYER_ERROR_UNKNOWN_STREAM_TYPE:
499+
case agora::media::base::PLAYER_ERROR_UNKNOWN_STREAM_TYPE:
502500
strError = _T("PLAYER_ERROR_UNKNOWN_STREAM_TYPE");
503501
break;
504-
case agora::media::PLAYER_ERROR_VIDEO_RENDER_FAILED:
502+
case agora::media::base::PLAYER_ERROR_VIDEO_RENDER_FAILED:
505503
strError = _T("PLAYER_ERROR_VIDEO_RENDER_FAILED");
506504
break;
507505
}

windows/APIExample/APIExample/Advanced/MediaPlayer/CAgoraMediaPlayer.h

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class AgoraMediaPlayerEvent : public AgoraRtcChannelPublishHelperObserver
1616
* @param state New player state
1717
* @param ec Player error message
1818
*/
19-
virtual void onPlayerStateChanged(agora::media::MEDIA_PLAYER_STATE state,
20-
agora::media::MEDIA_PLAYER_ERROR ec)
19+
virtual void onPlayerStateChanged(agora::media::base::MEDIA_PLAYER_STATE state,
20+
agora::media::base::MEDIA_PLAYER_ERROR ec)
2121
{
2222

2323
::PostMessage(m_hMsgHanlder, WM_MSGID(mediaPLAYER_STATE_CHANGED), (WPARAM)state, (LPARAM) ec);
@@ -37,7 +37,7 @@ class AgoraMediaPlayerEvent : public AgoraRtcChannelPublishHelperObserver
3737
*
3838
* @param event
3939
*/
40-
virtual void onPlayerEvent(agora::media::MEDIA_PLAYER_EVENT event)
40+
virtual void onPlayerEvent(agora::media::base::MEDIA_PLAYER_EVENT event)
4141
{
4242

4343
};
@@ -49,12 +49,23 @@ class AgoraMediaPlayerEvent : public AgoraRtcChannelPublishHelperObserver
4949
* @param data data
5050
* @param length data length
5151
*/
52-
virtual void onMetadata(agora::media::MEDIA_PLAYER_METADATA_TYPE type, const uint8_t* data,
52+
virtual void onMetadata(agora::media::base::MEDIA_PLAYER_METADATA_TYPE type, const uint8_t* data,
5353
uint32_t length)
5454
{
5555

5656
}
5757

58+
virtual void onPreloadEvent(const char* src, media::base::PLAYER_PRELOAD_EVENT event)override {
59+
60+
}
61+
62+
virtual void onPlayBufferUpdated(int64_t playCachedBuffer) override {
63+
64+
}
65+
66+
virtual void onCompleted() override {
67+
68+
}
5869

5970
private:
6071
HWND m_hMsgHanlder;

windows/APIExample/APIExample/RtcChannelHelperPlugin/AgoraRtcChannelPublishHelper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class AgoraRtcChannelPublishHelperObserver : public agora::rtc::IMediaPlayerObse
1616
* @param state New player state
1717
* @param ec Player error message
1818
*/
19-
virtual void onPlayerStateChanged(agora::media::MEDIA_PLAYER_STATE state,
20-
agora::media::MEDIA_PLAYER_ERROR ec)
19+
virtual void onPlayerStateChanged(agora::media::base::MEDIA_PLAYER_STATE state,
20+
agora::media::base::MEDIA_PLAYER_ERROR ec)
2121
{
2222

2323
}
@@ -36,7 +36,7 @@ class AgoraRtcChannelPublishHelperObserver : public agora::rtc::IMediaPlayerObse
3636
*
3737
* @param event
3838
*/
39-
virtual void onPlayerEvent(agora::media::MEDIA_PLAYER_EVENT event)
39+
virtual void onPlayerEvent(agora::media::base::MEDIA_PLAYER_EVENT event)
4040
{
4141

4242
};
@@ -48,7 +48,7 @@ class AgoraRtcChannelPublishHelperObserver : public agora::rtc::IMediaPlayerObse
4848
* @param data data
4949
* @param length data length
5050
*/
51-
virtual void onMetadata(agora::media::MEDIA_PLAYER_METADATA_TYPE type, const uint8_t* data,
51+
virtual void onMetadata(agora::media::base::MEDIA_PLAYER_METADATA_TYPE type, const uint8_t* data,
5252
uint32_t length)
5353
{
5454

windows/APIExample/APIExample/dsound/DSoundRender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void DSoundRender::Render(BYTE * buffer, int buffer_len)
7979
#ifdef _DEBUG
8080
TCHAR buffer[1024];
8181
#ifdef _UNICODE
82-
swprintf(buffer, _T("offset:%d ,data_len:%d\n"), offset, buffer_len);
82+
swprintf_s(buffer, 1024, _T("offset:%d ,data_len:%d\n"), offset, buffer_len);
8383
#else
8484
sprintf(buffer, _T("offset:%d ,data_len:%d\n"), offset, buffer_len);
8585
#endif // _UNICODE

windows/APIExample/install.ps1

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
$ThirdPartysrc = 'https://agora-adc-artifacts.oss-cn-beijing.aliyuncs.com/libs/ThirdParty.zip'
22
$ThirdPartydes = 'ThirdParty.zip'
3-
$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v3_6_1_FULL.zip'
3+
$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v3_6_1_1_FULL.zip'
4+
$agora_sdk = ''
45
$agora_des = 'Agora_Native_SDK_for_Windows.zip'
5-
$MediaPlayerSDK = 'https://download.agora.io/sdk/release/Agora_Media_Player_for_Windows_x86_32597_20200923_2306.zip'
6+
$MediaPlayerSDK = 'https://download.agora.io/sdk/release/Agora_Media_Player_for_Windows_x86_rel.v1.3.0_63393_ffmpeg_player_lite_20210727_1117.zip'
7+
$MediaPlayerSDK64 = 'https://download.agora.io/sdk/release/Agora_Media_Player_for_Windows_x64_rel.v1.3.0_63392_ffmpeg_player_lite_20210727_1117.zip'
68
$MediaPlayerDes = 'MediaPlayerPartSave.zip'
9+
$MediaPlayerDes64 = 'MediaPlayerPartSave.zip'
710

11+
$arch = $args[0]
812

913
if (-not (Test-Path ThirdParty)){
1014
echo "download $ThirdPartydes"
@@ -27,15 +31,26 @@ if (-not (Test-Path libs)){
2731
Remove-Item Agora_Native_SDK_for_Windows_FULL -Recurse
2832
}
2933

30-
31-
if (-not (Test-Path MediaPlayerPart)){
32-
echo "download $MediaPlayerSDK"
33-
mkdir MediaPlayerPart
34-
(New-Object System.Net.WebClient).DownloadFile($MediaPlayerSDK,$MediaPlayerDes)
35-
Unblock-File $MediaPlayerDes
36-
Expand-Archive -Path $MediaPlayerDes -DestinationPath . -Force
37-
Move-Item Agora_Media_Player_for_Windows_x86_tongjiangyong_32597_20200923_2306\sdk\* MediaPlayerPart
38-
Remove-Item $MediaPlayerDes -Recurse
39-
Remove-Item Agora_Media_Player_for_Windows_x86_tongjiangyong_32597_20200923_2306 -Recurse
40-
}
41-
34+
if($arch -eq 'x64'){
35+
if (-not (Test-Path MediaPlayerPart64)){
36+
echo "download $MediaPlayerSDK64"
37+
mkdir MediaPlayerPart64
38+
(New-Object System.Net.WebClient).DownloadFile($MediaPlayerSDK64,$MediaPlayerDes)
39+
Unblock-File $MediaPlayerDes
40+
Expand-Archive -Path $MediaPlayerDes -DestinationPath . -Force
41+
Move-Item Agora_Media_Player_for_Windows_x64_rel.v1.3.0_63392_ffmpeg_player_lite_20210727_1117\sdk\* MediaPlayerPart64
42+
Remove-Item $MediaPlayerDes -Recurse
43+
Remove-Item Agora_Media_Player_for_Windows_x64_rel.v1.3.0_63392_ffmpeg_player_lite_20210727_1117 -Recurse
44+
}
45+
}else{
46+
if (-not (Test-Path MediaPlayerPart)){
47+
echo "download $MediaPlayerSDK"
48+
mkdir MediaPlayerPart
49+
(New-Object System.Net.WebClient).DownloadFile($MediaPlayerSDK,$MediaPlayerDes)
50+
Unblock-File $MediaPlayerDes
51+
Expand-Archive -Path $MediaPlayerDes -DestinationPath . -Force
52+
Move-Item Agora_Media_Player_for_Windows_x86_rel.v1.3.0_63393_ffmpeg_player_lite_20210727_1117\sdk\* MediaPlayerPart
53+
Remove-Item $MediaPlayerDes -Recurse
54+
Remove-Item Agora_Media_Player_for_Windows_x86_rel.v1.3.0_63393_ffmpeg_player_lite_20210727_1117 -Recurse
55+
}
56+
}

windows/APIExample/installThirdParty.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ if not exist .\libs (
77
)
88

99
powershell.exe -command ^
10-
"& {set-executionpolicy Remotesigned -Scope Process; ./'install.ps1'}"
10+
"& {set-executionpolicy Remotesigned -Scope Process; ./'install.ps1' '%1'}"

0 commit comments

Comments
 (0)