@@ -109,6 +109,7 @@ void CLiveBroadcastingDlg::DoDataExchange(CDataExchange* pDX)
109109 DDX_Control (pDX, IDC_STATIC_DETAIL, m_staDetail);
110110 DDX_Control (pDX, IDC_COMBO_ENCODER, m_cmbVideoEncoder);
111111 DDX_Control (pDX, IDC_CHECK_REPORT, m_chkReport);
112+ DDX_Control (pDX, IDC_CHECK_MODERATION, m_chkModeration);
112113}
113114
114115
@@ -131,11 +132,13 @@ BEGIN_MESSAGE_MAP(CLiveBroadcastingDlg, CDialogEx)
131132 ON_MESSAGE(WM_MSGID(EID_LOCAL_VIDEO_STATE_CHANGED), &CLiveBroadcastingDlg::onEIDLocalVideoStateChanged)
132133 ON_MESSAGE(WM_MSGID(EID_REMOTE_VIDEO_STATS), &CLiveBroadcastingDlg::onEIDRemoteVideoStats)
133134 ON_MESSAGE(WM_MSGID(EID_REMOTE_VIDEO_STATE_CHANGED), &CLiveBroadcastingDlg::onEIDRemoteVideoStateChanged)
135+ ON_MESSAGE(WM_MSGID(EID_CONTENT_INSPECT_RESULT), &CLiveBroadcastingDlg::onEIDContentInspectResult)
134136
135137 ON_WM_SHOWWINDOW()
136138 ON_LBN_SELCHANGE(IDC_LIST_INFO_BROADCASTING, &CLiveBroadcastingDlg::OnSelchangeListInfoBroadcasting)
137139 ON_STN_CLICKED(IDC_STATIC_VIDEO, &CLiveBroadcastingDlg::OnStnClickedStaticVideo)
138140 ON_BN_CLICKED(IDC_CHECK_REPORT, &CLiveBroadcastingDlg::OnBnClickedCheckReport)
141+ ON_BN_CLICKED(IDC_CHECK_MODERATION, &CLiveBroadcastingDlg::OnBnClickedModeration)
139142END_MESSAGE_MAP()
140143
141144
@@ -176,6 +179,7 @@ void CLiveBroadcastingDlg::InitCtrlText()
176179 m_staChannelName.SetWindowText (commonCtrlChannel);
177180 m_btnJoinChannel.SetWindowText (commonCtrlJoinChannel);
178181 m_chkReport.SetWindowText (liveBraodcastingReport);
182+ m_chkModeration.SetWindowText (liveBraodcastingModeration);
179183}
180184
181185// create all video window to save m_videoWnds.
@@ -850,7 +854,27 @@ LRESULT CLiveBroadcastingDlg::onEIDRemoteVideoStateChanged(WPARAM wParam, LPARAM
850854 return 0 ;
851855}
852856
857+ LRESULT CLiveBroadcastingDlg::onEIDContentInspectResult (WPARAM wParam, LPARAM lParam) {
858+ CString strInfo = _T (" ===onContentInspectResult===" );
859+ m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
860+ CONTENT_INSPECT_RESULT result = (CONTENT_INSPECT_RESULT)wParam;
861+ strInfo.Format (_T (" mod result:%d" ), result);
862+ m_lstInfo.InsertString (m_lstInfo.GetCount (), strInfo);
863+ return 0 ;
864+ }
865+
853866void CLiveBroadcastingDlg::OnBnClickedCheckReport ()
854867{
855868 m_eventHandler.SetReport (m_chkReport.GetCheck () != 0 );
856869}
870+
871+ void CLiveBroadcastingDlg::OnBnClickedModeration ()
872+ {
873+ ContentInspectConfig config;
874+ ContentInspectModule module ;
875+ module .type = CONTENT_INSPECT_MODERATION;
876+ module .frequency = 5 ;
877+ config.moduleCount = 1 ;
878+ config.modules [0 ] = module ;
879+ m_rtcEngine->enableContentInspect (m_chkModeration.GetCheck () != 0 , config);
880+ }
0 commit comments