Index: webrtc/api/mediastreaminterface.h |
diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h |
index 1ea094b71454aaa2ff337b49a4da9534d3bdc1f3..25a50a192753abfea309cbd187a4ea2c1d14bea2 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; |
@@ -105,6 +109,11 @@ class VideoTrackSourceInterface |
: public MediaSourceInterface, |
public rtc::VideoSourceInterface<cricket::VideoFrame> { |
public: |
+ struct Stats { |
+ // Original size of captured frame, 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. |
@@ -129,6 +138,10 @@ class VideoTrackSourceInterface |
// the encoder. |
virtual bool needs_denoising() const = 0; |
+ // Returns false if no stats are available, e.g, for a remote |
+ // source, or a source which has not seen its first frame yet. |
tommi
2016/03/31 14:59:56
add a note that the implementation should avoid bl
nisse-webrtc
2016/04/01 06:28:28
Done.
|
+ virtual bool GetStats(Stats* stats) = 0; |
tommi
2016/03/31 14:59:56
have you checked if there are implementations of V
nisse-webrtc
2016/04/01 06:28:28
I don't find any. This class was added by Per quit
|
+ |
protected: |
virtual ~VideoTrackSourceInterface() {} |
}; |