Index: talk/app/webrtc/videosourceinterface.h |
diff --git a/talk/app/webrtc/videosourceinterface.h b/talk/app/webrtc/videosourceinterface.h |
index a90e3d5a48f5eeb773db59e5e2ab35f728757d6c..e81142a20f1a23c25c129c178c72e45df178829f 100644 |
--- a/talk/app/webrtc/videosourceinterface.h |
+++ b/talk/app/webrtc/videosourceinterface.h |
@@ -30,6 +30,7 @@ |
#include "talk/app/webrtc/mediastreaminterface.h" |
#include "talk/media/base/mediachannel.h" |
+#include "talk/media/base/videorenderer.h" |
namespace webrtc { |
@@ -48,9 +49,27 @@ class VideoSourceInterface : public MediaSourceInterface { |
virtual void Stop() = 0; |
virtual void Restart() = 0; |
+ // TODO(nisse): Delete these backwards compatibility wrappers after |
+ // chrome is updated. Needed now because chrome's MockVideoSource |
+ // defines a method with this signature (and marked with override). |
+ // In addition, we need a dummy default implementation for the new |
+ // AddSink/RemoveSink methods below, because they're unimplemented |
+ // in the same class. This is ugly, but for MockVideoSource it |
+ // doesn't really matter what these methods do, because they're not |
+ // used. |
+ virtual void AddSink(cricket::VideoRenderer* output) { |
+ AddSink(static_cast<rtc::VideoSinkInterface<cricket::VideoFrame>*>(output)); |
+ } |
+ virtual void RemoveSink(cricket::VideoRenderer* output) { |
+ RemoveSink( |
+ static_cast<rtc::VideoSinkInterface<cricket::VideoFrame>*>(output)); |
+ } |
+ |
// Adds |output| to the source to receive frames. |
- virtual void AddSink(cricket::VideoRenderer* output) = 0; |
- virtual void RemoveSink(cricket::VideoRenderer* output) = 0; |
+ // TODO(nisse): Delete dummy default implementation. |
+ virtual void AddSink(rtc::VideoSinkInterface<cricket::VideoFrame>* output){}; |
+ virtual void RemoveSink( |
+ rtc::VideoSinkInterface<cricket::VideoFrame>* output){}; |
virtual const cricket::VideoOptions* options() const = 0; |
virtual cricket::VideoRenderer* FrameInput() = 0; |