| 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 |
| 11 // This file contains interfaces for MediaStream, MediaTrack and MediaSource. | 11 // This file contains interfaces for MediaStream, MediaTrack and MediaSource. |
| 12 // These interfaces are used for implementing MediaStream and MediaTrack as | 12 // These interfaces are used for implementing MediaStream and MediaTrack as |
| 13 // defined in http://dev.w3.org/2011/webrtc/editor/webrtc.html#stream-api. These | 13 // defined in http://dev.w3.org/2011/webrtc/editor/webrtc.html#stream-api. These |
| 14 // interfaces must be used only with PeerConnection. PeerConnectionManager | 14 // interfaces must be used only with PeerConnection. PeerConnectionManager |
| 15 // interface provides the factory methods to create MediaStream and MediaTracks. | 15 // interface provides the factory methods to create MediaStream and MediaTracks. |
| 16 | 16 |
| 17 #ifndef WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 17 #ifndef WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
| 18 #define WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 18 #define WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
| 19 | 19 |
| 20 #include <string> | 20 #include <string> |
| 21 #include <vector> | 21 #include <vector> |
| 22 | 22 |
| 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/base/optional.h" |
| 26 #include "webrtc/media/base/mediachannel.h" | 27 #include "webrtc/media/base/mediachannel.h" |
| 27 #include "webrtc/media/base/videosinkinterface.h" | 28 #include "webrtc/media/base/videosinkinterface.h" |
| 28 #include "webrtc/media/base/videosourceinterface.h" | 29 #include "webrtc/media/base/videosourceinterface.h" |
| 29 | 30 |
| 30 namespace cricket { | 31 namespace cricket { |
| 31 | 32 |
| 32 class AudioRenderer; | 33 class AudioRenderer; |
| 33 class VideoCapturer; | 34 class VideoCapturer; |
| 34 class VideoRenderer; | 35 class VideoRenderer; |
| 35 class VideoFrame; | 36 class VideoFrame; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 virtual void Stop() = 0; | 118 virtual void Stop() = 0; |
| 118 virtual void Restart() = 0; | 119 virtual void Restart() = 0; |
| 119 | 120 |
| 120 // Indicates that parameters suitable for screencasts should be automatically | 121 // Indicates that parameters suitable for screencasts should be automatically |
| 121 // applied to RtpSenders. | 122 // applied to RtpSenders. |
| 122 // TODO(perkj): Remove these once all known applications have moved to | 123 // TODO(perkj): Remove these once all known applications have moved to |
| 123 // explicitly setting suitable parameters for screencasts and dont' need this | 124 // explicitly setting suitable parameters for screencasts and dont' need this |
| 124 // implicit behavior. | 125 // implicit behavior. |
| 125 virtual bool is_screencast() const = 0; | 126 virtual bool is_screencast() const = 0; |
| 126 | 127 |
| 127 // Indicates that the encoder should denoise the video before encoding it. | 128 // Indicates that the encoder should denoise video before encoding it. |
| 129 // If it is not set, the default configuration is used which is different |
| 130 // depending on video codec. |
| 128 // 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 |
| 129 // the encoder. | 132 // the encoder. |
| 130 virtual bool needs_denoising() const = 0; | 133 virtual rtc::Optional<bool> needs_denoising() const = 0; |
| 131 | 134 |
| 132 protected: | 135 protected: |
| 133 virtual ~VideoTrackSourceInterface() {} | 136 virtual ~VideoTrackSourceInterface() {} |
| 134 }; | 137 }; |
| 135 | 138 |
| 136 class VideoTrackInterface | 139 class VideoTrackInterface |
| 137 : public MediaStreamTrackInterface, | 140 : public MediaStreamTrackInterface, |
| 138 public rtc::VideoSourceInterface<cricket::VideoFrame> { | 141 public rtc::VideoSourceInterface<cricket::VideoFrame> { |
| 139 public: | 142 public: |
| 140 // Register a video sink for this track. | 143 // Register a video sink for this track. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; | 268 virtual bool RemoveTrack(AudioTrackInterface* track) = 0; |
| 266 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; | 269 virtual bool RemoveTrack(VideoTrackInterface* track) = 0; |
| 267 | 270 |
| 268 protected: | 271 protected: |
| 269 virtual ~MediaStreamInterface() {} | 272 virtual ~MediaStreamInterface() {} |
| 270 }; | 273 }; |
| 271 | 274 |
| 272 } // namespace webrtc | 275 } // namespace webrtc |
| 273 | 276 |
| 274 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ | 277 #endif // WEBRTC_API_MEDIASTREAMINTERFACE_H_ |
| OLD | NEW |