Disable temporal toggling by default.

BUG=
TEST=

Review URL: http://webrtc-codereview.appspot.com/329012

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1285 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2011-12-22 10:30:42 +00:00
parent 84dc3d134d
commit 2ae4c8cf44

View File

@ -396,15 +396,18 @@ int VideoEngineSampleCode(void* window1, void* window2)
std::getline(std::cin, str);
int protectionMethod = atoi(str.c_str());
error = 0;
bool temporalToggling = true;
switch (protectionMethod)
{
case 0: // None: default is no protection
break;
case 1: // FEC only
error = ptrViERtpRtcp->SetFECStatus(videoChannel, true,
error = ptrViERtpRtcp->SetFECStatus(videoChannel,
true,
VCM_RED_PAYLOAD_TYPE,
VCM_ULPFEC_PAYLOAD_TYPE);
temporalToggling = false;
break;
case 2: // Nack only
@ -413,9 +416,12 @@ int VideoEngineSampleCode(void* window1, void* window2)
break;
case 3: // Hybrid NAck and FEC
error = ptrViERtpRtcp->SetHybridNACKFECStatus(videoChannel, true,
error = ptrViERtpRtcp->SetHybridNACKFECStatus(
videoChannel,
true,
VCM_RED_PAYLOAD_TYPE,
VCM_ULPFEC_PAYLOAD_TYPE);
temporalToggling = false;
break;
}
@ -438,12 +444,6 @@ int VideoEngineSampleCode(void* window1, void* window2)
// Setting External transport
TbExternalTransport extTransport(*(ptrViENetwork));
if (numTemporalLayers > 1) {
extTransport.SetTemporalToggle(numTemporalLayers);
} else {
// Disabled
extTransport.SetTemporalToggle(0);
}
int testMode = 0;
std::cout << std::endl;
@ -471,6 +471,9 @@ int VideoEngineSampleCode(void* window1, void* window2)
std::getline(std::cin, rate_str);
int rate = atoi(rate_str.c_str());
extTransport.SetPacketLoss(rate);
if (rate) {
temporalToggling = false;
}
// Set network delay value
std::cout << "Enter network delay value [mS]" << std::endl;
@ -478,6 +481,13 @@ int VideoEngineSampleCode(void* window1, void* window2)
std::getline(std::cin, delay_str);
int delayMs = atoi(delay_str.c_str());
extTransport.SetNetworkDelay(delayMs);
if (numTemporalLayers > 1 && temporalToggling) {
extTransport.SetTemporalToggle(numTemporalLayers);
} else {
// Disabled
extTransport.SetTemporalToggle(0);
}
}
else
{