| 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 } | 343 } |
| 344 } | 344 } |
| 345 { | 345 { |
| 346 CriticalSectionScoped cs(_sendAudioCritsect.get()); | 346 CriticalSectionScoped cs(_sendAudioCritsect.get()); |
| 347 _lastPayloadType = payloadType; | 347 _lastPayloadType = payloadType; |
| 348 } | 348 } |
| 349 // Update audio level extension, if included. | 349 // Update audio level extension, if included. |
| 350 size_t packetSize = payloadSize + rtpHeaderLength; | 350 size_t packetSize = payloadSize + rtpHeaderLength; |
| 351 RtpUtility::RtpHeaderParser rtp_parser(dataBuffer, packetSize); | 351 RtpUtility::RtpHeaderParser rtp_parser(dataBuffer, packetSize); |
| 352 RTPHeader rtp_header; | 352 RTPHeader rtp_header; |
| 353 rtp_parser.Parse(rtp_header); | 353 rtp_parser.Parse(&rtp_header); |
| 354 _rtpSender->UpdateAudioLevel(dataBuffer, packetSize, rtp_header, | 354 _rtpSender->UpdateAudioLevel(dataBuffer, packetSize, rtp_header, |
| 355 (frameType == kAudioFrameSpeech), | 355 (frameType == kAudioFrameSpeech), |
| 356 audio_level_dbov); | 356 audio_level_dbov); |
| 357 TRACE_EVENT_ASYNC_END2("webrtc", "Audio", captureTimeStamp, "timestamp", | 357 TRACE_EVENT_ASYNC_END2("webrtc", "Audio", captureTimeStamp, "timestamp", |
| 358 _rtpSender->Timestamp(), "seqnum", | 358 _rtpSender->Timestamp(), "seqnum", |
| 359 _rtpSender->SequenceNumber()); | 359 _rtpSender->SequenceNumber()); |
| 360 return _rtpSender->SendToNetwork(dataBuffer, payloadSize, rtpHeaderLength, | 360 return _rtpSender->SendToNetwork(dataBuffer, payloadSize, rtpHeaderLength, |
| 361 TickTime::MillisecondTimestamp(), | 361 TickTime::MillisecondTimestamp(), |
| 362 kAllowRetransmission, | 362 kAllowRetransmission, |
| 363 RtpPacketSender::kHighPriority); | 363 RtpPacketSender::kHighPriority); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 dtmfTimeStamp, "seqnum", _rtpSender->SequenceNumber()); | 455 dtmfTimeStamp, "seqnum", _rtpSender->SequenceNumber()); |
| 456 retVal = _rtpSender->SendToNetwork( | 456 retVal = _rtpSender->SendToNetwork( |
| 457 dtmfbuffer, 4, 12, TickTime::MillisecondTimestamp(), | 457 dtmfbuffer, 4, 12, TickTime::MillisecondTimestamp(), |
| 458 kAllowRetransmission, RtpPacketSender::kHighPriority); | 458 kAllowRetransmission, RtpPacketSender::kHighPriority); |
| 459 sendCount--; | 459 sendCount--; |
| 460 } while (sendCount > 0 && retVal == 0); | 460 } while (sendCount > 0 && retVal == 0); |
| 461 | 461 |
| 462 return retVal; | 462 return retVal; |
| 463 } | 463 } |
| 464 } // namespace webrtc | 464 } // namespace webrtc |
| OLD | NEW |