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:
parent
84dc3d134d
commit
2ae4c8cf44
@ -396,27 +396,33 @@ int VideoEngineSampleCode(void* window1, void* window2)
|
|||||||
std::getline(std::cin, str);
|
std::getline(std::cin, str);
|
||||||
int protectionMethod = atoi(str.c_str());
|
int protectionMethod = atoi(str.c_str());
|
||||||
error = 0;
|
error = 0;
|
||||||
|
bool temporalToggling = true;
|
||||||
switch (protectionMethod)
|
switch (protectionMethod)
|
||||||
{
|
{
|
||||||
case 0: // None: default is no protection
|
case 0: // None: default is no protection
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // FEC only
|
case 1: // FEC only
|
||||||
error = ptrViERtpRtcp->SetFECStatus(videoChannel, true,
|
error = ptrViERtpRtcp->SetFECStatus(videoChannel,
|
||||||
VCM_RED_PAYLOAD_TYPE,
|
true,
|
||||||
VCM_ULPFEC_PAYLOAD_TYPE);
|
VCM_RED_PAYLOAD_TYPE,
|
||||||
break;
|
VCM_ULPFEC_PAYLOAD_TYPE);
|
||||||
|
temporalToggling = false;
|
||||||
|
break;
|
||||||
|
|
||||||
case 2: // Nack only
|
case 2: // Nack only
|
||||||
error = ptrViERtpRtcp->SetNACKStatus(videoChannel, true);
|
error = ptrViERtpRtcp->SetNACKStatus(videoChannel, true);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: // Hybrid NAck and FEC
|
case 3: // Hybrid NAck and FEC
|
||||||
error = ptrViERtpRtcp->SetHybridNACKFECStatus(videoChannel, true,
|
error = ptrViERtpRtcp->SetHybridNACKFECStatus(
|
||||||
VCM_RED_PAYLOAD_TYPE,
|
videoChannel,
|
||||||
VCM_ULPFEC_PAYLOAD_TYPE);
|
true,
|
||||||
break;
|
VCM_RED_PAYLOAD_TYPE,
|
||||||
|
VCM_ULPFEC_PAYLOAD_TYPE);
|
||||||
|
temporalToggling = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
@ -438,12 +444,6 @@ int VideoEngineSampleCode(void* window1, void* window2)
|
|||||||
|
|
||||||
// Setting External transport
|
// Setting External transport
|
||||||
TbExternalTransport extTransport(*(ptrViENetwork));
|
TbExternalTransport extTransport(*(ptrViENetwork));
|
||||||
if (numTemporalLayers > 1) {
|
|
||||||
extTransport.SetTemporalToggle(numTemporalLayers);
|
|
||||||
} else {
|
|
||||||
// Disabled
|
|
||||||
extTransport.SetTemporalToggle(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int testMode = 0;
|
int testMode = 0;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
@ -471,6 +471,9 @@ int VideoEngineSampleCode(void* window1, void* window2)
|
|||||||
std::getline(std::cin, rate_str);
|
std::getline(std::cin, rate_str);
|
||||||
int rate = atoi(rate_str.c_str());
|
int rate = atoi(rate_str.c_str());
|
||||||
extTransport.SetPacketLoss(rate);
|
extTransport.SetPacketLoss(rate);
|
||||||
|
if (rate) {
|
||||||
|
temporalToggling = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Set network delay value
|
// Set network delay value
|
||||||
std::cout << "Enter network delay value [mS]" << std::endl;
|
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);
|
std::getline(std::cin, delay_str);
|
||||||
int delayMs = atoi(delay_str.c_str());
|
int delayMs = atoi(delay_str.c_str());
|
||||||
extTransport.SetNetworkDelay(delayMs);
|
extTransport.SetNetworkDelay(delayMs);
|
||||||
|
|
||||||
|
if (numTemporalLayers > 1 && temporalToggling) {
|
||||||
|
extTransport.SetTemporalToggle(numTemporalLayers);
|
||||||
|
} else {
|
||||||
|
// Disabled
|
||||||
|
extTransport.SetTemporalToggle(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user