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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.cc

Issue 2312143002: Merge min_ms and max_ms accessors in PlayoutDelayOracle (Closed)
Patch Set: Created 4 years, 3 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/modules/rtp_rtcp/source/playout_delay_oracle_unittest.cc ('k') | no next file » | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 if (rtp_header) { 475 if (rtp_header) {
476 playout_delay_oracle_.UpdateRequest(ssrc, rtp_header->playout_delay, 476 playout_delay_oracle_.UpdateRequest(ssrc, rtp_header->playout_delay,
477 sequence_number); 477 sequence_number);
478 } 478 }
479 479
480 // Update the active/inactive status of playout delay extension based 480 // Update the active/inactive status of playout delay extension based
481 // on what the oracle indicates. 481 // on what the oracle indicates.
482 { 482 {
483 rtc::CritScope lock(&send_critsect_); 483 rtc::CritScope lock(&send_critsect_);
484 if (playout_delay_active_ != playout_delay_oracle_.send_playout_delay()) { 484 bool send_playout_delay = playout_delay_oracle_.send_playout_delay();
485 playout_delay_active_ = playout_delay_oracle_.send_playout_delay(); 485 if (playout_delay_active_ != send_playout_delay) {
486 playout_delay_active_ = send_playout_delay;
486 rtp_header_extension_map_.SetActive(kRtpExtensionPlayoutDelay, 487 rtp_header_extension_map_.SetActive(kRtpExtensionPlayoutDelay,
487 playout_delay_active_); 488 playout_delay_active_);
488 } 489 }
489 } 490 }
490 491
491 result = video_->SendVideo(video_type, frame_type, payload_type, 492 result = video_->SendVideo(video_type, frame_type, payload_type,
492 rtp_timestamp, capture_time_ms, payload_data, 493 rtp_timestamp, capture_time_ms, payload_data,
493 payload_size, fragmentation, rtp_header); 494 payload_size, fragmentation, rtp_header);
494 } 495 }
495 496
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 case kRtpExtensionAbsoluteSendTime: 1171 case kRtpExtensionAbsoluteSendTime:
1171 block_length = BuildAbsoluteSendTimeExtension(extension_data); 1172 block_length = BuildAbsoluteSendTimeExtension(extension_data);
1172 break; 1173 break;
1173 case kRtpExtensionVideoRotation: 1174 case kRtpExtensionVideoRotation:
1174 block_length = BuildVideoRotationExtension(extension_data); 1175 block_length = BuildVideoRotationExtension(extension_data);
1175 break; 1176 break;
1176 case kRtpExtensionTransportSequenceNumber: 1177 case kRtpExtensionTransportSequenceNumber:
1177 block_length = BuildTransportSequenceNumberExtension( 1178 block_length = BuildTransportSequenceNumberExtension(
1178 extension_data, transport_sequence_number_); 1179 extension_data, transport_sequence_number_);
1179 break; 1180 break;
1180 case kRtpExtensionPlayoutDelay: 1181 case kRtpExtensionPlayoutDelay: {
1182 PlayoutDelay playout_delay = playout_delay_oracle_.playout_delay();
1181 block_length = BuildPlayoutDelayExtension( 1183 block_length = BuildPlayoutDelayExtension(
1182 extension_data, playout_delay_oracle_.min_playout_delay_ms(), 1184 extension_data, playout_delay.min_ms, playout_delay.max_ms);
1183 playout_delay_oracle_.max_playout_delay_ms());
1184 break; 1185 break;
1186 }
1185 default: 1187 default:
1186 assert(false); 1188 assert(false);
1187 } 1189 }
1188 total_block_length += block_length; 1190 total_block_length += block_length;
1189 type = rtp_header_extension_map_.Next(type); 1191 type = rtp_header_extension_map_.Next(type);
1190 } 1192 }
1191 if (total_block_length == 0) { 1193 if (total_block_length == 0) {
1192 // No extension added. 1194 // No extension added.
1193 return 0; 1195 return 0;
1194 } 1196 }
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 rtc::CritScope lock(&send_critsect_); 1753 rtc::CritScope lock(&send_critsect_);
1752 1754
1753 RtpState state; 1755 RtpState state;
1754 state.sequence_number = sequence_number_rtx_; 1756 state.sequence_number = sequence_number_rtx_;
1755 state.start_timestamp = timestamp_offset_; 1757 state.start_timestamp = timestamp_offset_;
1756 1758
1757 return state; 1759 return state;
1758 } 1760 }
1759 1761
1760 } // namespace webrtc 1762 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/playout_delay_oracle_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698