Removing a TODO in the FEC: renaming the exisiting packets mask to indicate random mode,
and refactored and renamed corresponding table file. Review URL: https://webrtc-codereview.appspot.com/632007 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2372 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
cac603f390
commit
5f97232cac
File diff suppressed because it is too large
Load Diff
24523
src/modules/rtp_rtcp/source/fec_private_tables_random.h
Normal file
24523
src/modules/rtp_rtcp/source/fec_private_tables_random.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,11 +21,11 @@
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Types for the FEC packet masks.
|
||||
// The type |kFecMaskRandom| selects the mask defined in fec_private_tables.h,
|
||||
// and is based on a random loss model. The type |kFecMaskBursty| selects the
|
||||
// mask defined in fec_private_tables_bursty.h, and is based on a bursty loss
|
||||
// model. Please refer to those files for a more detailed description.
|
||||
// Types for the FEC packet masks. The type |kFecMaskRandom| selects the mask
|
||||
// defined in fec_private_tables_random.h, and is based on a random loss model.
|
||||
// The type |kFecMaskBursty| selects the mask defined in
|
||||
// fec_private_tables_bursty.h, and is based on a bursty loss model. Please
|
||||
// refer to those files for a more detailed description.
|
||||
enum FecMaskType {
|
||||
kFecMaskRandom,
|
||||
kFecMaskBursty,
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
#include "modules/rtp_rtcp/source/fec_private_tables.h"
|
||||
#include "modules/rtp_rtcp/source/fec_private_tables_random.h"
|
||||
#include "modules/rtp_rtcp/source/fec_private_tables_bursty.h"
|
||||
|
||||
namespace {
|
||||
@ -169,12 +169,10 @@ PacketMaskTable::PacketMaskTable(FecMaskType fec_mask_type,
|
||||
FecMaskType PacketMaskTable::InitMaskType(FecMaskType fec_mask_type,
|
||||
int num_media_packets) {
|
||||
// The mask should not be bigger than |packetMaskTbl|.
|
||||
assert(num_media_packets <= static_cast<int>(sizeof(packetMaskTbl) /
|
||||
sizeof(*packetMaskTbl)));
|
||||
assert(num_media_packets <= static_cast<int>(sizeof(kPacketMaskRandomTbl) /
|
||||
sizeof(*kPacketMaskRandomTbl)));
|
||||
switch (fec_mask_type) {
|
||||
case kFecMaskRandom: {
|
||||
// TODO(marpan): in separate CL rename the fec_private_tables.h file and
|
||||
// its packet masks to indicate "random" loss case.
|
||||
return kFecMaskRandom;
|
||||
}
|
||||
case kFecMaskBursty: {
|
||||
@ -196,14 +194,14 @@ FecMaskType PacketMaskTable::InitMaskType(FecMaskType fec_mask_type,
|
||||
const uint8_t*** PacketMaskTable::InitMaskTable(FecMaskType fec_mask_type) {
|
||||
switch (fec_mask_type) {
|
||||
case kFecMaskRandom: {
|
||||
return packetMaskTbl;
|
||||
return kPacketMaskRandomTbl;
|
||||
}
|
||||
case kFecMaskBursty: {
|
||||
return kPacketMaskBurstyTbl;
|
||||
}
|
||||
}
|
||||
assert(false);
|
||||
return packetMaskTbl;
|
||||
return kPacketMaskRandomTbl;
|
||||
}
|
||||
|
||||
// Remaining protection after important (first partition) packet protection
|
||||
|
@ -62,7 +62,7 @@
|
||||
'rtp_sender_audio.h',
|
||||
# Video Files
|
||||
'bwe_defines.h',
|
||||
'fec_private_tables.h',
|
||||
'fec_private_tables_random.h',
|
||||
'fec_private_tables_bursty.h',
|
||||
'forward_error_correction.cc',
|
||||
'forward_error_correction.h',
|
||||
|
Loading…
x
Reference in New Issue
Block a user