Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: webrtc/video/vie_encoder.cc

Issue 1917793002: Remove SendPacer from ViEEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Renamed SenderDelegate to PacketSender. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_encoder.cc
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc
index 89cbb5285f9c43030605705f80827001ce5d20a9..e4e0fe3aab9200c0cf48038daf85038b0db7e7ba 100644
--- a/webrtc/video/vie_encoder.cc
+++ b/webrtc/video/vie_encoder.cc
@@ -57,18 +57,14 @@ ViEEncoder::ViEEncoder(uint32_t number_of_cores,
const std::vector<uint32_t>& ssrcs,
ProcessThread* module_process_thread,
SendStatisticsProxy* stats_proxy,
- rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback,
- OveruseFrameDetector* overuse_detector,
- PacedSender* pacer)
+ OveruseFrameDetector* overuse_detector)
: number_of_cores_(number_of_cores),
ssrcs_(ssrcs),
vp_(VideoProcessing::Create()),
qm_callback_(new QMVideoSettingsCallback(vp_.get())),
video_sender_(Clock::GetRealTimeClock(), this, this, qm_callback_.get()),
stats_proxy_(stats_proxy),
- pre_encode_callback_(pre_encode_callback),
overuse_detector_(overuse_detector),
- pacer_(pacer),
time_of_last_frame_activity_ms_(0),
encoder_config_(),
min_transmit_bitrate_bps_(0),
@@ -254,8 +250,7 @@ bool ViEEncoder::EncoderPaused() const {
if (encoder_paused_) {
return true;
}
- if (pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs) {
- // Too much data in pacer queue, drop frame.
+ if (video_suspended_ || last_observed_bitrate_bps_ == 0) {
return true;
}
return !network_is_transmitting_;
@@ -304,10 +299,6 @@ void ViEEncoder::EncodeVideoFrame(const VideoFrame& video_frame) {
}
}
- if (pre_encode_callback_) {
- pre_encode_callback_->OnFrame(*frame_to_send);
- }
-
if (codec_type == webrtc::kVideoCodecVP8) {
webrtc::CodecSpecificInfo codec_specific_info;
codec_specific_info.codecType = webrtc::kVideoCodecVP8;
@@ -449,7 +440,7 @@ void ViEEncoder::OnReceivedIntraFrameRequest(uint32_t ssrc) {
void ViEEncoder::OnBitrateUpdated(uint32_t bitrate_bps,
uint8_t fraction_lost,
int64_t round_trip_time_ms) {
- LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate" << bitrate_bps
+ LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps
<< " packet loss " << static_cast<int>(fraction_lost)
<< " rtt " << round_trip_time_ms;
video_sender_.SetChannelParameters(bitrate_bps, fraction_lost,
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698