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

Unified Diff: webrtc/api/videocapturertracksource.cc

Issue 1827023002: Get VideoCapturer stats via VideoTrackSourceInterface in StatsCollector, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Move logic back to StatsCollector, with an explicit cast to VideoTrackInterface* 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/api/videocapturertracksource.cc
diff --git a/webrtc/api/videocapturertracksource.cc b/webrtc/api/videocapturertracksource.cc
index e292c7a065ce2dcb828d101df67a0188be5e7f3e..16e89c853dd8a6f54bfbc2cd43750a8ea3120f17 100644
--- a/webrtc/api/videocapturertracksource.cc
+++ b/webrtc/api/videocapturertracksource.cc
@@ -362,6 +362,15 @@ void VideoCapturerTrackSource::Initialize(
// Initialize hasn't succeeded until a successful state change has occurred.
}
+bool VideoCapturerTrackSource::GetStats(Stats* stats) {
+ cricket::VideoFormat last_captured_frame_format;
+ video_capturer_->GetStats(&last_captured_frame_format);
+ stats->input_width = last_captured_frame_format.width;
+ stats->input_height = last_captured_frame_format.height;
+
+ return true;
+}
+
void VideoCapturerTrackSource::Stop() {
if (!started_) {
return;

Powered by Google App Engine
This is Rietveld 408576698