/usr/include/opal/codec/echocancel.h is in libopal-dev 3.10.10~dfsg2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /*
* echocancel.h
*
* Open Phone Abstraction Library (OPAL)
* Formally known as the Open H323 project.
*
* Copyright (c) 2004 Post Increment
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The author of this code is Damien Sandras
*
* Contributor(s): Miguel Rodriguez Perez
*
* $Revision: 21293 $
* $Author: rjongbloed $
* $Date: 2008-10-12 18:24:41 -0500 (Sun, 12 Oct 2008) $
*/
#ifndef OPAL_CODEC_ECHOCANCEL_H
#define OPAL_CODEC_ECHOCANCEL_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <opal/buildopts.h>
#include <rtp/rtp.h>
#include <ptclib/qchannel.h>
#ifndef SPEEX_ECHO_H
struct SpeexEchoState;
#endif
#ifndef SPEEX_PREPROCESS_H
struct SpeexPreprocessState;
#endif
///////////////////////////////////////////////////////////////////////////////
class OpalEchoCanceler : public PObject
{
PCLASSINFO(OpalEchoCanceler, PObject);
public:
enum Mode {
NoCancelation,
Cancelation
};
struct Params {
Params(
Mode mode = NoCancelation
) : m_mode (mode)
{ }
Mode m_mode;
};
/**@name Construction */
//@{
/**Create a new canceler.
*/
OpalEchoCanceler();
~OpalEchoCanceler();
//@}
/**@@name Basic operations */
//@{
const PNotifier & GetReceiveHandler() const { return receiveHandler; }
const PNotifier & GetSendHandler() const {return sendHandler; }
/**Set the silence detector parameters.
*/
void SetParameters(
const Params & newParam ///> New parameters for silence detector
);
/**Set the clock rate for the preprocessor
*/
void SetClockRate(
const int clockRate ///> Clock Rate for the preprocessor
);
protected:
PDECLARE_NOTIFIER(RTP_DataFrame, OpalEchoCanceler, ReceivedPacket);
PDECLARE_NOTIFIER(RTP_DataFrame, OpalEchoCanceler, SentPacket);
PNotifier receiveHandler;
PNotifier sendHandler;
Params param;
private:
double mean;
int clockRate;
PQueueChannel *echo_chan;
PMutex stateMutex;
SpeexEchoState *echoState;
SpeexPreprocessState *preprocessState;
// the following types are all void * to avoid including Speex header files
void * ref_buf;
void * echo_buf;
void * e_buf;
void * noise;
};
#endif // OPAL_CODEC_ECHOCANCEL_H
/////////////////////////////////////////////////////////////////////////////
|