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

Unified Diff: webrtc/api/mediastreaminterface.h

Issue 1827023002: Get VideoCapturer stats via VideoTrackSourceInterface in StatsCollector, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments from Peter and Taylor. 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
« no previous file with comments | « no previous file | webrtc/api/statscollector.h » ('j') | webrtc/api/videocapturertracksource.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/mediastreaminterface.h
diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h
index 3e79b94f9efd7e7f143d09ddb50f269f8702e0e4..7c0d82a13689b36f0bd6f83518909e71ba8d67ad 100644
--- a/webrtc/api/mediastreaminterface.h
+++ b/webrtc/api/mediastreaminterface.h
@@ -87,6 +87,10 @@ class MediaStreamTrackInterface : public rtc::RefCountInterface,
static const char kAudioKind[];
static const char kVideoKind[];
+ // The kind() method must return kAudioKind only if the object is a
+ // subclass of AudioTrackInterface, and kVideoKind only if the
+ // object is a subclass of VideoTrackInterface. It is typically used
+ // to protect a static_cast<> to the corresponding subclass.
virtual std::string kind() const = 0;
virtual std::string id() const = 0;
virtual bool enabled() const = 0;
@@ -103,6 +107,11 @@ class VideoTrackSourceInterface
: public MediaSourceInterface,
public rtc::VideoSourceInterface<cricket::VideoFrame> {
public:
+ struct Stats {
+ // Original frame size, before video adaptation.
+ int input_width;
+ int input_height;
+ };
// Get access to the source implementation of cricket::VideoCapturer.
// This can be used for receiving frames and state notifications.
// But it should not be used for starting or stopping capturing.
@@ -127,6 +136,8 @@ class VideoTrackSourceInterface
// the encoder.
virtual bool needs_denoising() const = 0;
+ virtual bool GetStats(Stats* stats) = 0;
pbos-webrtc 2016/03/31 11:50:46 I assume this is intended to fail if we haven't go
perkj_webrtc 2016/03/31 11:57:30 prefer void.
nisse-webrtc 2016/03/31 12:07:27 What should a VideoTrackSource (used for remote so
nisse-webrtc 2016/03/31 12:07:27 It's intended to fail if the source doesn't have a
perkj_webrtc 2016/03/31 12:13:31 I see. Ok - please then document when this returns
+
protected:
virtual ~VideoTrackSourceInterface() {}
};
« no previous file with comments | « no previous file | webrtc/api/statscollector.h » ('j') | webrtc/api/videocapturertracksource.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698