Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 1373903003: Unify newapi::RtcpMode and RTCPMethod. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: ehm, compile the code Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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::kCompound);
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::kOff);
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
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
OLDNEW
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698