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

Unified Diff: talk/app/webrtc/mediastreaminterface.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 | « no previous file | talk/app/webrtc/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/mediastreaminterface.h
diff --git a/talk/app/webrtc/mediastreaminterface.h b/talk/app/webrtc/mediastreaminterface.h
index 9b137d9f761006bc45477b455fc58b91236a7069..f2543bb0b7288f9d4b13a75ac02ed0ff89015e8e 100644
--- a/talk/app/webrtc/mediastreaminterface.h
+++ b/talk/app/webrtc/mediastreaminterface.h
@@ -40,6 +40,7 @@
#include "webrtc/base/basictypes.h"
#include "webrtc/base/refcount.h"
#include "webrtc/base/scoped_ref_ptr.h"
+#include "webrtc/media/base/videosinkinterface.h"
namespace cricket {
@@ -116,12 +117,17 @@ class MediaStreamTrackInterface : public rtc::RefCountInterface,
};
// Interface for rendering VideoFrames from a VideoTrack
-class VideoRendererInterface {
+class VideoRendererInterface
+ : public rtc::VideoSinkInterface<cricket::VideoFrame> {
public:
// |frame| may have pending rotation. For clients which can't apply rotation,
// |frame|->GetCopyWithRotationApplied() will return a frame that has the
// rotation applied.
virtual void RenderFrame(const cricket::VideoFrame* frame) = 0;
+ // Intended to replace RenderFrame.
+ void OnFrame(const cricket::VideoFrame& frame) override {
+ RenderFrame(&frame);
+ }
protected:
// The destructor is protected to prevent deletion via the interface.
« no previous file with comments | « no previous file | talk/app/webrtc/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698