Re-allowing RED in voice engine.

Path of audio RED packets was blocked in r4692 by accident. It ought be enabled again.

BUG=3619
R=henrika@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/34799004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8137 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
minyue@webrtc.org 2015-01-23 11:58:42 +00:00
parent 182ea46fac
commit 456f01441a
3 changed files with 16 additions and 11 deletions

View File

@ -1654,8 +1654,8 @@ bool Channel::ReceivePacket(const uint8_t* packet,
size_t packet_length,
const RTPHeader& header,
bool in_order) {
if (rtp_payload_registry_->IsEncapsulated(header)) {
return HandleEncapsulation(packet, packet_length, header);
if (rtp_payload_registry_->IsRtx(header)) {
return HandleRtxPacket(packet, packet_length, header);
}
const uint8_t* payload = packet + header.headerLength;
assert(packet_length >= header.headerLength);
@ -1669,9 +1669,9 @@ bool Channel::ReceivePacket(const uint8_t* packet,
payload_specific, in_order);
}
bool Channel::HandleEncapsulation(const uint8_t* packet,
size_t packet_length,
const RTPHeader& header) {
bool Channel::HandleRtxPacket(const uint8_t* packet,
size_t packet_length,
const RTPHeader& header) {
if (!rtp_payload_registry_->IsRtx(header))
return false;

View File

@ -457,9 +457,9 @@ public:
private:
bool ReceivePacket(const uint8_t* packet, size_t packet_length,
const RTPHeader& header, bool in_order);
bool HandleEncapsulation(const uint8_t* packet,
size_t packet_length,
const RTPHeader& header);
bool HandleRtxPacket(const uint8_t* packet,
size_t packet_length,
const RTPHeader& header);
bool IsPacketInOrder(const RTPHeader& header) const;
bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
int ResendPackets(const uint16_t* sequence_numbers, int length);

View File

@ -457,9 +457,14 @@ void RunTest(std::string out_path) {
if (option_selection < option_index) {
res = codec->GetCodec(option_selection, cinst);
VALIDATE;
SetStereoIfOpus(opus_stereo, &cinst);
printf("Set primary codec\n");
res = codec->SetSendCodec(chan, cinst);
if (strcmp(cinst.plname, "red") == 0) {
printf("Enabling RED\n");
res = rtp_rtcp->SetREDStatus(chan, true, cinst.pltype);
} else {
SetStereoIfOpus(opus_stereo, &cinst);
printf("Set primary codec\n");
res = codec->SetSendCodec(chan, cinst);
}
VALIDATE;
} else if (option_selection == option_index++) {
enable_cng = !enable_cng;