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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 protected: | 97 protected: |
99 virtual ~MediaStreamTrackInterface() {} | 98 virtual ~MediaStreamTrackInterface() {} |
100 }; | 99 }; |
101 | 100 |
102 // VideoTrackSourceInterface is a reference counted source used for VideoTracks. | 101 // VideoTrackSourceInterface is a reference counted source used for VideoTracks. |
103 // The same source can be used in multiple VideoTracks. | 102 // The same source can be used in multiple VideoTracks. |
104 class VideoTrackSourceInterface | 103 class VideoTrackSourceInterface |
105 : public MediaSourceInterface, | 104 : public MediaSourceInterface, |
106 public rtc::VideoSourceInterface<cricket::VideoFrame> { | 105 public rtc::VideoSourceInterface<cricket::VideoFrame> { |
107 public: | 106 public: |
108 // Get access to the source implementation of cricket::VideoCapturer. | |
109 // This can be used for receiving frames and state notifications. | |
110 // But it should not be used for starting or stopping capturing. | |
111 // TODO(perkj): We are currently trying to replace all internal use of | |
112 // cricket::VideoCapturer with rtc::VideoSourceInterface. Once that | |
113 // refactoring is done, | |
114 // remove this method. | |
115 virtual cricket::VideoCapturer* GetVideoCapturer() = 0; | |
116 | |
117 virtual void Stop() = 0; | 107 virtual void Stop() = 0; |
118 virtual void Restart() = 0; | 108 virtual void Restart() = 0; |
119 | 109 |
120 // Indicates that parameters suitable for screencasts should be automatically | 110 // Indicates that parameters suitable for screencasts should be automatically |
121 // applied to RtpSenders. | 111 // applied to RtpSenders. |
122 // TODO(perkj): Remove these once all known applications have moved to | 112 // TODO(perkj): Remove these once all known applications have moved to |
123 // explicitly setting suitable parameters for screencasts and dont' need this | 113 // explicitly setting suitable parameters for screencasts and dont' need this |
124 // implicit behavior. | 114 // implicit behavior. |
125 virtual bool is_screencast() const = 0; | 115 virtual bool is_screencast() const = 0; |
126 | 116 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 255 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
266 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 256 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
267 | 257 |
268 protected: | 258 protected: |
269 virtual ~MediaStreamInterface() {} | 259 virtual ~MediaStreamInterface() {} |
270 }; | 260 }; |
271 | 261 |
272 } // namespace webrtc | 262 } // namespace webrtc |
273 | 263 |
274 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 264 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
OLD | NEW |