Skip to content

Commit e785928

Browse files
committed
CSD-14707
1 parent 993f7f4 commit e785928

File tree

6 files changed

+27
-4
lines changed

6 files changed

+27
-4
lines changed

OpenLive-Windows/OpenLive/AGEngineEventHandler.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,11 @@ void CAGEngineEventHandler::onConnectionInterrupted()
320320

321321
void CAGEngineEventHandler::onUserEnableVideo(uid_t uid, bool enabled)
322322
{
323+
}
324+
325+
void CAGEngineEventHandler::onLastmileQuality(int quality)
326+
{
327+
if (m_hMainWnd != NULL)
328+
::PostMessage(m_hMainWnd, WM_MSGID(EID_LASTMILE_QUALITY), quality, 0);
329+
323330
}

OpenLive-Windows/OpenLive/AGEngineEventHandler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class CAGEngineEventHandler :
4343
virtual void onConnectionInterrupted() override;
4444

4545
virtual void onUserEnableVideo(uid_t uid, bool enabled) override;
46+
47+
virtual void onLastmileQuality(int quality)override;
4648
private:
4749
HWND m_hMainWnd;
4850
};

OpenLive-Windows/OpenLive/AGEventDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,5 +243,5 @@ typedef struct _AGE_APICALL_EXECUTED
243243

244244
#define EID_APICALL_EXECUTED 0x00000020
245245

246-
246+
#define EID_LASTMILE_QUALITY 0x00000021
247247
#endif

OpenLive-Windows/OpenLive/OpenLiveDlg.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ BEGIN_MESSAGE_MAP(COpenLiveDlg, CDialogEx)
8989
ON_MESSAGE(WM_MSGID(EID_NETWORK_QUALITY), &COpenLiveDlg::OnNetworkQuality)
9090
ON_MESSAGE(WM_MSGID(EID_APICALL_EXECUTED), &COpenLiveDlg::OnEIDApiExecuted)
9191
ON_MESSAGE(WM_MSGID(EID_ERROR), &COpenLiveDlg::OnEIDError)
92-
92+
ON_MESSAGE(WM_MSGID(EID_LASTMILE_QUALITY), &COpenLiveDlg::OnLastMileQuality)
9393
ON_MESSAGE(WM_MSGID(EID_LEAVE_CHANNEL), &COpenLiveDlg::OnEIDLeaveChannel)
9494
ON_WM_CLOSE()
9595
END_MESSAGE_MAP()
@@ -435,3 +435,16 @@ LRESULT COpenLiveDlg::OnEIDLeaveChannel(WPARAM wParam, LPARAM lParam)
435435
lpData = NULL;
436436
return 0;
437437
}
438+
439+
440+
441+
LRESULT COpenLiveDlg::OnLastMileQuality(WPARAM wParam, LPARAM lParam)
442+
{
443+
int quality = wParam;
444+
445+
if (m_nNetworkQuality != quality) {
446+
m_nNetworkQuality = quality;
447+
InvalidateRect(CRect(16, 40, 48, 72), TRUE);
448+
}
449+
return 0;
450+
}

OpenLive-Windows/OpenLive/OpenLiveDlg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class COpenLiveDlg : public CDialogEx
4747
afx_msg LRESULT OnEIDApiExecuted(WPARAM wParam, LPARAM lParam);
4848
afx_msg LRESULT OnEIDError(WPARAM wParam, LPARAM lParam);
4949
afx_msg LRESULT OnEIDLeaveChannel(WPARAM wParam, LPARAM lParam);
50-
50+
afx_msg LRESULT OnLastMileQuality(WPARAM wParam, LPARAM lParam);
5151
DECLARE_MESSAGE_MAP()
5252

5353
protected:

OpenLive-Windows/OpenLive/VideoDlg.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ void CVideoDlg::OnBnClickedBtnclose()
364364
CAgoraObject::GetAgoraObject()->MuteLocalAudio(FALSE);
365365
m_btnAudio.SwitchButtonStatus(CAGButton::AGBTN_NORMAL);
366366

367-
CAgoraObject::GetAgoraObject()->EnableScreenCapture(NULL, 0, NULL, FALSE);
367+
if (CAgoraObject::GetAgoraObject()->IsScreenCaptureEnabled())
368+
CAgoraObject::GetAgoraObject()->EnableScreenCapture(NULL, 0, NULL, FALSE);
368369
m_btnScrCap.SwitchButtonStatus(CAGButton::AGBTN_NORMAL);
369370

370371
m_dlgChat.ShowWindow(SW_HIDE);

0 commit comments

Comments
 (0)