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

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

Issue 1702043002: Remove video-codec max bitrate from TMMBN. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 return -1; 333 return -1;
334 } 334 }
335 int32_t ret_val = 0; 335 int32_t ret_val = 0;
336 RtpUtility::Payload* payload = nullptr; 336 RtpUtility::Payload* payload = nullptr;
337 if (audio_configured_) { 337 if (audio_configured_) {
338 // TODO(mflodman): Change to CreateAudioPayload and make static. 338 // TODO(mflodman): Change to CreateAudioPayload and make static.
339 ret_val = audio_->RegisterAudioPayload(payload_name, payload_number, 339 ret_val = audio_->RegisterAudioPayload(payload_name, payload_number,
340 frequency, channels, rate, &payload); 340 frequency, channels, rate, &payload);
341 } else { 341 } else {
342 payload = video_->CreateVideoPayload(payload_name, payload_number, rate); 342 payload = video_->CreateVideoPayload(payload_name, payload_number);
343 } 343 }
344 if (payload) { 344 if (payload) {
345 payload_type_map_[payload_number] = payload; 345 payload_type_map_[payload_number] = payload;
346 } 346 }
347 return ret_val; 347 return ret_val;
348 } 348 }
349 349
350 int32_t RTPSender::DeRegisterSendPayload(int8_t payload_type) { 350 int32_t RTPSender::DeRegisterSendPayload(int8_t payload_type) {
351 rtc::CritScope lock(&send_critsect_); 351 rtc::CritScope lock(&send_critsect_);
352 352
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 LOG(LS_WARNING) << "Payload type " << static_cast<int>(payload_type) 471 LOG(LS_WARNING) << "Payload type " << static_cast<int>(payload_type)
472 << " not registered."; 472 << " not registered.";
473 return -1; 473 return -1;
474 } 474 }
475 SetSendPayloadType(payload_type); 475 SetSendPayloadType(payload_type);
476 RtpUtility::Payload* payload = it->second; 476 RtpUtility::Payload* payload = it->second;
477 assert(payload); 477 assert(payload);
478 if (!payload->audio && !audio_configured_) { 478 if (!payload->audio && !audio_configured_) {
479 video_->SetVideoCodecType(payload->typeSpecific.Video.videoCodecType); 479 video_->SetVideoCodecType(payload->typeSpecific.Video.videoCodecType);
480 *video_type = payload->typeSpecific.Video.videoCodecType; 480 *video_type = payload->typeSpecific.Video.videoCodecType;
481 video_->SetMaxConfiguredBitrateVideo(payload->typeSpecific.Video.maxRate);
482 } 481 }
483 return 0; 482 return 0;
484 } 483 }
485 484
486 RTPSenderInterface::CVOMode RTPSender::ActivateCVORtpHeaderExtension() { 485 RTPSenderInterface::CVOMode RTPSender::ActivateCVORtpHeaderExtension() {
487 if (cvo_mode_ == kCVOInactive) { 486 if (cvo_mode_ == kCVOInactive) {
488 rtc::CritScope lock(&send_critsect_); 487 rtc::CritScope lock(&send_critsect_);
489 if (rtp_header_extension_map_.SetActive(kRtpExtensionVideoRotation, true)) { 488 if (rtp_header_extension_map_.SetActive(kRtpExtensionVideoRotation, true)) {
490 cvo_mode_ = kCVOActivated; 489 cvo_mode_ = kCVOActivated;
491 } 490 }
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 return -1; 1788 return -1;
1790 } 1789 }
1791 return audio_->RED(payload_type); 1790 return audio_->RED(payload_type);
1792 } 1791 }
1793 1792
1794 RtpVideoCodecTypes RTPSender::VideoCodecType() const { 1793 RtpVideoCodecTypes RTPSender::VideoCodecType() const {
1795 assert(!audio_configured_ && "Sender is an audio stream!"); 1794 assert(!audio_configured_ && "Sender is an audio stream!");
1796 return video_->VideoCodecType(); 1795 return video_->VideoCodecType();
1797 } 1796 }
1798 1797
1799 uint32_t RTPSender::MaxConfiguredBitrateVideo() const {
1800 if (audio_configured_) {
1801 return 0;
1802 }
1803 return video_->MaxConfiguredBitrateVideo();
1804 }
1805
1806 void RTPSender::SetGenericFECStatus(bool enable, 1798 void RTPSender::SetGenericFECStatus(bool enable,
1807 uint8_t payload_type_red, 1799 uint8_t payload_type_red,
1808 uint8_t payload_type_fec) { 1800 uint8_t payload_type_fec) {
1809 RTC_DCHECK(!audio_configured_); 1801 RTC_DCHECK(!audio_configured_);
1810 video_->SetGenericFECStatus(enable, payload_type_red, payload_type_fec); 1802 video_->SetGenericFECStatus(enable, payload_type_red, payload_type_fec);
1811 } 1803 }
1812 1804
1813 void RTPSender::GenericFECStatus(bool* enable, 1805 void RTPSender::GenericFECStatus(bool* enable,
1814 uint8_t* payload_type_red, 1806 uint8_t* payload_type_red,
1815 uint8_t* payload_type_fec) const { 1807 uint8_t* payload_type_fec) const {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 rtc::CritScope lock(&send_critsect_); 1912 rtc::CritScope lock(&send_critsect_);
1921 1913
1922 RtpState state; 1914 RtpState state;
1923 state.sequence_number = sequence_number_rtx_; 1915 state.sequence_number = sequence_number_rtx_;
1924 state.start_timestamp = start_timestamp_; 1916 state.start_timestamp = start_timestamp_;
1925 1917
1926 return state; 1918 return state;
1927 } 1919 }
1928 1920
1929 } // namespace webrtc 1921 } // 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.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698