Added REMB option to custom call.
Review URL: http://webrtc-codereview.appspot.com/347003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1388 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ce5990cb0b
commit
5007056767
@ -134,6 +134,7 @@ int GetVideoProtection();
|
|||||||
bool SetVideoProtection(webrtc::ViECodec* ptrViECodec,
|
bool SetVideoProtection(webrtc::ViECodec* ptrViECodec,
|
||||||
webrtc::ViERTP_RTCP* ptrViERtpRtcp,
|
webrtc::ViERTP_RTCP* ptrViERtpRtcp,
|
||||||
int videoChannel, int protectionMethod);
|
int videoChannel, int protectionMethod);
|
||||||
|
bool GetBitrateSignaling();
|
||||||
|
|
||||||
// The following are audio helper functions.
|
// The following are audio helper functions.
|
||||||
bool GetAudioDevices(webrtc::VoEBase* ptrVEBase,
|
bool GetAudioDevices(webrtc::VoEBase* ptrVEBase,
|
||||||
@ -250,6 +251,7 @@ int ViEAutoTest::ViECustomCall()
|
|||||||
int audioChannel = -1;
|
int audioChannel = -1;
|
||||||
bool isImageScaleEnabled = false;
|
bool isImageScaleEnabled = false;
|
||||||
int protectionMethod = DEFAULT_VIDEO_PROTECTION_METHOD;
|
int protectionMethod = DEFAULT_VIDEO_PROTECTION_METHOD;
|
||||||
|
bool remb = true;
|
||||||
|
|
||||||
while (!startCall) {
|
while (!startCall) {
|
||||||
// Get the IP address to use from call.
|
// Get the IP address to use from call.
|
||||||
@ -275,6 +277,7 @@ int ViEAutoTest::ViECustomCall()
|
|||||||
SetVideoCodecMaxBitrate(ptrViECodec, videoSendCodec);
|
SetVideoCodecMaxBitrate(ptrViECodec, videoSendCodec);
|
||||||
SetVideoCodecMaxFramerate(ptrViECodec, videoSendCodec);
|
SetVideoCodecMaxFramerate(ptrViECodec, videoSendCodec);
|
||||||
SetVideoCodecTemporalLayer(videoSendCodec);
|
SetVideoCodecTemporalLayer(videoSendCodec);
|
||||||
|
remb = GetBitrateSignaling();
|
||||||
|
|
||||||
// Get the video protection method for the call.
|
// Get the video protection method for the call.
|
||||||
protectionMethod = GetVideoProtection();
|
protectionMethod = GetVideoProtection();
|
||||||
@ -433,10 +436,15 @@ int ViEAutoTest::ViECustomCall()
|
|||||||
"ERROR: %s at line %d",
|
"ERROR: %s at line %d",
|
||||||
__FUNCTION__, __LINE__);
|
__FUNCTION__, __LINE__);
|
||||||
|
|
||||||
error = ptrViERtpRtcp->SetTMMBRStatus(videoChannel, true);
|
if (remb) {
|
||||||
numberOfErrors += ViETest::TestError(error == 0,
|
bool ret = ptrViERtpRtcp->SetRembStatus(videoChannel, true, true);
|
||||||
"ERROR: %s at line %d",
|
numberOfErrors += ViETest::TestError(ret, "ERROR: %s at line %d",
|
||||||
__FUNCTION__, __LINE__);
|
__FUNCTION__, __LINE__);
|
||||||
|
} else {
|
||||||
|
error = ptrViERtpRtcp->SetTMMBRStatus(videoChannel, true);
|
||||||
|
numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d",
|
||||||
|
__FUNCTION__, __LINE__);
|
||||||
|
}
|
||||||
|
|
||||||
error = ptrViERender->AddRenderer(captureId, _window1, 0, 0.0, 0.0,
|
error = ptrViERender->AddRenderer(captureId, _window1, 0, 0.0, 0.0,
|
||||||
1.0, 1.0);
|
1.0, 1.0);
|
||||||
@ -1836,6 +1844,21 @@ bool SetVideoProtection(webrtc::ViECodec* ptrViECodec,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GetBitrateSignaling() {
|
||||||
|
std::cout << std::endl;
|
||||||
|
std::cout << "Available bitrate signaling methods." << std::endl;
|
||||||
|
std::cout << " 0. REMB" << std::endl;
|
||||||
|
std::cout << " 1. TMMBR" << std::endl;
|
||||||
|
std::cout << "Enter bitrate signaling methods. "
|
||||||
|
<< "Press enter for default (REMB): " << std::endl;
|
||||||
|
std::string method;
|
||||||
|
std::getline(std::cin, method);
|
||||||
|
if (atoi(method.c_str()) == 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void PrintRTCCPStatistics(webrtc::ViERTP_RTCP* ptrViERtpRtcp,
|
void PrintRTCCPStatistics(webrtc::ViERTP_RTCP* ptrViERtpRtcp,
|
||||||
int videoChannel, StatisticsType statType) {
|
int videoChannel, StatisticsType statType) {
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user