blob: 190f2ac8e338453a00b67186798782bb464b7d57 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
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
19namespace webrtc {
20class DTMFqueue
21{
22public:
23 DTMFqueue();
24 virtual ~DTMFqueue();
25
pbos@webrtc.org2f446732013-04-08 11:08:41 +000026 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.com470e71d2011-07-07 08:21:25 +000028 bool PendingDTMF();
29 void ResetDTMF();
30
31private:
henrike@webrtc.org65573f22011-12-13 19:17:27 +000032 CriticalSectionWrapper* _DTMFCritsect;
pbos@webrtc.org2f446732013-04-08 11:08:41 +000033 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.com470e71d2011-07-07 08:21:25 +000037};
38} // namespace webrtc
39
40#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_DTMF_QUEUE_H_