Skip to content

Commit

Permalink
Use a smaller size of sequence number set, to improve performance
Browse files Browse the repository at this point in the history
Bug: webrtc:8857
Change-Id: I78b4e6d191b1b7eb96f5109323ef48b24b99c7c2
Reviewed-on: https://webrtc-review.googlesource.com/49361
Reviewed-by: Stefan Holmer <[email protected]>
Commit-Queue: Ying Wang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#22286}
  • Loading branch information
yingwang authored and Commit Bot committed Mar 5, 2018
1 parent 8d9dcb1 commit 0133d46
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions video/video_send_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#include <algorithm>
#include <cmath>
#include <set>
#include <sstream>
#include <string>
#include <unordered_set>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -41,7 +41,11 @@
namespace webrtc {

static const int kMinSendSidePacketHistorySize = 600;
static const int kSendSideSeqNumSetMaxSize = 15000;

// Assume an average video stream has around 3 packets per frame (1 mbps / 30
// fps / 1400B) A sequence number set with size 5500 will be able to store
// packet sequence number for at least last 60 seconds.
static const int kSendSideSeqNumSetMaxSize = 5500;

namespace {

Expand Down Expand Up @@ -414,7 +418,7 @@ class VideoSendStreamImpl : public webrtc::BitrateAllocatorObserver,
RTC_GUARDED_BY(overhead_bytes_per_packet_crit_);
size_t transport_overhead_bytes_per_packet_;

std::set<uint16_t> feedback_packet_seq_num_set_;
std::unordered_set<uint16_t> feedback_packet_seq_num_set_;
std::vector<bool> loss_mask_vector_;
};

Expand Down

0 comments on commit 0133d46

Please sign in to comment.