| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 const VideoOptions* options, | 267 const VideoOptions* options, |
| 268 rtc::VideoSourceInterface<cricket::VideoFrame>* source); | 268 rtc::VideoSourceInterface<cricket::VideoFrame>* source); |
| 269 void DisconnectSource(); | 269 void DisconnectSource(); |
| 270 | 270 |
| 271 void SetSend(bool send); | 271 void SetSend(bool send); |
| 272 | 272 |
| 273 // Implements webrtc::LoadObserver. | 273 // Implements webrtc::LoadObserver. |
| 274 void OnLoadUpdate(Load load) override; | 274 void OnLoadUpdate(Load load) override; |
| 275 | 275 |
| 276 const std::vector<uint32_t>& GetSsrcs() const; | 276 const std::vector<uint32_t>& GetSsrcs() const; |
| 277 VideoSenderInfo GetVideoSenderInfo(); | 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 const webrtc::VideoSendStream::Config& config, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 bool remb_enabled, | 435 bool remb_enabled, |
| 436 bool transport_cc_enabled, | 436 bool transport_cc_enabled, |
| 437 webrtc::RtcpMode rtcp_mode); | 437 webrtc::RtcpMode rtcp_mode); |
| 438 void SetRecvParameters(const ChangedRecvParameters& recv_params); | 438 void SetRecvParameters(const ChangedRecvParameters& recv_params); |
| 439 | 439 |
| 440 void OnFrame(const webrtc::VideoFrame& frame) override; | 440 void OnFrame(const webrtc::VideoFrame& frame) override; |
| 441 bool IsDefaultStream() const; | 441 bool IsDefaultStream() const; |
| 442 | 442 |
| 443 void SetSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink); | 443 void SetSink(rtc::VideoSinkInterface<cricket::VideoFrame>* sink); |
| 444 | 444 |
| 445 VideoReceiverInfo GetVideoReceiverInfo(); | 445 VideoReceiverInfo GetVideoReceiverInfo(bool log_stats); |
| 446 | 446 |
| 447 // Used to disable RED/FEC when the remote description doesn't contain those | 447 // Used to disable RED/FEC when the remote description doesn't contain those |
| 448 // codecs. This is needed to be able to work around an RTX bug which is only | 448 // codecs. This is needed to be able to work around an RTX bug which is only |
| 449 // happening if the remote side doesn't send RED, but the local side is | 449 // happening if the remote side doesn't send RED, but the local side is |
| 450 // configured to receive RED. | 450 // configured to receive RED. |
| 451 // TODO(holmer): Remove this after a couple of Chrome versions, M53-54 | 451 // TODO(holmer): Remove this after a couple of Chrome versions, M53-54 |
| 452 // time frame. | 452 // time frame. |
| 453 void SetFecDisabledRemotely(bool disable); | 453 void SetFecDisabledRemotely(bool disable); |
| 454 | 454 |
| 455 private: | 455 private: |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 const webrtc::PacketOptions& options) override; | 507 const webrtc::PacketOptions& options) override; |
| 508 bool SendRtcp(const uint8_t* data, size_t len) override; | 508 bool SendRtcp(const uint8_t* data, size_t len) override; |
| 509 | 509 |
| 510 static std::vector<VideoCodecSettings> MapCodecs( | 510 static std::vector<VideoCodecSettings> MapCodecs( |
| 511 const std::vector<VideoCodec>& codecs); | 511 const std::vector<VideoCodec>& codecs); |
| 512 std::vector<VideoCodecSettings> FilterSupportedCodecs( | 512 std::vector<VideoCodecSettings> FilterSupportedCodecs( |
| 513 const std::vector<VideoCodecSettings>& mapped_codecs) const; | 513 const std::vector<VideoCodecSettings>& mapped_codecs) const; |
| 514 static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before, | 514 static bool ReceiveCodecsHaveChanged(std::vector<VideoCodecSettings> before, |
| 515 std::vector<VideoCodecSettings> after); | 515 std::vector<VideoCodecSettings> after); |
| 516 | 516 |
| 517 void FillSenderStats(VideoMediaInfo* info); | 517 void FillSenderStats(VideoMediaInfo* info, bool log_stats); |
| 518 void FillReceiverStats(VideoMediaInfo* info); | 518 void FillReceiverStats(VideoMediaInfo* info, bool log_stats); |
| 519 void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats, | 519 void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats, |
| 520 VideoMediaInfo* info); | 520 VideoMediaInfo* info); |
| 521 | 521 |
| 522 rtc::ThreadChecker thread_checker_; | 522 rtc::ThreadChecker thread_checker_; |
| 523 | 523 |
| 524 uint32_t rtcp_receiver_report_ssrc_; | 524 uint32_t rtcp_receiver_report_ssrc_; |
| 525 bool sending_; | 525 bool sending_; |
| 526 webrtc::Call* const call_; | 526 webrtc::Call* const call_; |
| 527 | 527 |
| 528 DefaultUnsignalledSsrcHandler default_unsignalled_ssrc_handler_; | 528 DefaultUnsignalledSsrcHandler default_unsignalled_ssrc_handler_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 546 WebRtcVideoDecoderFactory* const external_decoder_factory_; | 546 WebRtcVideoDecoderFactory* const external_decoder_factory_; |
| 547 std::vector<VideoCodecSettings> recv_codecs_; | 547 std::vector<VideoCodecSettings> recv_codecs_; |
| 548 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; | 548 std::vector<webrtc::RtpExtension> recv_rtp_extensions_; |
| 549 webrtc::Call::Config::BitrateConfig bitrate_config_; | 549 webrtc::Call::Config::BitrateConfig bitrate_config_; |
| 550 // TODO(deadbeef): Don't duplicate information between | 550 // TODO(deadbeef): Don't duplicate information between |
| 551 // send_params/recv_params, rtp_extensions, options, etc. | 551 // send_params/recv_params, rtp_extensions, options, etc. |
| 552 VideoSendParameters send_params_; | 552 VideoSendParameters send_params_; |
| 553 VideoOptions default_send_options_; | 553 VideoOptions default_send_options_; |
| 554 VideoRecvParameters recv_params_; | 554 VideoRecvParameters recv_params_; |
| 555 bool red_disabled_by_remote_side_; | 555 bool red_disabled_by_remote_side_; |
| 556 int64_t last_stats_log_ms_; |
| 556 }; | 557 }; |
| 557 | 558 |
| 558 } // namespace cricket | 559 } // namespace cricket |
| 559 | 560 |
| 560 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ | 561 #endif // WEBRTC_MEDIA_ENGINE_WEBRTCVIDEOENGINE2_H_ |
| OLD | NEW |