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

Unified Diff: talk/app/webrtc/videosourceinterface.h

Issue 1594973006: New rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Workaround to not break chrome. Created 4 years, 11 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 | « talk/app/webrtc/videosource.cc ('k') | talk/app/webrtc/videosourceproxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « talk/app/webrtc/videosource.cc ('k') | talk/app/webrtc/videosourceproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698