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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ |
13 | 13 |
14 #include "webrtc/common_types.h" | 14 #include "webrtc/common_types.h" |
| 15 #include "webrtc/base/criticalsection.h" |
15 #include "webrtc/base/onetimeevent.h" | 16 #include "webrtc/base/onetimeevent.h" |
16 #include "webrtc/modules/rtp_rtcp/source/dtmf_queue.h" | 17 #include "webrtc/modules/rtp_rtcp/source/dtmf_queue.h" |
17 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" | 18 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" |
18 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" | 19 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" |
19 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 20 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
20 #include "webrtc/typedefs.h" | 21 #include "webrtc/typedefs.h" |
21 | 22 |
22 namespace webrtc { | 23 namespace webrtc { |
23 class RTPSenderAudio : public DTMFqueue { | 24 class RTPSenderAudio : public DTMFqueue { |
24 public: | 25 public: |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 uint32_t dtmfTimeStamp, | 67 uint32_t dtmfTimeStamp, |
67 uint16_t duration, | 68 uint16_t duration, |
68 bool markerBit); // set on first packet in talk burst | 69 bool markerBit); // set on first packet in talk burst |
69 | 70 |
70 bool MarkerBit(const FrameType frameType, const int8_t payloadType); | 71 bool MarkerBit(const FrameType frameType, const int8_t payloadType); |
71 | 72 |
72 private: | 73 private: |
73 Clock* const _clock; | 74 Clock* const _clock; |
74 RTPSender* const _rtpSender; | 75 RTPSender* const _rtpSender; |
75 | 76 |
76 rtc::scoped_ptr<CriticalSectionWrapper> _sendAudioCritsect; | 77 rtc::CriticalSection _sendAudioCritsect; |
77 | 78 |
78 uint16_t _packetSizeSamples GUARDED_BY(_sendAudioCritsect); | 79 uint16_t _packetSizeSamples GUARDED_BY(_sendAudioCritsect); |
79 | 80 |
80 // DTMF | 81 // DTMF |
81 bool _dtmfEventIsOn; | 82 bool _dtmfEventIsOn; |
82 bool _dtmfEventFirstPacketSent; | 83 bool _dtmfEventFirstPacketSent; |
83 int8_t _dtmfPayloadType GUARDED_BY(_sendAudioCritsect); | 84 int8_t _dtmfPayloadType GUARDED_BY(_sendAudioCritsect); |
84 uint32_t _dtmfTimestamp; | 85 uint32_t _dtmfTimestamp; |
85 uint8_t _dtmfKey; | 86 uint8_t _dtmfKey; |
86 uint32_t _dtmfLengthSamples; | 87 uint32_t _dtmfLengthSamples; |
(...skipping 12 matching lines...) Expand all Loading... |
99 int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect); | 100 int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect); |
100 | 101 |
101 // Audio level indication | 102 // Audio level indication |
102 // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) | 103 // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) |
103 uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect); | 104 uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect); |
104 OneTimeEvent first_packet_sent_; | 105 OneTimeEvent first_packet_sent_; |
105 }; | 106 }; |
106 } // namespace webrtc | 107 } // namespace webrtc |
107 | 108 |
108 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ | 109 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ |
OLD | NEW |