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 13 matching lines...) Expand all Loading... |
24 RTPSenderAudio(Clock* clock, | 24 RTPSenderAudio(Clock* clock, |
25 RTPSender* rtpSender, | 25 RTPSender* rtpSender, |
26 RtpAudioFeedback* audio_feedback); | 26 RtpAudioFeedback* audio_feedback); |
27 virtual ~RTPSenderAudio(); | 27 virtual ~RTPSenderAudio(); |
28 | 28 |
29 int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 29 int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
30 int8_t payloadType, | 30 int8_t payloadType, |
31 uint32_t frequency, | 31 uint32_t frequency, |
32 uint8_t channels, | 32 uint8_t channels, |
33 uint32_t rate, | 33 uint32_t rate, |
34 RtpUtility::Payload*& payload); | 34 RtpUtility::Payload** payload); |
35 | 35 |
36 int32_t SendAudio(FrameType frameType, | 36 int32_t SendAudio(FrameType frameType, |
37 int8_t payloadType, | 37 int8_t payloadType, |
38 uint32_t captureTimeStamp, | 38 uint32_t captureTimeStamp, |
39 const uint8_t* payloadData, | 39 const uint8_t* payloadData, |
40 size_t payloadSize, | 40 size_t payloadSize, |
41 const RTPFragmentationHeader* fragmentation); | 41 const RTPFragmentationHeader* fragmentation); |
42 | 42 |
43 // set audio packet size, used to determine when it's time to send a DTMF | 43 // set audio packet size, used to determine when it's time to send a DTMF |
44 // packet in silence (CNG) | 44 // packet in silence (CNG) |
45 int32_t SetAudioPacketSize(uint16_t packetSizeSamples); | 45 int32_t SetAudioPacketSize(uint16_t packetSizeSamples); |
46 | 46 |
47 // Store the audio level in dBov for | 47 // Store the audio level in dBov for |
48 // header-extension-for-audio-level-indication. | 48 // header-extension-for-audio-level-indication. |
49 // Valid range is [0,100]. Actual value is negative. | 49 // Valid range is [0,100]. Actual value is negative. |
50 int32_t SetAudioLevel(uint8_t level_dBov); | 50 int32_t SetAudioLevel(uint8_t level_dBov); |
51 | 51 |
52 // Send a DTMF tone using RFC 2833 (4733) | 52 // Send a DTMF tone using RFC 2833 (4733) |
53 int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level); | 53 int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level); |
54 | 54 |
55 int AudioFrequency() const; | 55 int AudioFrequency() const; |
56 | 56 |
57 // Set payload type for Redundant Audio Data RFC 2198 | 57 // Set payload type for Redundant Audio Data RFC 2198 |
58 int32_t SetRED(int8_t payloadType); | 58 int32_t SetRED(int8_t payloadType); |
59 | 59 |
60 // Get payload type for Redundant Audio Data RFC 2198 | 60 // Get payload type for Redundant Audio Data RFC 2198 |
61 int32_t RED(int8_t& payloadType) const; | 61 int32_t RED(int8_t* payloadType) const; |
62 | 62 |
63 protected: | 63 protected: |
64 int32_t SendTelephoneEventPacket( | 64 int32_t SendTelephoneEventPacket( |
65 bool ended, | 65 bool ended, |
66 int8_t dtmf_payload_type, | 66 int8_t dtmf_payload_type, |
67 uint32_t dtmfTimeStamp, | 67 uint32_t dtmfTimeStamp, |
68 uint16_t duration, | 68 uint16_t duration, |
69 bool markerBit); // set on first packet in talk burst | 69 bool markerBit); // set on first packet in talk burst |
70 | 70 |
71 bool MarkerBit(const FrameType frameType, const int8_t payloadType); | 71 bool MarkerBit(const FrameType frameType, const int8_t payloadType); |
(...skipping 28 matching lines...) Expand all Loading... |
100 int8_t _cngFBPayloadType GUARDED_BY(_sendAudioCritsect); | 100 int8_t _cngFBPayloadType GUARDED_BY(_sendAudioCritsect); |
101 int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect); | 101 int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect); |
102 | 102 |
103 // Audio level indication | 103 // Audio level indication |
104 // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) | 104 // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) |
105 uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect); | 105 uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect); |
106 }; | 106 }; |
107 } // namespace webrtc | 107 } // namespace webrtc |
108 | 108 |
109 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ | 109 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ |
OLD | NEW |