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

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

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 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
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 return payload_type_; 352 return payload_type_;
353 } 353 }
354 354
355 int RTPSender::SendPayloadFrequency() const { 355 int RTPSender::SendPayloadFrequency() const {
356 return audio_ != NULL ? audio_->AudioFrequency() : kVideoPayloadTypeFrequency; 356 return audio_ != NULL ? audio_->AudioFrequency() : kVideoPayloadTypeFrequency;
357 } 357 }
358 358
359 int32_t RTPSender::SetMaxPayloadLength(size_t max_payload_length, 359 int32_t RTPSender::SetMaxPayloadLength(size_t max_payload_length,
360 uint16_t packet_over_head) { 360 uint16_t packet_over_head) {
361 // Sanity check. 361 // Sanity check.
362 DCHECK(max_payload_length >= 100 && max_payload_length <= IP_PACKET_SIZE) 362 RTC_DCHECK(max_payload_length >= 100 && max_payload_length <= IP_PACKET_SIZE)
363 << "Invalid max payload length: " << max_payload_length; 363 << "Invalid max payload length: " << max_payload_length;
364 CriticalSectionScoped cs(send_critsect_.get()); 364 CriticalSectionScoped cs(send_critsect_.get());
365 max_payload_length_ = max_payload_length; 365 max_payload_length_ = max_payload_length;
366 packet_over_head_ = packet_over_head; 366 packet_over_head_ = packet_over_head;
367 return 0; 367 return 0;
368 } 368 }
369 369
370 size_t RTPSender::MaxDataPayloadLength() const { 370 size_t RTPSender::MaxDataPayloadLength() const {
371 int rtx; 371 int rtx;
372 { 372 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 405
406 uint32_t RTPSender::RtxSsrc() const { 406 uint32_t RTPSender::RtxSsrc() const {
407 CriticalSectionScoped cs(send_critsect_.get()); 407 CriticalSectionScoped cs(send_critsect_.get());
408 return ssrc_rtx_; 408 return ssrc_rtx_;
409 } 409 }
410 410
411 void RTPSender::SetRtxPayloadType(int payload_type, 411 void RTPSender::SetRtxPayloadType(int payload_type,
412 int associated_payload_type) { 412 int associated_payload_type) {
413 CriticalSectionScoped cs(send_critsect_.get()); 413 CriticalSectionScoped cs(send_critsect_.get());
414 DCHECK_LE(payload_type, 127); 414 RTC_DCHECK_LE(payload_type, 127);
415 DCHECK_LE(associated_payload_type, 127); 415 RTC_DCHECK_LE(associated_payload_type, 127);
416 if (payload_type < 0) { 416 if (payload_type < 0) {
417 LOG(LS_ERROR) << "Invalid RTX payload type: " << payload_type; 417 LOG(LS_ERROR) << "Invalid RTX payload type: " << payload_type;
418 return; 418 return;
419 } 419 }
420 420
421 rtx_payload_type_map_[associated_payload_type] = payload_type; 421 rtx_payload_type_map_[associated_payload_type] = payload_type;
422 rtx_payload_type_ = payload_type; 422 rtx_payload_type_ = payload_type;
423 } 423 }
424 424
425 std::pair<int, int> RTPSender::RtxPayloadType() const { 425 std::pair<int, int> RTPSender::RtxPayloadType() const {
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1785 int32_t RTPSender::SendRTPIntraRequest() { 1785 int32_t RTPSender::SendRTPIntraRequest() {
1786 if (audio_configured_) { 1786 if (audio_configured_) {
1787 return -1; 1787 return -1;
1788 } 1788 }
1789 return video_->SendRTPIntraRequest(); 1789 return video_->SendRTPIntraRequest();
1790 } 1790 }
1791 1791
1792 void RTPSender::SetGenericFECStatus(bool enable, 1792 void RTPSender::SetGenericFECStatus(bool enable,
1793 uint8_t payload_type_red, 1793 uint8_t payload_type_red,
1794 uint8_t payload_type_fec) { 1794 uint8_t payload_type_fec) {
1795 DCHECK(!audio_configured_); 1795 RTC_DCHECK(!audio_configured_);
1796 video_->SetGenericFECStatus(enable, payload_type_red, payload_type_fec); 1796 video_->SetGenericFECStatus(enable, payload_type_red, payload_type_fec);
1797 } 1797 }
1798 1798
1799 void RTPSender::GenericFECStatus(bool* enable, 1799 void RTPSender::GenericFECStatus(bool* enable,
1800 uint8_t* payload_type_red, 1800 uint8_t* payload_type_red,
1801 uint8_t* payload_type_fec) const { 1801 uint8_t* payload_type_fec) const {
1802 DCHECK(!audio_configured_); 1802 RTC_DCHECK(!audio_configured_);
1803 video_->GenericFECStatus(*enable, *payload_type_red, *payload_type_fec); 1803 video_->GenericFECStatus(*enable, *payload_type_red, *payload_type_fec);
1804 } 1804 }
1805 1805
1806 int32_t RTPSender::SetFecParameters( 1806 int32_t RTPSender::SetFecParameters(
1807 const FecProtectionParams *delta_params, 1807 const FecProtectionParams *delta_params,
1808 const FecProtectionParams *key_params) { 1808 const FecProtectionParams *key_params) {
1809 if (audio_configured_) { 1809 if (audio_configured_) {
1810 return -1; 1810 return -1;
1811 } 1811 }
1812 video_->SetFecParameters(delta_params, key_params); 1812 video_->SetFecParameters(delta_params, key_params);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 CriticalSectionScoped lock(send_critsect_.get()); 1902 CriticalSectionScoped lock(send_critsect_.get());
1903 1903
1904 RtpState state; 1904 RtpState state;
1905 state.sequence_number = sequence_number_rtx_; 1905 state.sequence_number = sequence_number_rtx_;
1906 state.start_timestamp = start_timestamp_; 1906 state.start_timestamp = start_timestamp_;
1907 1907
1908 return state; 1908 return state;
1909 } 1909 }
1910 1910
1911 } // namespace webrtc 1911 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698