OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "webrtc/base/basictypes.h" | 23 #include "webrtc/base/basictypes.h" |
24 #include "webrtc/base/refcount.h" | 24 #include "webrtc/base/refcount.h" |
25 #include "webrtc/base/scoped_ref_ptr.h" | 25 #include "webrtc/base/scoped_ref_ptr.h" |
26 #include "webrtc/media/base/mediachannel.h" | 26 #include "webrtc/media/base/mediachannel.h" |
27 #include "webrtc/media/base/videosinkinterface.h" | 27 #include "webrtc/media/base/videosinkinterface.h" |
28 #include "webrtc/media/base/videosourceinterface.h" | 28 #include "webrtc/media/base/videosourceinterface.h" |
29 | 29 |
30 namespace cricket { | 30 namespace cricket { |
31 | 31 |
32 class AudioRenderer; | 32 class AudioRenderer; |
33 class VideoCapturer; | |
34 class VideoRenderer; | 33 class VideoRenderer; |
35 class VideoFrame; | 34 class VideoFrame; |
36 | 35 |
37 } // namespace cricket | 36 } // namespace cricket |
38 | 37 |
39 namespace webrtc { | 38 namespace webrtc { |
40 | 39 |
41 // Generic observer interface. | 40 // Generic observer interface. |
42 class ObserverInterface { | 41 class ObserverInterface { |
43 public: | 42 public: |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // should never be public, to implement the interface. | 119 // should never be public, to implement the interface. |
121 virtual ~VideoRendererInterface() {} | 120 virtual ~VideoRendererInterface() {} |
122 }; | 121 }; |
123 | 122 |
124 // VideoTrackSourceInterface is a reference counted source used for VideoTracks. | 123 // VideoTrackSourceInterface is a reference counted source used for VideoTracks. |
125 // The same source can be used in multiple VideoTracks. | 124 // The same source can be used in multiple VideoTracks. |
126 class VideoTrackSourceInterface | 125 class VideoTrackSourceInterface |
127 : public MediaSourceInterface, | 126 : public MediaSourceInterface, |
128 public rtc::VideoSourceInterface<cricket::VideoFrame> { | 127 public rtc::VideoSourceInterface<cricket::VideoFrame> { |
129 public: | 128 public: |
130 // Get access to the source implementation of cricket::VideoCapturer. | |
131 // This can be used for receiving frames and state notifications. | |
132 // But it should not be used for starting or stopping capturing. | |
133 // TODO(perkj): We are currently trying to replace all internal use of | |
134 // cricket::VideoCapturer with rtc::VideoSourceInterface. Once that | |
135 // refactoring is done, | |
136 // remove this method. | |
137 virtual cricket::VideoCapturer* GetVideoCapturer() = 0; | |
138 | |
139 virtual void Stop() = 0; | 129 virtual void Stop() = 0; |
140 virtual void Restart() = 0; | 130 virtual void Restart() = 0; |
141 | 131 |
142 // Indicates that parameters suitable for screencasts should be automatically | 132 // Indicates that parameters suitable for screencasts should be automatically |
143 // applied to RtpSenders. | 133 // applied to RtpSenders. |
144 // TODO(perkj): Remove these once all known applications have moved to | 134 // TODO(perkj): Remove these once all known applications have moved to |
145 // explicitly setting suitable parameters for screencasts and dont' need this | 135 // explicitly setting suitable parameters for screencasts and dont' need this |
146 // implicit behavior. | 136 // implicit behavior. |
147 virtual bool is_screencast() const = 0; | 137 virtual bool is_screencast() const = 0; |
148 | 138 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 287 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
298 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 288 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
299 | 289 |
300 protected: | 290 protected: |
301 virtual ~MediaStreamInterface() {} | 291 virtual ~MediaStreamInterface() {} |
302 }; | 292 }; |
303 | 293 |
304 } // namespace webrtc | 294 } // namespace webrtc |
305 | 295 |
306 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 296 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
OLD | NEW |