diff --git a/windows/APIExample/APIExample/APIExample.rc b/windows/APIExample/APIExample/APIExample.rc
index fb7ec45bc..7621d33ff 100755
--- a/windows/APIExample/APIExample/APIExample.rc
+++ b/windows/APIExample/APIExample/APIExample.rc
@@ -752,6 +752,20 @@ BEGIN
EDITTEXT IDC_EDIT_TOKEN,69,363,128,29,ES_AUTOHSCROLL
END
+IDD_DIALOG_TRANSPARENT_BG DIALOGEX 0, 0, 632, 400
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ LTEXT "Channel Name",IDC_STATIC_CHANNELNAME,136,360,48,8
+ EDITTEXT IDC_EDIT_CHANNELNAME,216,358,172,13,ES_AUTOHSCROLL
+ PUSHBUTTON "JoinChannel",IDC_BUTTON_JOINCHANNEL,420,358,75,14
+ LTEXT "",IDC_STATIC_DETAIL,23,370,412,27
+ LTEXT "",IDC_STATIC_VIDEO,0,0,419,147
+ LTEXT "",IDC_STATIC_VIDEO_RIGHT,233,175,176,136
+ LTEXT "",IDC_STATIC_VIDEO_LEFT,2,173,171,136
+ LISTBOX IDC_LIST_INFO_BROADCASTING,491,0,139,312,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+END
+
/////////////////////////////////////////////////////////////////////////////
//
@@ -907,6 +921,14 @@ BEGIN
HORZGUIDE, 163
END
+ IDD_DIALOG_VOLUME, DIALOG
+ BEGIN
+ END
+
+ IDD_DIALOG_PEPORT_IN_CALL, DIALOG
+ BEGIN
+ END
+
IDD_DIALOG_REGIONAL_CONNECTION, DIALOG
BEGIN
END
@@ -1048,6 +1070,12 @@ BEGIN
HORZGUIDE, 348
HORZGUIDE, 363
END
+
+ IDD_DIALOG_TRANSPARENT_BG, DIALOG
+ BEGIN
+ RIGHTMARGIN, 630
+ BOTTOMMARGIN, 397
+ END
END
#endif // APSTUDIO_INVOKED
@@ -1187,6 +1215,11 @@ BEGIN
0
END
+IDD_DIALOG_TRANSPARENT_BG AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/windows/APIExample/APIExample/APIExample.vcxproj b/windows/APIExample/APIExample/APIExample.vcxproj
index ae9d15a06..ca7174446 100644
--- a/windows/APIExample/APIExample/APIExample.vcxproj
+++ b/windows/APIExample/APIExample/APIExample.vcxproj
@@ -94,7 +94,7 @@
Level3
Disabled
false
- WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions);
+ WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
$(solutionDir)ThirdParty\libFFmpeg\include;$(solutionDir)ThirdParty\Boost;$(SolutionDir)sdk\high_level_api\include;$(solutionDir)ThirdParty\libYUV;$(ProjectDir)
MultiThreadedDLL
@@ -121,7 +121,8 @@ if exist zh-cn.ini (copy zh-cn.ini $(SolutionDir)$(Configuration))
if exist en.ini (copy en.ini $(SolutionDir)$(Configuration))
copy $(SolutionDir)APIExample\Advanced\LocalVideoTranscoding\agora.png $(SolutionDir)$(Configuration)
copy $(SolutionDir)APIExample\Advanced\LocalVideoTranscoding\agora.jpg $(SolutionDir)$(Configuration)
-if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Configuration))
+if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Configuration))
+if exist $(SolutionDir)APIExample\res\yuvj_full_range_alpha_1280_540_left.mp4 (copy $(SolutionDir)APIExample\res\yuvj_full_range_alpha_1280_540_left.mp4 $(SolutionDir)$(Configuration))
@@ -167,6 +168,7 @@ if exist en.ini (copy en.ini $(SolutionDir)$(Platform)\$(Configuration))
copy $(SolutionDir)APIExample\Advanced\LocalVideoTranscoding\agora.png $(SolutionDir)$(Platform)\$(Configuration)
copy $(SolutionDir)APIExample\Advanced\LocalVideoTranscoding\agora.jpg $(SolutionDir)$(Platform)\$(Configuration)
if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)$(Configuration))
+if exist $(SolutionDir)APIExample\res\yuvj_full_range_alpha_1280_540_left.mp4 (copy $(SolutionDir)APIExample\res\yuvj_full_range_alpha_1280_540_left.mp4 $(SolutionDir)$(Configuration))
@@ -267,6 +269,7 @@ if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)\$(Configuration))
+
@@ -295,6 +298,7 @@ if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)\$(Configuration))
+
@@ -319,6 +323,7 @@ if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)\$(Configuration))
+
@@ -347,6 +352,7 @@ if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)\$(Configuration))
+
@@ -395,6 +401,7 @@ if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)\$(Configuration))
Document
+
@@ -418,6 +425,7 @@ if exist sample.yuv (copy sample.yuv $(SolutionDir)$(Platform)\$(Configuration))
Document
+
diff --git a/windows/APIExample/APIExample/APIExample.vcxproj.filters b/windows/APIExample/APIExample/APIExample.vcxproj.filters
index de1e3f9ea..a16906e88 100644
--- a/windows/APIExample/APIExample/APIExample.vcxproj.filters
+++ b/windows/APIExample/APIExample/APIExample.vcxproj.filters
@@ -112,6 +112,9 @@
{ed782797-3b06-44a9-8894-6b9d93d0dfea}
+
+ {2a74c488-9982-4577-8594-8320c71beb6d}
+
@@ -264,6 +267,12 @@
Advanced\Metadata
+
+ Advanced\TransparentBg
+
+
+ Header Files
+
@@ -404,6 +413,12 @@
Advanced\Metadata
+
+ Advanced\TransparentBg
+
+
+ Source Files
+
@@ -420,6 +435,9 @@
Resource Files
+
+ Resource Files
+
@@ -442,6 +460,9 @@
Resource Files
+
+ Resource Files
+
diff --git a/windows/APIExample/APIExample/APIExampleDlg.cpp b/windows/APIExample/APIExample/APIExampleDlg.cpp
index 7281c0795..959268f1f 100755
--- a/windows/APIExample/APIExample/APIExampleDlg.cpp
+++ b/windows/APIExample/APIExample/APIExampleDlg.cpp
@@ -255,6 +255,9 @@ void CAPIExampleDlg::InitSceneDialog()
m_pMultiChannelDlg->Create(CAgoraMultiChannelDlg::IDD);
m_pMultiChannelDlg->MoveWindow(&rcWnd);
+ //transparent bg
+ m_vecAdvanced.push_back(TransparentBackground);
+
//inject
m_pRtmpInjectDlg = new CAgoraRtmpInjectionDlg(&m_staMainArea);
m_pRtmpInjectDlg->Create(CAgoraRtmpInjectionDlg::IDD);
@@ -382,6 +385,12 @@ void CAPIExampleDlg::InitSceneDialog()
m_pMultiVideoSourceTracks = new MultiVideoSourceTracks(&m_staMainArea);
m_pMultiVideoSourceTracks->Create(MultiVideoSourceTracks::IDD);
m_pMultiVideoSourceTracks->MoveWindow(&rcWnd);
+
+ // transparent bg
+ m_TransparentDlg = new CTransparentBgDlg(&m_staMainArea);
+ m_TransparentDlg->Create(CTransparentBgDlg::IDD);
+ m_TransparentDlg->MoveWindow(&rcWnd);
+
}
void CAPIExampleDlg::InitSceneList()
@@ -604,6 +613,10 @@ void CAPIExampleDlg::CreateScene(CTreeCtrl& treeScene, CString selectedText)
m_pmediaRecorderDlg->InitAgora();
m_pmediaRecorderDlg->ShowWindow(SW_SHOW);
}
+ else if (selectedText.Compare(TransparentBackground) == 0) {
+ m_TransparentDlg->InitAgora();
+ m_TransparentDlg->ShowWindow(SW_SHOW);
+ }
//Sleep(500);
}
@@ -709,6 +722,10 @@ void CAPIExampleDlg::ReleaseScene(CTreeCtrl& treeScene, HTREEITEM& hSelectItem)
m_pmediaRecorderDlg->UnInitAgora();
m_pmediaRecorderDlg->ShowWindow(SW_HIDE);
}
+ else if (str.Compare(TransparentBackground) == 0) {
+ m_TransparentDlg->UnInitAgora();
+ m_TransparentDlg->ShowWindow(SW_HIDE);
+ }
//Sleep(500);
}
diff --git a/windows/APIExample/APIExample/APIExampleDlg.h b/windows/APIExample/APIExample/APIExampleDlg.h
index 12c9bd6bb..295ed85c9 100755
--- a/windows/APIExample/APIExample/APIExampleDlg.h
+++ b/windows/APIExample/APIExample/APIExampleDlg.h
@@ -33,6 +33,7 @@
#include "Advanced/PushExternalVideoYUV/PushExternalVideoYUV.h"
#include "Advanced/MultiVideoSourceTracks/MultiVideoSourceTracks.h"
#include "Advanced/FaceCapture/CAgoraFaceCaptureDlg.h"
+#include "Advanced/TransparentBg/TransparentBgDialog.h"
#include
#include
#include