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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 } | 223 } |
224 | 224 |
225 int32_t RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType, | 225 int32_t RTPSenderVideo::SendVideo(const RtpVideoCodecTypes videoType, |
226 const FrameType frameType, | 226 const FrameType frameType, |
227 const int8_t payloadType, | 227 const int8_t payloadType, |
228 const uint32_t captureTimeStamp, | 228 const uint32_t captureTimeStamp, |
229 int64_t capture_time_ms, | 229 int64_t capture_time_ms, |
230 const uint8_t* payloadData, | 230 const uint8_t* payloadData, |
231 const size_t payloadSize, | 231 const size_t payloadSize, |
232 const RTPFragmentationHeader* fragmentation, | 232 const RTPFragmentationHeader* fragmentation, |
233 const RTPVideoHeader* rtpHdr) { | 233 const RTPVideoHeader* rtpHdr) { |
stefan-webrtc
2016/02/08 13:58:06
Feel free to rename this to something better.
| |
234 if (payloadSize == 0) { | 234 if (payloadSize == 0) { |
235 return -1; | 235 return -1; |
236 } | 236 } |
237 | 237 |
238 rtc::scoped_ptr<RtpPacketizer> packetizer( | 238 rtc::scoped_ptr<RtpPacketizer> packetizer(RtpPacketizer::Create( |
239 RtpPacketizer::Create(videoType, _rtpSender.MaxDataPayloadLength(), | 239 videoType, _rtpSender.MaxDataPayloadLength(), |
240 &(rtpHdr->codecHeader), frameType)); | 240 rtpHdr ? &(rtpHdr->codecHeader) : nullptr, frameType)); |
241 | 241 |
242 StorageType storage; | 242 StorageType storage; |
243 bool fec_enabled; | 243 bool fec_enabled; |
244 { | 244 { |
245 CriticalSectionScoped cs(crit_.get()); | 245 CriticalSectionScoped cs(crit_.get()); |
246 FecProtectionParams* fec_params = | 246 FecProtectionParams* fec_params = |
247 frameType == kVideoFrameKey ? &key_fec_params_ : &delta_fec_params_; | 247 frameType == kVideoFrameKey ? &key_fec_params_ : &delta_fec_params_; |
248 producer_fec_.SetFecParameters(fec_params, 0); | 248 producer_fec_.SetFecParameters(fec_params, 0); |
249 storage = packetizer->GetStorageType(_retransmissionSettings); | 249 storage = packetizer->GetStorageType(_retransmissionSettings); |
250 fec_enabled = fec_enabled_; | 250 fec_enabled = fec_enabled_; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
350 CriticalSectionScoped cs(crit_.get()); | 350 CriticalSectionScoped cs(crit_.get()); |
351 return _retransmissionSettings; | 351 return _retransmissionSettings; |
352 } | 352 } |
353 | 353 |
354 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 354 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
355 CriticalSectionScoped cs(crit_.get()); | 355 CriticalSectionScoped cs(crit_.get()); |
356 _retransmissionSettings = settings; | 356 _retransmissionSettings = settings; |
357 } | 357 } |
358 | 358 |
359 } // namespace webrtc | 359 } // namespace webrtc |
OLD | NEW |