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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 CriticalSectionScoped cs(_sendAudioCritsect.get()); | 59 CriticalSectionScoped cs(_sendAudioCritsect.get()); |
60 | 60 |
61 _packetSizeSamples = packetSizeSamples; | 61 _packetSizeSamples = packetSizeSamples; |
62 return 0; | 62 return 0; |
63 } | 63 } |
64 | 64 |
65 int32_t RTPSenderAudio::RegisterAudioPayload( | 65 int32_t RTPSenderAudio::RegisterAudioPayload( |
66 const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 66 const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
67 const int8_t payloadType, | 67 const int8_t payloadType, |
68 const uint32_t frequency, | 68 const uint32_t frequency, |
69 const uint8_t channels, | 69 const size_t channels, |
70 const uint32_t rate, | 70 const uint32_t rate, |
71 RtpUtility::Payload** payload) { | 71 RtpUtility::Payload** payload) { |
72 if (RtpUtility::StringCompare(payloadName, "cn", 2)) { | 72 if (RtpUtility::StringCompare(payloadName, "cn", 2)) { |
73 CriticalSectionScoped cs(_sendAudioCritsect.get()); | 73 CriticalSectionScoped cs(_sendAudioCritsect.get()); |
74 // we can have multiple CNG payload types | 74 // we can have multiple CNG payload types |
75 switch (frequency) { | 75 switch (frequency) { |
76 case 8000: | 76 case 8000: |
77 _cngNBPayloadType = payloadType; | 77 _cngNBPayloadType = payloadType; |
78 break; | 78 break; |
79 case 16000: | 79 case 16000: |
(...skipping 375 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 |