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

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

Issue 1226123005: Define Stream base classes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Code review follow-up 3 Created 5 years, 5 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_send_stream.h ('k') | webrtc/video_receive_stream.h » ('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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 } 429 }
430 430
431 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) { 431 for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) {
432 uint32_t ssrc = config_.rtp.rtx.ssrcs[i]; 432 uint32_t ssrc = config_.rtp.rtx.ssrcs[i];
433 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc); 433 rtp_states[ssrc] = vie_channel_->GetRtpStateForSsrc(ssrc);
434 } 434 }
435 435
436 return rtp_states; 436 return rtp_states;
437 } 437 }
438 438
439 void VideoSendStream::SignalNetworkState(Call::NetworkState state) { 439 void VideoSendStream::SignalNetworkState(NetworkState state) {
440 // When network goes up, enable RTCP status before setting transmission state. 440 // When network goes up, enable RTCP status before setting transmission state.
441 // When it goes down, disable RTCP afterwards. This ensures that any packets 441 // When it goes down, disable RTCP afterwards. This ensures that any packets
442 // sent due to the network state changed will not be dropped. 442 // sent due to the network state changed will not be dropped.
443 if (state == Call::kNetworkUp) 443 if (state == kNetworkUp)
444 vie_channel_->SetRTCPMode(kRtcpCompound); 444 vie_channel_->SetRTCPMode(kRtcpCompound);
445 vie_encoder_->SetNetworkTransmissionState(state == Call::kNetworkUp); 445 vie_encoder_->SetNetworkTransmissionState(state == kNetworkUp);
446 if (state == Call::kNetworkDown) 446 if (state == kNetworkDown)
447 vie_channel_->SetRTCPMode(kRtcpOff); 447 vie_channel_->SetRTCPMode(kRtcpOff);
448 } 448 }
449 449
450 int64_t VideoSendStream::GetRtt() const { 450 int64_t VideoSendStream::GetRtt() const {
451 webrtc::RtcpStatistics rtcp_stats; 451 webrtc::RtcpStatistics rtcp_stats;
452 uint16_t frac_lost; 452 uint16_t frac_lost;
453 uint32_t cumulative_lost; 453 uint32_t cumulative_lost;
454 uint32_t extended_max_sequence_number; 454 uint32_t extended_max_sequence_number;
455 uint32_t jitter; 455 uint32_t jitter;
456 int64_t rtt_ms; 456 int64_t rtt_ms;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 vie_channel_->IsSendingFecEnabled()); 504 vie_channel_->IsSendingFecEnabled());
505 505
506 // Restart the media flow 506 // Restart the media flow
507 vie_encoder_->Restart(); 507 vie_encoder_->Restart();
508 508
509 return true; 509 return true;
510 } 510 }
511 511
512 } // namespace internal 512 } // namespace internal
513 } // namespace webrtc 513 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | webrtc/video_receive_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698