| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2013 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 207 | 207 | 
| 208   // Starts stream activity. | 208   // Starts stream activity. | 
| 209   // When a stream is active, it can receive, process and deliver packets. | 209   // When a stream is active, it can receive, process and deliver packets. | 
| 210   virtual void Start() = 0; | 210   virtual void Start() = 0; | 
| 211   // Stops stream activity. | 211   // Stops stream activity. | 
| 212   // When a stream is stopped, it can't receive, process or deliver packets. | 212   // When a stream is stopped, it can't receive, process or deliver packets. | 
| 213   virtual void Stop() = 0; | 213   virtual void Stop() = 0; | 
| 214 | 214 | 
| 215   // Based on the spec in | 215   // Based on the spec in | 
| 216   // https://w3c.github.io/webrtc-pc/#idl-def-rtcdegradationpreference. | 216   // https://w3c.github.io/webrtc-pc/#idl-def-rtcdegradationpreference. | 
|  | 217   // These options are enforced on a best-effort basis. For instance, all of | 
|  | 218   // these options may suffer some frame drops in order to avoid queuing. | 
|  | 219   // TODO(sprang): Look into possibility of more strictly enforcing the | 
|  | 220   // maintain-framerate option. | 
| 217   enum class DegradationPreference { | 221   enum class DegradationPreference { | 
|  | 222     // Don't take any actions based on over-utilization signals. | 
|  | 223     kDegradationDisabled, | 
|  | 224     // On over-use, request lost resolution, possibly causing down-scaling. | 
| 218     kMaintainResolution, | 225     kMaintainResolution, | 
| 219     // TODO(perkj): Implement kMaintainFrameRate. kBalanced will drop frames | 226     // On over-use, request lower frame rate, possible causing frame drops. | 
| 220     // if the encoder overshoots or the encoder can not encode fast enough. | 227     kMaintainFramerate, | 
|  | 228     // Try to strike a "pleasing" balance between frame rate or resolution. | 
| 221     kBalanced, | 229     kBalanced, | 
| 222   }; | 230   }; | 
|  | 231 | 
| 223   virtual void SetSource( | 232   virtual void SetSource( | 
| 224       rtc::VideoSourceInterface<webrtc::VideoFrame>* source, | 233       rtc::VideoSourceInterface<webrtc::VideoFrame>* source, | 
| 225       const DegradationPreference& degradation_preference) = 0; | 234       const DegradationPreference& degradation_preference) = 0; | 
| 226 | 235 | 
| 227   // Set which streams to send. Must have at least as many SSRCs as configured | 236   // Set which streams to send. Must have at least as many SSRCs as configured | 
| 228   // in the config. Encoder settings are passed on to the encoder instance along | 237   // in the config. Encoder settings are passed on to the encoder instance along | 
| 229   // with the VideoStream settings. | 238   // with the VideoStream settings. | 
| 230   virtual void ReconfigureVideoEncoder(VideoEncoderConfig config) = 0; | 239   virtual void ReconfigureVideoEncoder(VideoEncoderConfig config) = 0; | 
| 231 | 240 | 
| 232   virtual Stats GetStats() = 0; | 241   virtual Stats GetStats() = 0; | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 247     EnableEncodedFrameRecording(std::vector<rtc::PlatformFile>(), 0); | 256     EnableEncodedFrameRecording(std::vector<rtc::PlatformFile>(), 0); | 
| 248   } | 257   } | 
| 249 | 258 | 
| 250  protected: | 259  protected: | 
| 251   virtual ~VideoSendStream() {} | 260   virtual ~VideoSendStream() {} | 
| 252 }; | 261 }; | 
| 253 | 262 | 
| 254 }  // namespace webrtc | 263 }  // namespace webrtc | 
| 255 | 264 | 
| 256 #endif  // WEBRTC_VIDEO_SEND_STREAM_H_ | 265 #endif  // WEBRTC_VIDEO_SEND_STREAM_H_ | 
| OLD | NEW | 
|---|