Index: talk/app/webrtc/mediastreaminterface.h |
diff --git a/talk/app/webrtc/mediastreaminterface.h b/talk/app/webrtc/mediastreaminterface.h |
index 8d6feb02ef268a8115985d517e13cd0a40a018a3..2d2dc9ac9c5fb06d8aa25ba070f0f7f427cfd1ea 100644 |
--- a/talk/app/webrtc/mediastreaminterface.h |
+++ b/talk/app/webrtc/mediastreaminterface.h |
@@ -147,6 +147,26 @@ class VideoTrackInterface : public MediaStreamTrackInterface { |
virtual VideoSourceInterface* GetSource() const = 0; |
+ // Return the track input sink. I.e., frames sent to this sink are |
+ // propagated to all renderers registered with the track. The |
+ // returned sink must not change between calls. Currently, this |
+ // method is used for remote tracks (VideoRtpReceiver); further |
+ // refactoring is planned for this path, it's unclear if this method |
+ // belongs here long term. |
+ |
+ // We do this instead of simply implementing the |
+ // VideoSourceInterface directly, because if we did the latter, we'd |
+ // need an OnFrame method in VideoTrackProxy, with a thread jump on |
+ // each call. |
+ |
+ // TODO(nisse): It has a default implementation so that mock |
+ // objects, in particular, chrome's MockWebRtcVideoTrack, doesn't |
+ // need to know about it. Consider removing the implementation (or |
+ // this comment) after refactoring dust settles. |
+ virtual rtc::VideoSinkInterface<cricket::VideoFrame>* GetSink() { |
+ return nullptr; |
+ }; |
+ |
protected: |
virtual ~VideoTrackInterface() {} |
}; |