Files
platform-external-webrtc/webrtc/voice_engine/dtmf_inband_queue.h
pbos@webrtc.org 6141e13873 WebRtc_Word32 -> int32_t in voice_engine/
BUG=314

Review URL: https://webrtc-codereview.appspot.com/1305004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3792 4adac7df-926f-26a2-2b94-8c16560cd09d
2013-04-09 10:09:10 +00:00

51 lines
1.2 KiB
C++

/*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_VOICE_ENGINE_DTMF_INBAND_QUEUE_H
#define WEBRTC_VOICE_ENGINE_DTMF_INBAND_QUEUE_H
#include "critical_section_wrapper.h"
#include "typedefs.h"
#include "voice_engine_defines.h"
namespace webrtc {
class DtmfInbandQueue
{
public:
DtmfInbandQueue(const int32_t id);
virtual ~DtmfInbandQueue();
int AddDtmf(uint8_t DtmfKey, uint16_t len, uint8_t level);
int8_t NextDtmf(uint16_t* len, uint8_t* level);
bool PendingDtmf();
void ResetDtmf();
private:
enum {kDtmfInbandMax = 20};
int32_t _id;
CriticalSectionWrapper& _DtmfCritsect;
uint8_t _nextEmptyIndex;
uint8_t _DtmfKey[kDtmfInbandMax];
uint16_t _DtmfLen[kDtmfInbandMax];
uint8_t _DtmfLevel[kDtmfInbandMax];
};
} // namespace webrtc
#endif // WEBRTC_VOICE_ENGINE_DTMF_INBAND_QUEUE_H