From ca4666b75c7a3f84db4a7307c2d40ad24e775178 Mon Sep 17 00:00:00 2001 From: "amyfong@webrtc.org" Date: Thu, 27 Oct 2011 21:16:40 +0000 Subject: [PATCH] vie wintest added hybrid protection mode also fixed Max Framerate to reflect its actually the min framerate Review URL: http://webrtc-codereview.appspot.com/244010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@828 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../main/test/WindowsTest/Capture.rc | 13 ++++----- .../main/test/WindowsTest/ChannelDlg.cpp | 27 ++++++++++++++++++- .../main/test/WindowsTest/ChannelDlg.h | 3 ++- .../main/test/WindowsTest/resource.h | 1 + 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/video_engine/main/test/WindowsTest/Capture.rc b/src/video_engine/main/test/WindowsTest/Capture.rc index 66642b0e3..962256c6d 100644 --- a/src/video_engine/main/test/WindowsTest/Capture.rc +++ b/src/video_engine/main/test/WindowsTest/Capture.rc @@ -177,14 +177,15 @@ BEGIN EDITTEXT IDC_REMOTE_PORT1,582,46,31,14,ES_AUTOHSCROLL LTEXT "Port",IDC_STATIC,584,37,14,8 GROUPBOX "Remote client 1",IDC_STATIC,487,27,203,50 - LTEXT "Min FrameRate",IDC_STATIC,488,106,49,8 + LTEXT "Max FrameRate",IDC_STATIC,488,106,50,8 COMBOBOX IDC_MIN_FRAME_RATE,488,115,48,82,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP CONTROL "",IDC_CAPTURE,"Static",SS_BITMAP | SS_CENTERIMAGE | SS_REALSIZEIMAGE,7,7,418,276 - CONTROL "TMMBR",IDC_TMMBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,639,159,40,10 - GROUPBOX "Standard Protection",IDC_STATIC,566,133,72,41 - CONTROL "None",IDC_PROT_NONE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,579,141,33,10 - CONTROL "NACK",IDC_PROT_NACK,"Button",BS_AUTORADIOBUTTON,579,163,35,10 - CONTROL "FEC",IDC_PROT_FEC,"Button",BS_AUTORADIOBUTTON,579,152,30,10 + CONTROL "TMMBR",IDC_TMMBR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,486,138,40,10 + GROUPBOX "Standard Protection",IDC_STATIC,607,138,72,55 + CONTROL "None",IDC_PROT_NONE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,615,146,33,10 + CONTROL "NACK",IDC_PROT_NACK,"Button",BS_AUTORADIOBUTTON,615,165,35,10 + CONTROL "FEC",IDC_PROT_FEC,"Button",BS_AUTORADIOBUTTON,615,155,30,10 + CONTROL "NACK & FEC",IDC_PROT_NACKFEC,"Button",BS_AUTORADIOBUTTON,615,174,52,10 COMBOBOX IDC_RTCPMODE,571,119,80,57,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP LTEXT "RTCP Mode",IDC_STATIC,571,110,39,8 LISTBOX IDC_INFORMATION,476,309,214,63,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP diff --git a/src/video_engine/main/test/WindowsTest/ChannelDlg.cpp b/src/video_engine/main/test/WindowsTest/ChannelDlg.cpp index ff67f928c..5a0806c34 100644 --- a/src/video_engine/main/test/WindowsTest/ChannelDlg.cpp +++ b/src/video_engine/main/test/WindowsTest/ChannelDlg.cpp @@ -27,7 +27,6 @@ #define GET_TIME_IN_MS timeGetTime #endif - // Hack to convert char to TCHAR, using two buffers to be able to // call twice in the same statement TCHAR convertTemp1[256] = {0}; @@ -160,6 +159,7 @@ BEGIN_MESSAGE_MAP(CDXChannelDlg, CDialog) ON_BN_CLICKED(IDC_BTN_RECORD_INCOMING, &CDXChannelDlg::OnBnClickedBtnRecordIncoming) ON_BN_CLICKED(IDC_BTN_RECORD_OUTGOING, &CDXChannelDlg::OnBnClickedBtnRecordOutgoing) ON_BN_CLICKED(IDC_BTN_CREATE_SLAVE, &CDXChannelDlg::OnBnClickedBtnCreateSlave) + ON_BN_CLICKED(IDC_PROT_NACKFEC, &CDXChannelDlg::OnBnClickedProtNackFec) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -946,6 +946,7 @@ void CDXChannelDlg::OnBnClickedProtNone() TEST_MUSTPASS(_vieRTPRTCP->SetNACKStatus(_channelId,false),-5); TEST_MUSTPASS(_vieRTPRTCP->SetFECStatus(_channelId,false,0,0),-5); + TEST_MUSTPASS(_vieRTPRTCP->SetHybridNACKFECStatus(_channelId,false,0,0),-5); } void CDXChannelDlg::OnBnClickedProtFec() @@ -969,6 +970,30 @@ void CDXChannelDlg::OnBnClickedProtFec() TEST_MUSTPASS(_vieRTPRTCP->SetFECStatus(_channelId,true,redPayloadType,fecPayloadType),-5); } +void CDXChannelDlg::OnBnClickedProtNackFec() +{ + int noCodec=_vieCodec->NumberOfCodecs(); + int redPayloadType=0; + int fecPayloadType=0; + for(unsigned char i=0;iGetCodec(i,codec); + if(codec.codecType==webrtc::kVideoCodecRED) + { + redPayloadType=codec.plType; + } + if(codec.codecType==webrtc::kVideoCodecULPFEC) + { + fecPayloadType=codec.plType; + } + } + TEST_MUSTPASS(_vieRTPRTCP->SetHybridNACKFECStatus(_channelId,true, + redPayloadType, + fecPayloadType),-5); + +} + void CDXChannelDlg::OnBnClickedVersion() { char version[1024]; diff --git a/src/video_engine/main/test/WindowsTest/ChannelDlg.h b/src/video_engine/main/test/WindowsTest/ChannelDlg.h index 3ed529689..0b0cae487 100644 --- a/src/video_engine/main/test/WindowsTest/ChannelDlg.h +++ b/src/video_engine/main/test/WindowsTest/ChannelDlg.h @@ -254,7 +254,8 @@ private: afx_msg void OnCbnSelchangeRtcpmode(); afx_msg void OnBnClickedProtNack(); afx_msg void OnBnClickedProtNone(); - afx_msg void OnBnClickedProtFec(); + afx_msg void OnBnClickedProtFec(); + afx_msg void OnBnClickedProtNackFec(); afx_msg void OnBnClickedFreezelog(); public: afx_msg void OnBnClickedExttransport(); diff --git a/src/video_engine/main/test/WindowsTest/resource.h b/src/video_engine/main/test/WindowsTest/resource.h index 83529b0d4..34e90eb4f 100644 --- a/src/video_engine/main/test/WindowsTest/resource.h +++ b/src/video_engine/main/test/WindowsTest/resource.h @@ -35,6 +35,7 @@ #define IDC_PROT_NONE 1045 #define IDC_PROT_NACK 1046 #define IDC_PROT_FEC 1047 +#define IDC_PROT_NACKFEC 1048 #define IDC_INFORMATION 1050 #define IDC_PACKETLOSS 1051 #define IDC_FREEZELOG 1052