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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 } | 435 } |
436 | 436 |
437 return rtp_states; | 437 return rtp_states; |
438 } | 438 } |
439 | 439 |
440 void VideoSendStream::SignalNetworkState(NetworkState state) { | 440 void VideoSendStream::SignalNetworkState(NetworkState state) { |
441 // When network goes up, enable RTCP status before setting transmission state. | 441 // When network goes up, enable RTCP status before setting transmission state. |
442 // When it goes down, disable RTCP afterwards. This ensures that any packets | 442 // When it goes down, disable RTCP afterwards. This ensures that any packets |
443 // sent due to the network state changed will not be dropped. | 443 // sent due to the network state changed will not be dropped. |
444 if (state == kNetworkUp) | 444 if (state == kNetworkUp) |
445 vie_channel_->SetRTCPMode(kRtcpCompound); | 445 vie_channel_->SetRTCPMode(RtcpMode::COMPOUND); |
446 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp); | 446 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp); |
447 if (state == kNetworkDown) | 447 if (state == kNetworkDown) |
448 vie_channel_->SetRTCPMode(kRtcpOff); | 448 vie_channel_->SetRTCPMode(RtcpMode::OFF); |
449 } | 449 } |
450 | 450 |
451 int64_t VideoSendStream::GetRtt() const { | 451 int64_t VideoSendStream::GetRtt() const { |
452 webrtc::RtcpStatistics rtcp_stats; | 452 webrtc::RtcpStatistics rtcp_stats; |
453 uint16_t frac_lost; | 453 uint16_t frac_lost; |
454 uint32_t cumulative_lost; | 454 uint32_t cumulative_lost; |
455 uint32_t extended_max_sequence_number; | 455 uint32_t extended_max_sequence_number; |
456 uint32_t jitter; | 456 uint32_t jitter; |
457 int64_t rtt_ms; | 457 int64_t rtt_ms; |
458 if (vie_channel_->GetSendRtcpStatistics(&frac_lost, &cumulative_lost, | 458 if (vie_channel_->GetSendRtcpStatistics(&frac_lost, &cumulative_lost, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 vie_channel_->IsSendingFecEnabled()); | 502 vie_channel_->IsSendingFecEnabled()); |
503 | 503 |
504 // Restart the media flow | 504 // Restart the media flow |
505 vie_encoder_->Restart(); | 505 vie_encoder_->Restart(); |
506 | 506 |
507 return true; | 507 return true; |
508 } | 508 } |
509 | 509 |
510 } // namespace internal | 510 } // namespace internal |
511 } // namespace webrtc | 511 } // namespace webrtc |
OLD | NEW |