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

Unified Diff: webrtc/common_video/incoming_video_stream.cc

Issue 2040763002: Remove dead code in IncomingVideoStream that's just causing contention. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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/common_video/include/incoming_video_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/incoming_video_stream.cc
diff --git a/webrtc/common_video/incoming_video_stream.cc b/webrtc/common_video/incoming_video_stream.cc
index dce1a7fca4838fedf590b49f47e0166ee1ff9ea8..a5e7ba755d35023ad9ba063d37b0e6b928305077 100644
--- a/webrtc/common_video/incoming_video_stream.cc
+++ b/webrtc/common_video/incoming_video_stream.cc
@@ -26,10 +26,7 @@ IncomingVideoStream::IncomingVideoStream(bool disable_prerenderer_smoothing)
deliver_buffer_event_(EventTimerWrapper::Create()),
running_(false),
external_callback_(nullptr),
- render_buffers_(new VideoRenderFrames()),
- incoming_rate_(0),
- last_rate_calculation_time_ms_(0),
- num_frames_since_last_calculation_(0) {}
+ render_buffers_(new VideoRenderFrames()) {}
IncomingVideoStream::~IncomingVideoStream() {
Stop();
@@ -42,17 +39,6 @@ void IncomingVideoStream::OnFrame(const VideoFrame& video_frame) {
return;
}
- // Rate statistics.
- num_frames_since_last_calculation_++;
- int64_t now_ms = rtc::TimeMillis();
- if (now_ms >= last_rate_calculation_time_ms_ + kFrameRatePeriodMs) {
- incoming_rate_ =
- static_cast<uint32_t>(1000 * num_frames_since_last_calculation_ /
- (now_ms - last_rate_calculation_time_ms_));
- num_frames_since_last_calculation_ = 0;
- last_rate_calculation_time_ms_ = now_ms;
- }
-
// Hand over or insert frame.
if (disable_prerenderer_smoothing_) {
DeliverFrame(video_frame);
@@ -133,17 +119,6 @@ int32_t IncomingVideoStream::Stop() {
return 0;
}
-int32_t IncomingVideoStream::Reset() {
- rtc::CritScope cs_buffer(&buffer_critsect_);
- render_buffers_->ReleaseAllFrames();
- return 0;
-}
-
-uint32_t IncomingVideoStream::IncomingRate() const {
- rtc::CritScope cs(&stream_critsect_);
- return incoming_rate_;
-}
-
bool IncomingVideoStream::IncomingVideoStreamThreadFun(void* obj) {
return static_cast<IncomingVideoStream*>(obj)->IncomingVideoStreamProcess();
}
« no previous file with comments | « webrtc/common_video/include/incoming_video_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698