Skip to content
Snippets Groups Projects
Commit dd700c31 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

misc: remove dead code

This code is unused since we introduced processRtcpChecker()

Change-Id: If86295d885997c415e8f1681c6b9ad049c93de9e
parent 40ee25ff
No related branches found
No related tags found
No related merge requests found
......@@ -52,10 +52,6 @@ namespace video {
using std::string;
static constexpr unsigned MAX_SIZE_HISTO_QUALITY {30};
static constexpr unsigned MAX_SIZE_HISTO_BITRATE {100};
static constexpr unsigned MAX_SIZE_HISTO_JITTER {50};
static constexpr unsigned MAX_SIZE_HISTO_DELAY {25};
static constexpr unsigned MAX_REMB_DEC {1};
constexpr auto DELAY_AFTER_RESTART = std::chrono::milliseconds(1000);
......@@ -472,40 +468,6 @@ VideoRtpSession::check_RCTP_Info_REMB(uint64_t* br)
return false;
}
unsigned
VideoRtpSession::getLowerQuality()
{
// if lower quality was stored we return it
unsigned quality = 0;
while (not histoQuality_.empty()) {
quality = histoQuality_.back();
histoQuality_.pop_back();
if (quality > videoBitrateInfo_.videoQualityCurrent)
return quality;
}
// if no appropriate quality found, calculate it with dichotomie
quality = (videoBitrateInfo_.videoQualityCurrent + videoBitrateInfo_.videoQualityMin) / 2;
return quality;
}
unsigned
VideoRtpSession::getLowerBitrate()
{
// if a lower bitrate was stored we return it
unsigned bitrate = 0;
while (not histoBitrate_.empty()) {
bitrate = histoBitrate_.back();
histoBitrate_.pop_back();
if (bitrate < videoBitrateInfo_.videoBitrateCurrent)
return bitrate;
}
// if no appropriate bitrate found, calculate it with dichotomie
bitrate = (videoBitrateInfo_.videoBitrateCurrent + videoBitrateInfo_.videoBitrateMin) / 2;
return bitrate;
}
void
VideoRtpSession::adaptQualityAndBitrate()
{
......@@ -656,15 +618,6 @@ VideoRtpSession::storeVideoBitrateInfo()
{DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY,
std::to_string(videoBitrateInfo_.videoQualityMax)}});
}
if (histoQuality_.size() > MAX_SIZE_HISTO_QUALITY)
histoQuality_.pop_front();
if (histoBitrate_.size() > MAX_SIZE_HISTO_BITRATE)
histoBitrate_.pop_front();
histoQuality_.push_back(videoBitrateInfo_.videoQualityCurrent);
histoBitrate_.push_back(videoBitrateInfo_.videoBitrateCurrent);
}
void
......
......@@ -137,8 +137,6 @@ private:
bool check_RCTP_Info_RR(RTCPInfo&);
bool check_RCTP_Info_REMB(uint64_t*);
unsigned getLowerQuality();
unsigned getLowerBitrate();
void adaptQualityAndBitrate();
void storeVideoBitrateInfo();
void setupVideoBitrateInfo();
......@@ -153,17 +151,10 @@ private:
static constexpr float NO_INFO_CALCULATED {-1.0};
// bitrate and quality info struct
VideoBitrateInfo videoBitrateInfo_;
// previous quality, bitrate, jitter and loss used if quality or bitrate need to be decreased
std::list<unsigned> histoQuality_ {};
std::list<unsigned> histoBitrate_ {};
std::list<unsigned> histoJitter_ {};
std::list<int> histoDelay_ {};
std::list<std::pair<time_point, float>> histoLoss_;
// max size of quality and bitrate historic
// 5 tries in a row
static constexpr unsigned MAX_ADAPTATIVE_BITRATE_ITERATION {5};
bool hasReachMaxQuality_ {false};
// packet loss threshold
static constexpr float PACKET_LOSS_THRESHOLD {1.0};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment