Modified the FEC to allow for option of unequal protection (UEP) across packets.
Added two files under testFec, removed old testFec.cpp, and added two new files for generating packet masks: _internal.cc/h. Review URL: http://webrtc-codereview.appspot.com/26003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@94 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
ae0ad911a1
commit
023abafa4e
@ -198,7 +198,7 @@ ForwardErrorCorrection::GenerateFEC(const ListWrapper& mediaPacketList,
|
||||
}
|
||||
|
||||
// -- Generate packet masks --
|
||||
WebRtc_UWord8 packetMask[numFecPackets * numMaskBytes];
|
||||
WebRtc_UWord8* packetMask = new WebRtc_UWord8[numFecPackets * numMaskBytes];
|
||||
memset(packetMask, 0, numFecPackets * numMaskBytes);
|
||||
internal::GeneratePacketMasks(numMediaPackets, numFecPackets,
|
||||
numImportantPackets, packetMask);
|
||||
@ -285,6 +285,7 @@ ForwardErrorCorrection::GenerateFEC(const ListWrapper& mediaPacketList,
|
||||
WEBRTC_TRACE(kTraceError, kTraceRtpRtcp, _id,
|
||||
"Packet mask has row of zeros %d %d",
|
||||
numMediaPackets, numFecPackets);
|
||||
delete packetMask;
|
||||
return -1;
|
||||
|
||||
}
|
||||
@ -342,7 +343,7 @@ ForwardErrorCorrection::GenerateFEC(const ListWrapper& mediaPacketList,
|
||||
memcpy(&_generatedFecPackets[i].data[12], &packetMask[i * numMaskBytes],
|
||||
numMaskBytes);
|
||||
}
|
||||
|
||||
delete packetMask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user