| OLD | NEW |
| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 return result; | 100 return result; |
| 101 } | 101 } |
| 102 | 102 |
| 103 int32_t RtpReceiverImpl::RegisterReceivePayload(const VideoCodec& video_codec) { | 103 int32_t RtpReceiverImpl::RegisterReceivePayload(const VideoCodec& video_codec) { |
| 104 rtc::CritScope lock(&critical_section_rtp_receiver_); | 104 rtc::CritScope lock(&critical_section_rtp_receiver_); |
| 105 return rtp_payload_registry_->RegisterReceivePayload(video_codec); | 105 return rtp_payload_registry_->RegisterReceivePayload(video_codec); |
| 106 } | 106 } |
| 107 | 107 |
| 108 // TODO(magjed): Remove once external code is updated. | |
| 109 int32_t RtpReceiverImpl::RegisterReceivePayload( | |
| 110 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | |
| 111 const int8_t payload_type, | |
| 112 const uint32_t frequency, | |
| 113 const size_t channels, | |
| 114 const uint32_t rate) { | |
| 115 CodecInst codec; | |
| 116 codec.pltype = payload_type; | |
| 117 strncpy(codec.plname, payload_name, RTP_PAYLOAD_NAME_SIZE); | |
| 118 codec.plfreq = frequency; | |
| 119 codec.channels = channels; | |
| 120 codec.rate = rate; | |
| 121 return RegisterReceivePayload(codec); | |
| 122 } | |
| 123 | |
| 124 int32_t RtpReceiverImpl::DeRegisterReceivePayload( | 108 int32_t RtpReceiverImpl::DeRegisterReceivePayload( |
| 125 const int8_t payload_type) { | 109 const int8_t payload_type) { |
| 126 rtc::CritScope lock(&critical_section_rtp_receiver_); | 110 rtc::CritScope lock(&critical_section_rtp_receiver_); |
| 127 return rtp_payload_registry_->DeRegisterReceivePayload(payload_type); | 111 return rtp_payload_registry_->DeRegisterReceivePayload(payload_type); |
| 128 } | 112 } |
| 129 | 113 |
| 130 uint32_t RtpReceiverImpl::SSRC() const { | 114 uint32_t RtpReceiverImpl::SSRC() const { |
| 131 rtc::CritScope lock(&critical_section_rtp_receiver_); | 115 rtc::CritScope lock(&critical_section_rtp_receiver_); |
| 132 return ssrc_; | 116 return ssrc_; |
| 133 } | 117 } |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 // implementations might have CSRC 0 as a valid value. | 455 // implementations might have CSRC 0 as a valid value. |
| 472 if (num_csrcs_diff > 0) { | 456 if (num_csrcs_diff > 0) { |
| 473 cb_rtp_feedback_->OnIncomingCSRCChanged(0, true); | 457 cb_rtp_feedback_->OnIncomingCSRCChanged(0, true); |
| 474 } else if (num_csrcs_diff < 0) { | 458 } else if (num_csrcs_diff < 0) { |
| 475 cb_rtp_feedback_->OnIncomingCSRCChanged(0, false); | 459 cb_rtp_feedback_->OnIncomingCSRCChanged(0, false); |
| 476 } | 460 } |
| 477 } | 461 } |
| 478 } | 462 } |
| 479 | 463 |
| 480 } // namespace webrtc | 464 } // namespace webrtc |
| OLD | NEW |