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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 RtpVideoCodecTypes RTPSender::VideoCodecType() const { | 1129 RtpVideoCodecTypes RTPSender::VideoCodecType() const { |
1130 assert(!audio_configured_ && "Sender is an audio stream!"); | 1130 assert(!audio_configured_ && "Sender is an audio stream!"); |
1131 return video_->VideoCodecType(); | 1131 return video_->VideoCodecType(); |
1132 } | 1132 } |
1133 | 1133 |
1134 void RTPSender::SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type) { | 1134 void RTPSender::SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type) { |
1135 RTC_DCHECK(!audio_configured_); | 1135 RTC_DCHECK(!audio_configured_); |
1136 video_->SetUlpfecConfig(red_payload_type, ulpfec_payload_type); | 1136 video_->SetUlpfecConfig(red_payload_type, ulpfec_payload_type); |
1137 } | 1137 } |
1138 | 1138 |
1139 int32_t RTPSender::SetFecParameters( | 1139 bool RTPSender::SetFecParameters(const FecProtectionParams& delta_params, |
1140 const FecProtectionParams *delta_params, | 1140 const FecProtectionParams& key_params) { |
1141 const FecProtectionParams *key_params) { | |
1142 if (audio_configured_) { | 1141 if (audio_configured_) { |
1143 return -1; | 1142 return false; |
1144 } | 1143 } |
1145 video_->SetFecParameters(delta_params, key_params); | 1144 video_->SetFecParameters(delta_params, key_params); |
1146 return 0; | 1145 return true; |
1147 } | 1146 } |
1148 | 1147 |
1149 std::unique_ptr<RtpPacketToSend> RTPSender::BuildRtxPacket( | 1148 std::unique_ptr<RtpPacketToSend> RTPSender::BuildRtxPacket( |
1150 const RtpPacketToSend& packet) { | 1149 const RtpPacketToSend& packet) { |
1151 // TODO(danilchap): Create rtx packet with extra capacity for SRTP | 1150 // TODO(danilchap): Create rtx packet with extra capacity for SRTP |
1152 // when transport interface would be updated to take buffer class. | 1151 // when transport interface would be updated to take buffer class. |
1153 std::unique_ptr<RtpPacketToSend> rtx_packet(new RtpPacketToSend( | 1152 std::unique_ptr<RtpPacketToSend> rtx_packet(new RtpPacketToSend( |
1154 &rtp_header_extension_map_, packet.size() + kRtxHeaderSize)); | 1153 &rtp_header_extension_map_, packet.size() + kRtxHeaderSize)); |
1155 // Add original RTP header. | 1154 // Add original RTP header. |
1156 rtx_packet->CopyHeaderFrom(packet); | 1155 rtx_packet->CopyHeaderFrom(packet); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 rtc::CritScope lock(&send_critsect_); | 1237 rtc::CritScope lock(&send_critsect_); |
1239 | 1238 |
1240 RtpState state; | 1239 RtpState state; |
1241 state.sequence_number = sequence_number_rtx_; | 1240 state.sequence_number = sequence_number_rtx_; |
1242 state.start_timestamp = timestamp_offset_; | 1241 state.start_timestamp = timestamp_offset_; |
1243 | 1242 |
1244 return state; | 1243 return state; |
1245 } | 1244 } |
1246 | 1245 |
1247 } // namespace webrtc | 1246 } // namespace webrtc |
OLD | NEW |