| 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/modules/rtp_rtcp/source/dtmf_queue.h" | 15 #include "webrtc/modules/rtp_rtcp/source/dtmf_queue.h" |
| 16 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" | 16 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" |
| 17 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" | 17 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" |
| 18 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" | 18 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" |
| 19 #include "webrtc/typedefs.h" | 19 #include "webrtc/typedefs.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 class RTPSenderAudio: public DTMFqueue | 22 class RTPSenderAudio: public DTMFqueue |
| 23 { | 23 { |
| 24 public: | 24 public: |
| 25 RTPSenderAudio(const int32_t id, | 25 RTPSenderAudio(Clock* clock, |
| 26 Clock* clock, | 26 RTPSender* rtpSender, |
| 27 RTPSender* rtpSender, | 27 RtpAudioFeedback* audio_feedback); |
| 28 RtpAudioFeedback* audio_feedback); | |
| 29 virtual ~RTPSenderAudio(); | 28 virtual ~RTPSenderAudio(); |
| 30 | 29 |
| 31 int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE], | 30 int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE], |
| 32 const int8_t payloadType, | 31 const int8_t payloadType, |
| 33 const uint32_t frequency, | 32 const uint32_t frequency, |
| 34 const uint8_t channels, | 33 const uint8_t channels, |
| 35 const uint32_t rate, | 34 const uint32_t rate, |
| 36 RtpUtility::Payload*& payload); | 35 RtpUtility::Payload*& payload); |
| 37 | 36 |
| 38 int32_t SendAudio(const FrameType frameType, | 37 int32_t SendAudio(const FrameType frameType, |
| (...skipping 27 matching lines...) Expand all Loading... |
| 66 int32_t SendTelephoneEventPacket(bool ended, | 65 int32_t SendTelephoneEventPacket(bool ended, |
| 67 int8_t dtmf_payload_type, | 66 int8_t dtmf_payload_type, |
| 68 uint32_t dtmfTimeStamp, | 67 uint32_t dtmfTimeStamp, |
| 69 uint16_t duration, | 68 uint16_t duration, |
| 70 bool markerBit); // set on first packet in
talk burst | 69 bool markerBit); // set on first packet in
talk burst |
| 71 | 70 |
| 72 bool MarkerBit(const FrameType frameType, | 71 bool MarkerBit(const FrameType frameType, |
| 73 const int8_t payloadType); | 72 const int8_t payloadType); |
| 74 | 73 |
| 75 private: | 74 private: |
| 76 const int32_t _id; | |
| 77 Clock* const _clock; | 75 Clock* const _clock; |
| 78 RTPSender* const _rtpSender; | 76 RTPSender* const _rtpSender; |
| 79 RtpAudioFeedback* const _audioFeedback; | 77 RtpAudioFeedback* const _audioFeedback; |
| 80 | 78 |
| 81 rtc::scoped_ptr<CriticalSectionWrapper> _sendAudioCritsect; | 79 rtc::scoped_ptr<CriticalSectionWrapper> _sendAudioCritsect; |
| 82 | 80 |
| 83 uint16_t _packetSizeSamples GUARDED_BY(_sendAudioCritsect); | 81 uint16_t _packetSizeSamples GUARDED_BY(_sendAudioCritsect); |
| 84 | 82 |
| 85 // DTMF | 83 // DTMF |
| 86 bool _dtmfEventIsOn; | 84 bool _dtmfEventIsOn; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 103 int8_t _cngFBPayloadType GUARDED_BY(_sendAudioCritsect); | 101 int8_t _cngFBPayloadType GUARDED_BY(_sendAudioCritsect); |
| 104 int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect); | 102 int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect); |
| 105 | 103 |
| 106 // Audio level indication | 104 // Audio level indication |
| 107 // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) | 105 // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) |
| 108 uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect); | 106 uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect); |
| 109 }; | 107 }; |
| 110 } // namespace webrtc | 108 } // namespace webrtc |
| 111 | 109 |
| 112 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ | 110 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_ |
| OLD | NEW |