Skip to content

Commit 98be1cf

Browse files
committed
feat: fix bugs
1 parent a830980 commit 98be1cf

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

windows/APIExample/APIExample/APIExample.vcxproj

Lines changed: 2 additions & 2 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.17763.0</WindowsTargetPlatformVersion>
26+
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
2727
</PropertyGroup>
2828
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -44,7 +44,7 @@
4444
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4545
<ConfigurationType>Application</ConfigurationType>
4646
<UseDebugLibraries>true</UseDebugLibraries>
47-
<PlatformToolset>v141</PlatformToolset>
47+
<PlatformToolset>v142</PlatformToolset>
4848
<CharacterSet>Unicode</CharacterSet>
4949
<UseOfMfc>Dynamic</UseOfMfc>
5050
</PropertyGroup>

windows/APIExample/APIExample/Advanced/LocalVideoTranscoding/CLocalVideoTranscodingDlg.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ void CLocalVideoTranscodingDlg::OnBnClickedButtonJoinchannel()
183183

184184
//start preview
185185
m_rtcEngine->startPreview(VIDEO_SOURCE_TRANSCODED);
186-
m_rtcEngine->setExtensionProperty("agora_segmentation", "PortraitSegmentation", "configs", "{\"enable_seg\":true}", agora::media::PRIMARY_CAMERA_SOURCE);
187186
m_lstInfo.InsertString(m_lstInfo.GetCount(), _T("start preview"));
188187

189188
//join channel

windows/APIExample/APIExample/Advanced/OriginalVideo/CAgoraOriginalVideoDlg.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ void CAgoraOriginalVideoDlg::RenderLocalVideo()
9797
VideoCanvas canvas;
9898
canvas.renderMode = media::base::RENDER_MODE_FIT;
9999
canvas.uid = 0;
100+
canvas.sourceType = VIDEO_SOURCE_CAMERA_PRIMARY;
100101
canvas.view = m_localVideoWnd.GetSafeHwnd();
101102
//setup local video in the engine to canvas.
102103
m_rtcEngine->setupLocalVideo(canvas);
@@ -191,8 +192,6 @@ BOOL CAgoraOriginalVideoDlg::RegisterVideoFrameObserver(BOOL bEnable,IVideoFrame
191192
//query interface agora::AGORA_IID_MEDIA_ENGINE in the engine.
192193
mediaEngine.queryInterface(m_rtcEngine, AGORA_IID_MEDIA_ENGINE);
193194
int nRet = 0;
194-
195-
agora::base::AParameter apm(*m_rtcEngine);
196195
if (mediaEngine.get() == NULL)
197196
return FALSE;
198197
if (bEnable) {
@@ -227,6 +226,8 @@ void CAgoraOriginalVideoDlg::OnBnClickedButtonJoinchannel()
227226
if (0 == m_rtcEngine->joinChannel(APP_TOKEN, szChannelId.c_str(), 0, options)) {
228227
strInfo.Format(_T("join channel %s, use ChannelMediaOptions"), getCurrentTime());
229228
m_btnJoinChannel.EnableWindow(FALSE);
229+
//disable proc btn, as register can only happen before camera start for now
230+
m_btnSetVideoProc.EnableWindow(FALSE);
230231
}
231232
}
232233
else {
@@ -468,6 +469,7 @@ LRESULT CAgoraOriginalVideoDlg::OnEIDLeaveChannel(WPARAM wParam, LPARAM lParam)
468469
{
469470
m_joinChannel = false;
470471
m_btnJoinChannel.SetWindowText(commonCtrlJoinChannel);
472+
m_btnSetVideoProc.EnableWindow(TRUE);
471473
CString strInfo;
472474
strInfo.Format(_T("leave channel success %s"), getCurrentTime());
473475
m_lstInfo.InsertString(m_lstInfo.GetCount(), strInfo);

0 commit comments

Comments
 (0)