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

Unified Diff: webrtc/media/base/videocapturer.cc

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Formatting tweaks and TODO updates. Created 4 years, 9 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
Index: webrtc/media/base/videocapturer.cc
diff --git a/webrtc/media/base/videocapturer.cc b/webrtc/media/base/videocapturer.cc
index a98f2f547ffd486a0d77084ce25f828338d2d54a..7853134aa8f084ce798a63507132480c0a560361 100644
--- a/webrtc/media/base/videocapturer.cc
+++ b/webrtc/media/base/videocapturer.cc
@@ -183,11 +183,6 @@ void VideoCapturer::set_frame_factory(VideoFrameFactory* frame_factory) {
}
}
-void VideoCapturer::GetStats(VideoFormat* last_captured_frame_format) {
- rtc::CritScope cs(&frame_stats_crit_);
- *last_captured_frame_format = last_captured_frame_format_;
-}
-
void VideoCapturer::RemoveSink(
rtc::VideoSinkInterface<cricket::VideoFrame>* sink) {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
@@ -395,7 +390,6 @@ void VideoCapturer::OnFrameCaptured(VideoCapturer*,
}
SignalVideoFrame(this, adapted_frame.get());
- UpdateStats(captured_frame);
}
void VideoCapturer::OnFrame(VideoCapturer* capturer, const VideoFrame* frame) {
@@ -540,15 +534,4 @@ bool VideoCapturer::ShouldFilterFormat(const VideoFormat& format) const {
format.height > max_format_->height;
}
-void VideoCapturer::UpdateStats(const CapturedFrame* captured_frame) {
- // Update stats protected from fetches from different thread.
- rtc::CritScope cs(&frame_stats_crit_);
-
- last_captured_frame_format_.width = captured_frame->width;
- last_captured_frame_format_.height = captured_frame->height;
- // TODO(ronghuawu): Useful to report interval as well?
- last_captured_frame_format_.interval = 0;
- last_captured_frame_format_.fourcc = captured_frame->fourcc;
-}
-
} // namespace cricket

Powered by Google App Engine
This is Rietveld 408576698