| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 | 241 |
| 242 // Wrapper for the sender part, this is where the source is connected and | 242 // Wrapper for the sender part, this is where the source is connected and |
| 243 // frames are then converted from cricket frames to webrtc frames. | 243 // frames are then converted from cricket frames to webrtc frames. |
| 244 class WebRtcVideoSendStream | 244 class WebRtcVideoSendStream |
| 245 : public rtc::VideoSinkInterface<cricket::VideoFrame>, | 245 : public rtc::VideoSinkInterface<cricket::VideoFrame>, |
| 246 public webrtc::LoadObserver { | 246 public webrtc::LoadObserver { |
| 247 public: | 247 public: |
| 248 WebRtcVideoSendStream( | 248 WebRtcVideoSendStream( |
| 249 webrtc::Call* call, | 249 webrtc::Call* call, |
| 250 const StreamParams& sp, | 250 const StreamParams& sp, |
| 251 const webrtc::VideoSendStream::Config& config, | 251 webrtc::VideoSendStream::Config config, |
| 252 const VideoOptions& options, | 252 const VideoOptions& options, |
| 253 WebRtcVideoEncoderFactory* external_encoder_factory, | 253 WebRtcVideoEncoderFactory* external_encoder_factory, |
| 254 bool enable_cpu_overuse_detection, | 254 bool enable_cpu_overuse_detection, |
| 255 int max_bitrate_bps, | 255 int max_bitrate_bps, |
| 256 const rtc::Optional<VideoCodecSettings>& codec_settings, | 256 const rtc::Optional<VideoCodecSettings>& codec_settings, |
| 257 const rtc::Optional<std::vector<webrtc::RtpExtension>>& rtp_extensions, | 257 const rtc::Optional<std::vector<webrtc::RtpExtension>>& rtp_extensions, |
| 258 const VideoSendParameters& send_params); | 258 const VideoSendParameters& send_params); |
| 259 virtual ~WebRtcVideoSendStream(); | 259 virtual ~WebRtcVideoSendStream(); |
| 260 | 260 |
| 261 void SetSendParameters(const ChangedSendParameters& send_params); | 261 void SetSendParameters(const ChangedSendParameters& send_params); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 277 VideoSenderInfo GetVideoSenderInfo(bool log_stats); | 277 VideoSenderInfo GetVideoSenderInfo(bool log_stats); |
| 278 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); | 278 void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); |
| 279 | 279 |
| 280 private: | 280 private: |
| 281 // Parameters needed to reconstruct the underlying stream. | 281 // Parameters needed to reconstruct the underlying stream. |
| 282 // webrtc::VideoSendStream doesn't support setting a lot of options on the | 282 // webrtc::VideoSendStream doesn't support setting a lot of options on the |
| 283 // fly, so when those need to be changed we tear down and reconstruct with | 283 // fly, so when those need to be changed we tear down and reconstruct with |
| 284 // similar parameters depending on which options changed etc. | 284 // similar parameters depending on which options changed etc. |
| 285 struct VideoSendStreamParameters { | 285 struct VideoSendStreamParameters { |
| 286 VideoSendStreamParameters( | 286 VideoSendStreamParameters( |
| 287 const webrtc::VideoSendStream::Config& config, | 287 webrtc::VideoSendStream::Config config, |
| 288 const VideoOptions& options, | 288 const VideoOptions& options, |
| 289 int max_bitrate_bps, | 289 int max_bitrate_bps, |
| 290 const rtc::Optional<VideoCodecSettings>& codec_settings); | 290 const rtc::Optional<VideoCodecSettings>& codec_settings); |
| 291 webrtc::VideoSendStream::Config config; | 291 webrtc::VideoSendStream::Config config; |
| 292 VideoOptions options; | 292 VideoOptions options; |
| 293 int max_bitrate_bps; | 293 int max_bitrate_bps; |
| 294 bool conference_mode; | 294 bool conference_mode; |
| 295 rtc::Optional<VideoCodecSettings> codec_settings; | 295 rtc::Optional<VideoCodecSettings> codec_settings; |
| 296 // Sent resolutions + bitrates etc. by the underlying VideoSendStream, | 296 // Sent resolutions + bitrates etc. by the underlying VideoSendStream, |
| 297 // typically changes when setting a new resolution or reconfiguring | 297 // typically changes when setting a new resolution or reconfiguring |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 VideoSendParameters send_params_; | 556 VideoSendParameters send_params_; |
| 557 VideoOptions default_send_options_; | 557 VideoOptions default_send_options_; |
| 558 VideoRecvParameters recv_params_; | 558 VideoRecvParameters recv_params_; |
| 559 bool red_disabled_by_remote_side_; | 559 bool red_disabled_by_remote_side_; |
| 560 int64_t last_stats_log_ms_; | 560 int64_t last_stats_log_ms_; |
| 561 }; | 561 }; |
| 562 | 562 |
| 563 } // namespace cricket | 563 } // namespace cricket |
| 564 | 564 |
| 565 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 565 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |