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

Side by Side Diff: talk/app/webrtc/mediastreaminterface.h

Issue 1646463002: Revert of New rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/rtpsenderreceiver_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 22 matching lines...) Expand all
33 33
34 #ifndef TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ 34 #ifndef TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_
35 #define TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ 35 #define TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_
36 36
37 #include <string> 37 #include <string>
38 #include <vector> 38 #include <vector>
39 39
40 #include "webrtc/base/basictypes.h" 40 #include "webrtc/base/basictypes.h"
41 #include "webrtc/base/refcount.h" 41 #include "webrtc/base/refcount.h"
42 #include "webrtc/base/scoped_ref_ptr.h" 42 #include "webrtc/base/scoped_ref_ptr.h"
43 #include "webrtc/media/base/videosinkinterface.h"
44 43
45 namespace cricket { 44 namespace cricket {
46 45
47 class AudioRenderer; 46 class AudioRenderer;
48 class VideoCapturer; 47 class VideoCapturer;
49 class VideoRenderer; 48 class VideoRenderer;
50 class VideoFrame; 49 class VideoFrame;
51 50
52 } // namespace cricket 51 } // namespace cricket
53 52
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual TrackState state() const = 0; 109 virtual TrackState state() const = 0;
111 virtual bool set_enabled(bool enable) = 0; 110 virtual bool set_enabled(bool enable) = 0;
112 // These methods should be called by implementation only. 111 // These methods should be called by implementation only.
113 virtual bool set_state(TrackState new_state) = 0; 112 virtual bool set_state(TrackState new_state) = 0;
114 113
115 protected: 114 protected:
116 virtual ~MediaStreamTrackInterface() {} 115 virtual ~MediaStreamTrackInterface() {}
117 }; 116 };
118 117
119 // Interface for rendering VideoFrames from a VideoTrack 118 // Interface for rendering VideoFrames from a VideoTrack
120 class VideoRendererInterface 119 class VideoRendererInterface {
121 : public rtc::VideoSinkInterface<cricket::VideoFrame> {
122 public: 120 public:
123 // |frame| may have pending rotation. For clients which can't apply rotation, 121 // |frame| may have pending rotation. For clients which can't apply rotation,
124 // |frame|->GetCopyWithRotationApplied() will return a frame that has the 122 // |frame|->GetCopyWithRotationApplied() will return a frame that has the
125 // rotation applied. 123 // rotation applied.
126 virtual void RenderFrame(const cricket::VideoFrame* frame) = 0; 124 virtual void RenderFrame(const cricket::VideoFrame* frame) = 0;
127 // Intended to replace RenderFrame.
128 void OnFrame(const cricket::VideoFrame& frame) override {
129 RenderFrame(&frame);
130 }
131 125
132 protected: 126 protected:
133 // The destructor is protected to prevent deletion via the interface. 127 // The destructor is protected to prevent deletion via the interface.
134 // This is so that we allow reference counted classes, where the destructor 128 // This is so that we allow reference counted classes, where the destructor
135 // should never be public, to implement the interface. 129 // should never be public, to implement the interface.
136 virtual ~VideoRendererInterface() {} 130 virtual ~VideoRendererInterface() {}
137 }; 131 };
138 132
139 class VideoSourceInterface; 133 class VideoSourceInterface;
140 134
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; 267 virtual bool RemoveTrack(AudioTrackInterface* track) = 0;
274 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; 268 virtual bool RemoveTrack(VideoTrackInterface* track) = 0;
275 269
276 protected: 270 protected:
277 virtual ~MediaStreamInterface() {} 271 virtual ~MediaStreamInterface() {}
278 }; 272 };
279 273
280 } // namespace webrtc 274 } // namespace webrtc
281 275
282 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_ 276 #endif // TALK_APP_WEBRTC_MEDIASTREAMINTERFACE_H_
OLDNEW
« 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