Skip to content

Commit 30d4af2

Browse files
committed
update media palyer
Former-commit-id: 31198af
2 parents de91b28 + 21a91ad commit 30d4af2

38 files changed

Lines changed: 4507 additions & 716 deletions

windows/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,5 @@ paket-files/
257257
libs/
258258

259259
ThirdParty/
260+
261+
MediaPlayerPart/

windows/APIExample/APIExample/APIExample.rc

Lines changed: 73 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ BEGIN
128128
PUSHBUTTON "RemoveStream",IDC_BUTTON_REMOVE_STREAM,307,370,62,14
129129
PUSHBUTTON "RemoveAll",IDC_BUTTON_REMOVE_ALLSTREAM,376,370,55,15
130130
LTEXT "",IDC_STATIC_DETAIL,442,325,181,58
131+
CONTROL "Check1",IDC_CHK_TRANS_CODING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,373,349,63,10
131132
END
132133

133134
IDD_DIALOG_METADATA DIALOGEX 0, 0, 632, 400
@@ -156,20 +157,20 @@ BEGIN
156157
LTEXT "Channel Name",IDC_STATIC_CHANNELNAME,11,319,48,8
157158
EDITTEXT IDC_EDIT_CHANNELNAME,71,317,182,13,ES_AUTOHSCROLL
158159
PUSHBUTTON "JoinChannel",IDC_BUTTON_JOINCHANNEL,265,317,50,14
159-
LTEXT "Window HWND",IDC_STATIC_SCREEN_CAPTURE,10,340,54,8
160+
LTEXT "Window HWND",IDC_STATIC_SCREEN_CAPTURE,11,340,54,8
160161
PUSHBUTTON "Share Window",IDC_BUTTON_START_CAPUTRE,265,338,50,14
161162
COMBOBOX IDC_COMBO_SCREEN_CAPTURE,71,338,181,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
162163
LTEXT "",IDC_STATIC_DETAIL,487,321,136,62
163-
CONTROL "Share Cursor",IDC_CHECK_CURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,325,346,58,10
164+
CONTROL "Share Cursor",IDC_CHECK_CURSOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,325,345,58,10
164165
GROUPBOX "General Settings",IDC_STATIC_GENERAL,323,312,161,46
165-
LTEXT "FPS",IDC_STATIC_FPS,325,325,14,10
166-
EDITTEXT IDC_EDIT_FPS,342,325,55,12,ES_AUTOHSCROLL
166+
LTEXT "FPS",IDC_STATIC_FPS,325,325,21,10
167+
EDITTEXT IDC_EDIT_FPS,348,323,55,12,ES_AUTOHSCROLL
167168
LTEXT "bitrate",IDC_STATIC_BITRATE,406,325,27,9
168-
EDITTEXT IDC_EDIT_BITRATE,433,322,46,14,ES_AUTOHSCROLL
169+
EDITTEXT IDC_EDIT_BITRATE,433,323,46,14,ES_AUTOHSCROLL
169170
PUSHBUTTON "Update Calpture Param",IDC_BUTTON_UPDATEPARAM,391,342,89,14
170-
LTEXT "Screen",IDC_STATIC_SCREEN_SHARE,8,361,48,8
171-
COMBOBOX IDC_COMBO_SCREEN_SCREEN,69,359,181,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
172-
PUSHBUTTON "Share Screen",IDC_BUTTON_START_SHARE_SCREEN,264,357,50,14
171+
LTEXT "Screen",IDC_STATIC_SCREEN_SHARE,11,359,48,8
172+
COMBOBOX IDC_COMBO_SCREEN_SCREEN,71,359,181,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
173+
PUSHBUTTON "Share Screen",IDC_BUTTON_START_SHARE_SCREEN,265,357,50,14
173174
LTEXT "",IDC_STATIC_SCREEN_INFO,8,382,305,8
174175
LTEXT "",IDC_STATIC_SCREEN_INFO2,325,360,151,37
175176
END
@@ -293,7 +294,7 @@ BEGIN
293294
LTEXT "",IDC_STATIC_DETAIL,442,325,181,58
294295
END
295296

296-
IDD_DIALOG_ORIGINAL_AUDIO DIALOGEX 0, 0, 632, 400
297+
IDD_DIALOG_CUSTOM_ENCRYPT DIALOGEX 0, 0, 632, 400
297298
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
298299
FONT 8, "MS Shell Dlg", 400, 0, 0x1
299300
BEGIN
@@ -302,10 +303,46 @@ BEGIN
302303
LTEXT "Channel Name",IDC_STATIC_CHANNELNAME,11,328,48,8
303304
EDITTEXT IDC_EDIT_CHANNELNAME,71,326,218,13,ES_AUTOHSCROLL
304305
PUSHBUTTON "JoinChannel",IDC_BUTTON_JOINCHANNEL,307,326,50,14
305-
LTEXT "Caputre Video",IDC_STATIC_ORIGINAL_AUDIO_PROC,12,353,48,8
306-
PUSHBUTTON "Start Capture",IDC_BUTTON_SET_ORIGINAL_PROC,307,353,50,14
307-
COMBOBOX IDC_COMBO_ORIGINAL_AUDIO_PROC,71,353,218,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
306+
LTEXT "Caputre Video",IDC_STATIC_CUSTOM_ENCRYPT,12,353,48,8
307+
PUSHBUTTON "Start Capture",IDC_BUTTON_SET_CUSTOM_ENCRYPT,307,353,50,14
308+
COMBOBOX IDC_COMBO_CUSTOM_ENCRYPT,71,353,218,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
309+
LTEXT "",IDC_STATIC_DETAIL,442,325,181,58
310+
END
311+
312+
IDD_DIALOG_ORIGINAL_AUDIO_ DIALOGEX 0, 0, 632, 400
313+
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
314+
FONT 8, "MS Shell Dlg", 400, 0, 0x1
315+
BEGIN
316+
LTEXT "",IDC_STATIC_VIDEO,1,0,483,310,NOT WS_VISIBLE
317+
LTEXT "Channel Name",IDC_STATIC_CHANNELNAME,11,328,48,8
318+
EDITTEXT IDC_EDIT_CHANNELNAME,71,326,218,13,ES_AUTOHSCROLL
319+
PUSHBUTTON "JoinChannel",IDC_BUTTON_JOINCHANNEL,307,326,50,14
320+
LTEXT "Caputre Video",IDC_STATIC_ORIGINAL_AUDIO,12,353,48,8
321+
COMBOBOX IDC_COMBO_ORIGINAL_AUDIO,71,353,218,30,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
322+
LTEXT "",IDC_STATIC_DETAIL,442,325,181,58
323+
PUSHBUTTON "JoinChannel",IDC_BUTTON_SET_AUDIO_PROC,308,354,50,14
324+
LISTBOX IDC_LIST_INFO_BROADCASTING,491,0,139,312,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
325+
END
326+
327+
IDD_DIALOG_MEDIA_PLAYER DIALOGEX 0, 0, 632, 400
328+
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
329+
FONT 8, "MS Shell Dlg", 400, 0, 0x1
330+
BEGIN
331+
LTEXT "",IDC_STATIC_VIDEO,1,0,483,310,NOT WS_VISIBLE
332+
LISTBOX IDC_LIST_INFO_BROADCASTING,491,0,139,312,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
333+
LTEXT "Channel Name",IDC_STATIC_CHANNELNAME,11,328,48,8
334+
EDITTEXT IDC_EDIT_CHANNELNAME,70,326,218,13,ES_AUTOHSCROLL
335+
PUSHBUTTON "JoinChannel",IDC_BUTTON_JOINCHANNEL,307,326,60,14
308336
LTEXT "",IDC_STATIC_DETAIL,442,325,181,58
337+
LTEXT "video source",IDC_STATIC_VIDEO_SOURCE,11,347,48,8
338+
EDITTEXT IDC_EDIT_VIDEO_SOURCE,70,346,218,13,ES_AUTOHSCROLL
339+
PUSHBUTTON "open",IDC_BUTTON_OPEN,306,346,60,14
340+
PUSHBUTTON "stop",IDC_BUTTON_STOP,9,363,60,14
341+
PUSHBUTTON "play",IDC_BUTTON_PLAY,76,363,60,14
342+
PUSHBUTTON "attch player",IDC_BUTTON_ATTACH,143,363,60,14
343+
PUSHBUTTON "publish video",IDC_BUTTON_PUBLISH_VIDEO,212,363,60,14
344+
PUSHBUTTON "publish audio",IDC_BUTTON_PUBLISH_AUDIO,280,363,60,14
345+
CONTROL "",IDC_SLIDER_VIDEO,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,10,377,355,15
309346
END
310347

311348

@@ -390,7 +427,19 @@ BEGIN
390427
BOTTOMMARGIN, 397
391428
END
392429

393-
IDD_DIALOG_ORIGINAL_AUDIO, DIALOG
430+
IDD_DIALOG_CUSTOM_ENCRYPT, DIALOG
431+
BEGIN
432+
RIGHTMARGIN, 630
433+
BOTTOMMARGIN, 397
434+
END
435+
436+
IDD_DIALOG_ORIGINAL_AUDIO_, DIALOG
437+
BEGIN
438+
RIGHTMARGIN, 630
439+
BOTTOMMARGIN, 397
440+
END
441+
442+
IDD_DIALOG_MEDIA_PLAYER, DIALOG
394443
BEGIN
395444
RIGHTMARGIN, 630
396445
BOTTOMMARGIN, 397
@@ -464,7 +513,17 @@ BEGIN
464513
0
465514
END
466515

467-
IDD_DIALOG_ORIGINAL_AUDIO AFX_DIALOG_LAYOUT
516+
IDD_DIALOG_CUSTOM_ENCRYPT AFX_DIALOG_LAYOUT
517+
BEGIN
518+
0
519+
END
520+
521+
IDD_DIALOG_ORIGINAL_AUDIO_ AFX_DIALOG_LAYOUT
522+
BEGIN
523+
0
524+
END
525+
526+
IDD_DIALOG_MEDIA_PLAYER AFX_DIALOG_LAYOUT
468527
BEGIN
469528
0
470529
END

windows/APIExample/APIExample/APIExample.vcxproj

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,14 @@
9494
<Optimization>Disabled</Optimization>
9595
<SDLCheck>false</SDLCheck>
9696
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
97-
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir)</AdditionalIncludeDirectories>
97+
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir);$(ProjectDir)RtcChannelHelperPlugin;$(solutionDir)MediaPlayerPart\include</AdditionalIncludeDirectories>
9898
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
9999
</ClCompile>
100100
<Link>
101101
<SubSystem>Windows</SubSystem>
102-
<AdditionalLibraryDirectories>$(SolutionDir)libs\x86;$(SolutionDir)ThirdParty\libyuv\debug;$(SolutionDir)ThirdParty\DShow</AdditionalLibraryDirectories>
102+
<AdditionalLibraryDirectories>$(SolutionDir)libs\x86;$(SolutionDir)ThirdParty\libyuv\debug;$(SolutionDir)ThirdParty\DShow;$(SolutionDir)MediaPlayerPart\lib</AdditionalLibraryDirectories>
103103
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
104+
<AdditionalDependencies>AgoraMediaPlayer.lib;%(AdditionalDependencies)</AdditionalDependencies>
104105
</Link>
105106
<Midl>
106107
<MkTypLibCompatible>false</MkTypLibCompatible>
@@ -115,7 +116,8 @@
115116
<PostBuildEvent>
116117
<Command>if exist $(SolutionDir)libs (copy $(SolutionDir)libs\x86\agora_rtc_sdk.dll $(SolutionDir)$(Configuration))
117118
if exist zh-cn.ini (copy zh-cn.ini $(SolutionDir)$(Configuration))
118-
if exist en.ini (copy en.ini $(SolutionDir)$(Configuration))</Command>
119+
if exist en.ini (copy en.ini $(SolutionDir)$(Configuration))
120+
if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\AgoraMediaPlayer.dll $(SolutionDir)$(Configuration))</Command>
119121
</PostBuildEvent>
120122
<Manifest>
121123
<AdditionalManifestFiles>
@@ -171,15 +173,16 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
171173
<IntrinsicFunctions>true</IntrinsicFunctions>
172174
<SDLCheck>false</SDLCheck>
173175
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);</PreprocessorDefinitions>
174-
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir)</AdditionalIncludeDirectories>
176+
<AdditionalIncludeDirectories>$(SolutionDir)libs\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir);$(ProjectDir)RtcChannelHelperPlugin;$(solutionDir)MediaPlayerPart\include</AdditionalIncludeDirectories>
175177
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
176178
</ClCompile>
177179
<Link>
178180
<SubSystem>Windows</SubSystem>
179181
<EnableCOMDATFolding>true</EnableCOMDATFolding>
180182
<OptimizeReferences>true</OptimizeReferences>
181-
<AdditionalLibraryDirectories>$(SolutionDir)libs\x86;$(SolutionDir)ThirdParty\libyuv\release;$(SolutionDir)ThirdParty\DShow</AdditionalLibraryDirectories>
183+
<AdditionalLibraryDirectories>$(SolutionDir)libs\x86;$(SolutionDir)ThirdParty\libyuv\release;$(SolutionDir)ThirdParty\DShow;$(SolutionDir)MediaPlayerPart\lib</AdditionalLibraryDirectories>
182184
<IgnoreSpecificDefaultLibraries>libcmt.lib</IgnoreSpecificDefaultLibraries>
185+
<AdditionalDependencies>AgoraMediaPlayer.lib;</AdditionalDependencies>
183186
</Link>
184187
<Midl>
185188
<MkTypLibCompatible>false</MkTypLibCompatible>
@@ -195,7 +198,7 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
195198
<Command>if exist $(SolutionDir)libs (copy $(SolutionDir)libs\x86\agora_rtc_sdk.dll $(SolutionDir)$(Configuration))
196199
if exist zh-cn.ini (copy zh-cn.ini $(SolutionDir)$(Configuration))
197200
if exist en.ini (copy en.ini $(SolutionDir)$(Configuration))
198-
</Command>
201+
if exist $(SolutionDir)MediaPlayerPart (copy $(SolutionDir)MediaPlayerPart\dll\AgoraMediaPlayer.dll $(SolutionDir)$(Configuration))</Command>
199202
</PostBuildEvent>
200203
<ManifestResourceCompile>
201204
<ResourceOutputFileName>
@@ -250,7 +253,9 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
250253
<ClInclude Include="Advanced\BeautyAudio\CAgoraBeautyAudio.h" />
251254
<ClInclude Include="Advanced\Beauty\CAgoraBeautyDlg.h" />
252255
<ClInclude Include="Advanced\CustomAudioCapture\CAgoraCaptureAudioDlg.h" />
256+
<ClInclude Include="Advanced\CustomEncrypt\CAgoraCustomEncryptDlg.h" />
253257
<ClInclude Include="Advanced\CustomVideoCapture\CAgoraCaptureVideoDlg.h" />
258+
<ClInclude Include="Advanced\MeidaPlayer\CAgoraMediaPlayer.h" />
254259
<ClInclude Include="Advanced\OriginalAudio\CAgoraOriginalAudioDlg.h" />
255260
<ClInclude Include="Advanced\OriginalVideo\CAgoraOriginalVideoDlg.h" />
256261
<ClInclude Include="Advanced\RTMPinject\AgoraRtmpInjectionDlg.h" />
@@ -272,6 +277,13 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
272277
<ClInclude Include="DirectShow\IAGDShowDevice.h" />
273278
<ClInclude Include="Language.h" />
274279
<ClInclude Include="Resource.h" />
280+
<ClInclude Include="RtcChannelHelperPlugin\AgoraRtcChannelPublishHelper.h" />
281+
<ClInclude Include="RtcChannelHelperPlugin\utils\AudioCircularBuffer.h" />
282+
<ClInclude Include="RtcChannelHelperPlugin\utils\constructor_magic.h" />
283+
<ClInclude Include="RtcChannelHelperPlugin\utils\ExtendAudioFrameObserver.h" />
284+
<ClInclude Include="RtcChannelHelperPlugin\utils\scoped_ptr.h" />
285+
<ClInclude Include="RtcChannelHelperPlugin\utils\template_util.h" />
286+
<ClInclude Include="RtcChannelHelperPlugin\utils\typedefs.h" />
275287
<ClInclude Include="stdafx.h" />
276288
<ClInclude Include="targetver.h" />
277289
</ItemGroup>
@@ -281,7 +293,9 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
281293
<ClCompile Include="Advanced\BeautyAudio\CAgoraBeautyAudio.cpp" />
282294
<ClCompile Include="Advanced\Beauty\CAgoraBeautyDlg.cpp" />
283295
<ClCompile Include="Advanced\CustomAudioCapture\CAgoraCaptureAudioDlg.cpp" />
296+
<ClCompile Include="Advanced\CustomEncrypt\CAgoraCustomEncryptDlg.cpp" />
284297
<ClCompile Include="Advanced\CustomVideoCapture\CAgoraCaptureVideoDlg.cpp" />
298+
<ClCompile Include="Advanced\MeidaPlayer\CAgoraMediaPlayer.cpp" />
285299
<ClCompile Include="Advanced\OriginalAudio\CAgoraOriginalAudioDlg.cpp" />
286300
<ClCompile Include="Advanced\OriginalVideo\CAgoraOriginalVideoDlg.cpp" />
287301
<ClCompile Include="Advanced\RTMPinject\AgoraRtmpInjectionDlg.cpp" />
@@ -312,6 +326,9 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
312326
<ClCompile Include="DirectShow\DShowHelper.cpp">
313327
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
314328
</ClCompile>
329+
<ClCompile Include="RtcChannelHelperPlugin\AgoraRtcChannelPublishHelper.cpp" />
330+
<ClCompile Include="RtcChannelHelperPlugin\utils\AudioCircularBuffer.cc" />
331+
<ClCompile Include="RtcChannelHelperPlugin\utils\ExtendAudioFrameObserver.cpp" />
315332
<ClCompile Include="stdafx.cpp">
316333
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
317334
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>

windows/APIExample/APIExample/APIExample.vcxproj.filters

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@
6161
<Filter Include="Advanced\OriginalAudio">
6262
<UniqueIdentifier>{7c921065-1d3e-4f12-8d92-5770ca80d3bd}</UniqueIdentifier>
6363
</Filter>
64+
<Filter Include="Advanced\CustomEncrypt">
65+
<UniqueIdentifier>{c39d4662-1f18-4664-bcc6-d92fa51d6af5}</UniqueIdentifier>
66+
</Filter>
67+
<Filter Include="MeidaPlayer">
68+
<UniqueIdentifier>{c4034334-7c64-4bd9-8952-a453a8220c35}</UniqueIdentifier>
69+
</Filter>
70+
<Filter Include="Advanced\MeidaPlayer">
71+
<UniqueIdentifier>{6e290d1d-4cb6-4ceb-83fb-f2a1f5dfc712}</UniqueIdentifier>
72+
</Filter>
6473
</ItemGroup>
6574
<ItemGroup>
6675
<ClInclude Include="APIExample.h">
@@ -150,6 +159,33 @@
150159
<ClInclude Include="Advanced\OriginalAudio\CAgoraOriginalAudioDlg.h">
151160
<Filter>Advanced\OriginalAudio</Filter>
152161
</ClInclude>
162+
<ClInclude Include="Advanced\CustomEncrypt\CAgoraCustomEncryptDlg.h">
163+
<Filter>Advanced\CustomEncrypt</Filter>
164+
</ClInclude>
165+
<ClInclude Include="RtcChannelHelperPlugin\AgoraRtcChannelPublishHelper.h">
166+
<Filter>MeidaPlayer</Filter>
167+
</ClInclude>
168+
<ClInclude Include="RtcChannelHelperPlugin\utils\AudioCircularBuffer.h">
169+
<Filter>MeidaPlayer</Filter>
170+
</ClInclude>
171+
<ClInclude Include="RtcChannelHelperPlugin\utils\constructor_magic.h">
172+
<Filter>MeidaPlayer</Filter>
173+
</ClInclude>
174+
<ClInclude Include="RtcChannelHelperPlugin\utils\ExtendAudioFrameObserver.h">
175+
<Filter>MeidaPlayer</Filter>
176+
</ClInclude>
177+
<ClInclude Include="RtcChannelHelperPlugin\utils\scoped_ptr.h">
178+
<Filter>MeidaPlayer</Filter>
179+
</ClInclude>
180+
<ClInclude Include="RtcChannelHelperPlugin\utils\template_util.h">
181+
<Filter>MeidaPlayer</Filter>
182+
</ClInclude>
183+
<ClInclude Include="RtcChannelHelperPlugin\utils\typedefs.h">
184+
<Filter>MeidaPlayer</Filter>
185+
</ClInclude>
186+
<ClInclude Include="Advanced\MeidaPlayer\CAgoraMediaPlayer.h">
187+
<Filter>Advanced\MeidaPlayer</Filter>
188+
</ClInclude>
153189
</ItemGroup>
154190
<ItemGroup>
155191
<ClCompile Include="APIExample.cpp">
@@ -227,6 +263,21 @@
227263
<ClCompile Include="Advanced\OriginalAudio\CAgoraOriginalAudioDlg.cpp">
228264
<Filter>Advanced\OriginalAudio</Filter>
229265
</ClCompile>
266+
<ClCompile Include="Advanced\CustomEncrypt\CAgoraCustomEncryptDlg.cpp">
267+
<Filter>Advanced\CustomEncrypt</Filter>
268+
</ClCompile>
269+
<ClCompile Include="RtcChannelHelperPlugin\AgoraRtcChannelPublishHelper.cpp">
270+
<Filter>MeidaPlayer</Filter>
271+
</ClCompile>
272+
<ClCompile Include="RtcChannelHelperPlugin\utils\AudioCircularBuffer.cc">
273+
<Filter>MeidaPlayer</Filter>
274+
</ClCompile>
275+
<ClCompile Include="RtcChannelHelperPlugin\utils\ExtendAudioFrameObserver.cpp">
276+
<Filter>MeidaPlayer</Filter>
277+
</ClCompile>
278+
<ClCompile Include="Advanced\MeidaPlayer\CAgoraMediaPlayer.cpp">
279+
<Filter>Advanced\MeidaPlayer</Filter>
280+
</ClCompile>
230281
</ItemGroup>
231282
<ItemGroup>
232283
<ResourceCompile Include="APIExample.rc">

windows/APIExample/APIExample/APIExampleDlg.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ void CAPIExampleDlg::InitSceneDialog()
224224
m_vecAdvanced.push_back(advancedOriginalVideo);
225225
m_vecAdvanced.push_back(advancedCustomAudioCapture);
226226
m_vecAdvanced.push_back(advancedOriginalAudio);
227-
227+
m_vecAdvanced.push_back(advancedCustomEncrypt);
228+
m_vecAdvanced.push_back(advancedMediaPlayer);
228229
//inject
229230
m_pRtmpInjectDlg = new CAgoraRtmpInjectionDlg(&m_staMainArea);
230231
m_pRtmpInjectDlg->Create(CAgoraRtmpInjectionDlg::IDD);
@@ -284,6 +285,15 @@ void CAPIExampleDlg::InitSceneDialog()
284285
m_pOriginalAudioDlg->Create(CAgoraOriginalAudioDlg::IDD);
285286
m_pOriginalAudioDlg->MoveWindow(&rcWnd);
286287

288+
//custom encrypt
289+
m_pCustomEncryptDlg = new CAgoraCustomEncryptDlg(&m_staMainArea);
290+
m_pCustomEncryptDlg->Create(CAgoraCustomEncryptDlg::IDD);
291+
m_pCustomEncryptDlg->MoveWindow(&rcWnd);
292+
293+
//media player
294+
m_pMeidaPlayerDlg = new CAgoraMediaPlayer(&m_staMainArea);
295+
m_pMeidaPlayerDlg->Create(CAgoraMediaPlayer::IDD);
296+
m_pMeidaPlayerDlg->MoveWindow(&rcWnd);
287297
}
288298

289299
void CAPIExampleDlg::InitSceneList()
@@ -448,6 +458,12 @@ void CAPIExampleDlg::CreateScene(CTreeCtrl& treeScene, CString selectedText)
448458
}else if (selectedText.Compare(advancedOriginalAudio) == 0) {
449459
m_pOriginalAudioDlg->InitAgora();
450460
m_pOriginalAudioDlg->ShowWindow(SW_SHOW);
461+
}else if (selectedText.Compare(advancedCustomEncrypt) == 0) {
462+
m_pCustomEncryptDlg->InitAgora();
463+
m_pCustomEncryptDlg->ShowWindow(SW_SHOW);
464+
}else if (selectedText.Compare(advancedMediaPlayer) == 0) {
465+
m_pMeidaPlayerDlg->InitAgora();
466+
m_pMeidaPlayerDlg->ShowWindow(SW_SHOW);
451467
}
452468
}
453469

@@ -494,6 +510,12 @@ void CAPIExampleDlg::ReleaseScene(CTreeCtrl& treeScene, HTREEITEM& hSelectItem)
494510
}else if (str.Compare(advancedOriginalAudio) == 0) {
495511
m_pOriginalAudioDlg->UnInitAgora();
496512
m_pOriginalAudioDlg->ShowWindow(SW_HIDE);
513+
}else if (str.Compare(advancedCustomEncrypt) == 0) {
514+
m_pCustomEncryptDlg->UnInitAgora();
515+
m_pCustomEncryptDlg->ShowWindow(SW_HIDE);
516+
}else if (str.Compare(advancedMediaPlayer) == 0) {
517+
m_pMeidaPlayerDlg->UnInitAgora();
518+
m_pMeidaPlayerDlg->ShowWindow(SW_HIDE);
497519
}
498520
}
499521

windows/APIExample/APIExample/APIExampleDlg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#include "Advanced/AudioMixing/CAgoraAudioMixingDlg.h"
1717
#include "Advanced/OriginalVideo/CAgoraOriginalVideoDlg.h"
1818
#include "Advanced/OriginalAudio/CAgoraOriginalAudioDlg.h"
19+
#include "Advanced/CustomEncrypt/CAgoraCustomEncryptDlg.h"
20+
#include "Advanced/MeidaPlayer/CAgoraMediaPlayer.h"
21+
1922

2023

2124
#include <vector>
@@ -75,6 +78,8 @@ class CAPIExampleDlg : public CDialogEx
7578
CAgoraAudioMixingDlg *m_pAudioMixingDlg = nullptr;
7679
CAgoraOriginalVideoDlg *m_pOriginalVideoDlg = nullptr;
7780
CAgoraOriginalAudioDlg *m_pOriginalAudioDlg = nullptr;
81+
CAgoraCustomEncryptDlg *m_pCustomEncryptDlg = nullptr;
82+
CAgoraMediaPlayer *m_pMeidaPlayerDlg = nullptr;
7883
CString m_preSelectedItemText = _T("");
7984
std::vector<CString> m_vecBasic, m_vecAdvanced;
8085

windows/APIExample/APIExample/Advanced/CustomAudioCapture/CAgoraCaptureAudioDlg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class CAgoraCaptureAduioDlgEngineEventHandler : public IRtcEngineEventHandler {
103103
the total call time, the data traffic sent and received by THE SDK and other
104104
information. The App obtains the call duration and data statistics received
105105
or sent by the SDK through this callback.
106-
parametes:
106+
parameters:
107107
stats: Call statistics.
108108
*/
109109
virtual void onLeaveChannel(const RtcStats& stats) override;

0 commit comments

Comments
 (0)