@@ -165,6 +165,7 @@ BEGIN_MESSAGE_MAP(CAgoraRealtimeLiveBroadcastingDlg, CDialogEx)
165165 ON_MESSAGE(WM_MSGID(EID_LOCAL_VIDEO_STATE_CHANGED), &CAgoraRealtimeLiveBroadcastingDlg::onEIDLocalVideoStateChanged)
166166 ON_MESSAGE(WM_MSGID(EID_REMOTE_VIDEO_STATS), &CAgoraRealtimeLiveBroadcastingDlg::onEIDRemoteVideoStats)
167167 ON_MESSAGE(WM_MSGID(EID_CONTENT_INSPECT_RESULT), &CAgoraRealtimeLiveBroadcastingDlg::onEIDContentInsepctResult)
168+ ON_MESSAGE(WM_MSGID(EID_SUPER_RESOLUTION_ENABLED), &CAgoraRealtimeLiveBroadcastingDlg::onEIDSuperResolutionEnabled)
168169 ON_BN_CLICKED(IDC_CHECK_REPORT, &CAgoraRealtimeLiveBroadcastingDlg::OnBnClickedCheckReport)
169170 ON_CBN_SELCHANGE(IDC_COMBO_COLOR, &CAgoraRealtimeLiveBroadcastingDlg::OnSelchangeComboColor)
170171 ON_BN_CLICKED(IDC_CHECK_MODERATION, &CAgoraRealtimeLiveBroadcastingDlg::OnBnClickedModeration)
@@ -542,6 +543,7 @@ LRESULT CAgoraRealtimeLiveBroadcastingDlg::OnEIDLeaveChannel(WPARAM wParam, LPAR
542543 return 0 ;
543544}
544545
546+
545547LRESULT CAgoraRealtimeLiveBroadcastingDlg::OnEIDUserJoined (WPARAM wParam, LPARAM lParam)
546548{
547549 if (m_lstUids.size () == m_maxVideoCount)
@@ -560,6 +562,7 @@ LRESULT CAgoraRealtimeLiveBroadcastingDlg::OnEIDUserJoined(WPARAM wParam, LPARAM
560562 m_videoWnds[i].SetUID (wParam);
561563 // setup remote video in engine to the canvas.
562564 m_rtcEngine->setupRemoteVideo (canvas);
565+ m_rtcEngine->enableRemoteSuperResolution (wParam, m_superResolution);
563566 break ;
564567 }
565568 }
@@ -935,6 +938,7 @@ LRESULT CAgoraRealtimeLiveBroadcastingDlg::onEIDRtcStats(WPARAM wParam, LPARAM l
935938}
936939
937940LRESULT CAgoraRealtimeLiveBroadcastingDlg::onEIDLocalAudioStats (WPARAM wParam, LPARAM lParam) {
941+
938942 LocalAudioStats* stats = (LocalAudioStats*)wParam;
939943 CString strInfo = _T (" ===onLocalAudioStats===" );
940944 m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
@@ -954,6 +958,7 @@ LRESULT CAgoraRealtimeLiveBroadcastingDlg::onEIDLocalAudioStats(WPARAM wParam, L
954958 delete stats;
955959 stats = nullptr ;
956960 }
961+
957962 return 0 ;
958963}
959964
@@ -1147,6 +1152,17 @@ LRESULT CAgoraRealtimeLiveBroadcastingDlg::onEIDContentInsepctResult(WPARAM wPar
11471152 return 0 ;
11481153}
11491154
1155+ LRESULT CAgoraRealtimeLiveBroadcastingDlg::onEIDSuperResolutionEnabled (WPARAM wParam, LPARAM lParam) {
1156+ CString strInfo = _T (" ===onEIDSuperResolutionEnabled===" );
1157+ m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
1158+ agora::rtc::uid_t uid = (agora::rtc::uid_t )wParam;
1159+ SUPER_RESOLUTION_STATE_REASON reason = (SUPER_RESOLUTION_STATE_REASON)lParam;
1160+
1161+ strInfo.Format (_T (" uid:%d reason:%d" ), uid, reason);
1162+ m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
1163+ return 0 ;
1164+ }
1165+
11501166void CAgoraRealtimeLiveBroadcastingDlg::OnBnClickedCheckReport ()
11511167{
11521168 m_eventHandler.SetReport (m_chkReport.GetCheck () != 0 );
@@ -1180,4 +1196,9 @@ void CAgoraRealtimeLiveBroadcastingDlg::OnSelchangeComboColor()
11801196void CAgoraRealtimeLiveBroadcastingDlg::OnCbnSelchangeComboSr ()
11811197{
11821198 m_superResolution = (m_cmbSR.GetCurSel () != 0 );
1199+ for (auto iter = m_lstUids.begin ();
1200+ iter != m_lstUids.end (); iter++) {
1201+ agora::rtc::uid_t uid = *iter;
1202+ m_rtcEngine->enableRemoteSuperResolution (uid, m_superResolution);
1203+ }
11831204}
0 commit comments