| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 protected: | 96 protected: |
| 97 virtual ~MediaStreamTrackInterface() {} | 97 virtual ~MediaStreamTrackInterface() {} |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 // VideoTrackSourceInterface is a reference counted source used for VideoTracks. | 100 // VideoTrackSourceInterface is a reference counted source used for VideoTracks. |
| 101 // The same source can be used in multiple VideoTracks. | 101 // The same source can be used in multiple VideoTracks. |
| 102 class VideoTrackSourceInterface | 102 class VideoTrackSourceInterface |
| 103 : public MediaSourceInterface, | 103 : public MediaSourceInterface, |
| 104 public rtc::VideoSourceInterface<cricket::VideoFrame> { | 104 public rtc::VideoSourceInterface<cricket::VideoFrame> { |
| 105 public: | 105 public: |
| 106 struct Stats { |
| 107 // Original frame size, before video adaptation. |
| 108 int input_width; |
| 109 int input_height; |
| 110 }; |
| 106 // Get access to the source implementation of cricket::VideoCapturer. | 111 // Get access to the source implementation of cricket::VideoCapturer. |
| 107 // This can be used for receiving frames and state notifications. | 112 // This can be used for receiving frames and state notifications. |
| 108 // But it should not be used for starting or stopping capturing. | 113 // But it should not be used for starting or stopping capturing. |
| 109 // TODO(perkj): We are currently trying to replace all internal use of | 114 // TODO(perkj): We are currently trying to replace all internal use of |
| 110 // cricket::VideoCapturer with rtc::VideoSourceInterface. Once that | 115 // cricket::VideoCapturer with rtc::VideoSourceInterface. Once that |
| 111 // refactoring is done, | 116 // refactoring is done, |
| 112 // remove this method. | 117 // remove this method. |
| 113 virtual cricket::VideoCapturer* GetVideoCapturer() = 0; | 118 virtual cricket::VideoCapturer* GetVideoCapturer() = 0; |
| 114 | 119 |
| 115 virtual void Stop() = 0; | 120 virtual void Stop() = 0; |
| 116 virtual void Restart() = 0; | 121 virtual void Restart() = 0; |
| 117 | 122 |
| 118 // Indicates that parameters suitable for screencasts should be automatically | 123 // Indicates that parameters suitable for screencasts should be automatically |
| 119 // applied to RtpSenders. | 124 // applied to RtpSenders. |
| 120 // TODO(perkj): Remove these once all known applications have moved to | 125 // TODO(perkj): Remove these once all known applications have moved to |
| 121 // explicitly setting suitable parameters for screencasts and dont' need this | 126 // explicitly setting suitable parameters for screencasts and dont' need this |
| 122 // implicit behavior. | 127 // implicit behavior. |
| 123 virtual bool is_screencast() const = 0; | 128 virtual bool is_screencast() const = 0; |
| 124 | 129 |
| 125 // Indicates that the encoder should denoise the video before encoding it. | 130 // Indicates that the encoder should denoise the video before encoding it. |
| 126 // TODO(perkj): Remove this once denoising is done by the source, and not by | 131 // TODO(perkj): Remove this once denoising is done by the source, and not by |
| 127 // the encoder. | 132 // the encoder. |
| 128 virtual bool needs_denoising() const = 0; | 133 virtual bool needs_denoising() const = 0; |
| 129 | 134 |
| 135 virtual bool GetStats(Stats* stats) = 0; |
| 136 |
| 130 protected: | 137 protected: |
| 131 virtual ~VideoTrackSourceInterface() {} | 138 virtual ~VideoTrackSourceInterface() {} |
| 132 }; | 139 }; |
| 133 | 140 |
| 134 class VideoTrackInterface | 141 class VideoTrackInterface |
| 135 : public MediaStreamTrackInterface, | 142 : public MediaStreamTrackInterface, |
| 136 public rtc::VideoSourceInterface<cricket::VideoFrame> { | 143 public rtc::VideoSourceInterface<cricket::VideoFrame> { |
| 137 public: | 144 public: |
| 138 // Register a video sink for this track. | 145 // Register a video sink for this track. |
| 139 void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink, | 146 void AddOrUpdateSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 270 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
| 264 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 271 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
| 265 | 272 |
| 266 protected: | 273 protected: |
| 267 virtual ~MediaStreamInterface() {} | 274 virtual ~MediaStreamInterface() {} |
| 268 }; | 275 }; |
| 269 | 276 |
| 270 } // namespace webrtc | 277 } // namespace webrtc |
| 271 | 278 |
| 272 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 279 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
| OLD | NEW |