niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_ |
| 12 | #define WEBRTC_MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_ |
| 13 | |
| 14 | #include "typedefs.h" |
| 15 | #include "rtp_rtcp_config.h" |
| 16 | |
| 17 | #include "critical_section_wrapper.h" |
| 18 | |
| 19 | namespace webrtc { |
| 20 | class DTMFqueue |
| 21 | { |
| 22 | public: |
| 23 | DTMFqueue(); |
| 24 | virtual ~DTMFqueue(); |
| 25 | |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 26 | int32_t AddDTMF(uint8_t DTMFKey, uint16_t len, uint8_t level); |
| 27 | int8_t NextDTMF(uint8_t* DTMFKey, uint16_t * len, uint8_t * level); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 28 | bool PendingDTMF(); |
| 29 | void ResetDTMF(); |
| 30 | |
| 31 | private: |
henrike@webrtc.org | 65573f2 | 2011-12-13 19:17:27 +0000 | [diff] [blame] | 32 | CriticalSectionWrapper* _DTMFCritsect; |
pbos@webrtc.org | 2f44673 | 2013-04-08 11:08:41 +0000 | [diff] [blame] | 33 | uint8_t _nextEmptyIndex; |
| 34 | uint8_t _DTMFKey[DTMF_OUTBAND_MAX]; |
| 35 | uint16_t _DTMFLen[DTMF_OUTBAND_MAX]; |
| 36 | uint8_t _DTMFLevel[DTMF_OUTBAND_MAX]; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 37 | }; |
| 38 | } // namespace webrtc |
| 39 | |
| 40 | #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_ |