亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main.h

?? 這是一個自動應答機程序
?? H
字號:
/*
 * main.h
 *
 * PWLib application header file for Voxilla
 *
 * A H.323 "net telephone" application.
 *
 * Copyright (c) 1993-2001 Equivalence Pty. Ltd.
 *
 * 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 Portable Windows Library.
 *
 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
 *
 * Portions of this code were written with the assisance of funding from
 * Vovida Networks, Inc. http://www.vovida.com.
 *
 * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
 * All Rights Reserved.
 *
 * Contributor(s): ______________________________________.
 *
 * $Log: main.h,v $
 * Revision 1.3  2008/01/02 19:12:30  willamowius
 * better enforce limit on call duration for video channels
 *
 * Revision 1.2  2007/11/14 15:23:59  willamowius
 * declare overloaded methods as virtual
 *
 * Revision 1.1  2007/11/07 03:42:15  willamowius
 * port OpenAM to H323Plus
 *
 * Revision 1.43  2006/06/26 14:29:40  csoutheren
 * Fixed for new PWLib
 *
 * Revision 1.42  2006/04/19 04:11:53  csoutheren
 * Fix problem when outputting CIF stream using QCIF source
 *
 * Revision 1.41  2006/02/28 10:12:50  csoutheren
 * Added support for NULL receive video
 *
 * Revision 1.40  2006/02/24 10:16:07  csoutheren
 * Fixed for CIF
 *
 * Revision 1.39  2006/02/21 07:52:18  csoutheren
 * Added outgoing video message functions
 *
 * Revision 1.38  2005/11/25 00:52:49  csoutheren
 * Applied patch #1292653
 * OpenAM patch to log calling number
 *
 * Revision 1.37  2005/02/03 01:21:42  csoutheren
 * Added called party to call log and command parameters
 *
 * Revision 1.36  2004/05/03 13:25:46  rjongbloed
 * Converted everything to be codec plug in freindly
 * Removed GSM and G.729 as now plug ins are "the way"!
 *
 * Revision 1.35  2004/01/02 02:52:10  csoutheren
 * Thanks to Michal Zygmuntowicz for these changes
 *   Added support for iLBC codec
 *   Added ability to specify a gatekeeper password,
 *   Fixed small bug with Speex capabilities being accidentally included.
 *
 * Revision 1.34  2003/12/02 09:46:59  csoutheren
 * Added --loop option thanks to Jan Willamowius
 *
 * Revision 1.33  2002/11/13 10:23:12  rogerh
 * Enable Speex support by default.
 *
 * Revision 1.32  2002/08/16 02:04:30  craigs
 * Ensure compilation without Speex installed
 *
 * Revision 1.31  2002/08/15 18:52:49  rogerh
 * Add support for one of the Speex codecs
 *
 * Revision 1.30  2002/08/05 10:06:06  robertj
 * Changed to use the version of G.7231. file capability/codec as used in
 *   opalvxml module. Prevents duplicate symbol link errors.
 *
 * Revision 1.29  2002/04/01 14:45:43  craigs
 * Fixed flag to end call after OGM
 *
 * Revision 1.28  2002/04/01 13:16:09  craigs
 * Added ability to kill calls at end of playing OGM
 * Added ability to play different OGMs depending on target DN
 *
 * Revision 1.27  2002/02/21 07:21:52  rogerh
 * Change the outgoing audio's FrameDelay() code to use the PAdaptiveDelay
 * class which should give clearer audio for the OGMs.
 *
 * Revision 1.26  2002/01/22 04:15:04  craigs
 * Updated for move of PWavFile to PTCLib
 * Replaced AudioDelay with PAdaptiveDelay
 *
 * Revision 1.25  2001/10/15 14:10:01  rogerh
 * Add new definitions
 *
 * Revision 1.24  2001/09/29 07:11:48  rogerh
 * Delete ogmChanel in destructor - Patrick Koorevaar <pkoorevaar@hotmail.com>
 * Only call conn.ClearCall() once after we pass the record time limit.
 * Reported by Patrick.
 *
 * Revision 1.23  2001/09/28 00:13:48  robertj
 * Changed BYTE* to PBYTEArray so get automatic memory management.
 *
 * Revision 1.22  2001/09/24 22:39:42  craigs
 * Added commands to play and record data files, esp G.723.1
 *
 * Revision 1.21  2001/07/23 09:17:36  rogerh
 * Add the LPC10 codec, a low quality and low bitrate codec.
 *
 * Revision 1.20  2001/07/17 14:33:01  rogerh
 * Support writing of .wav audio files from PCM codecs (eg G711 and GSM).
 * .wav files are written out by default now. If you still want to record
 * to raw audio files with a .sw extension, use the --recordraw option.
 *
 * Revision 1.19  2001/07/01 07:38:58  rogerh
 * Add Microsoft GSM codec. Also allocate memory for frameBuffer dynamically
 * as different codecs can have different frame sizes.
 *
 * Revision 1.18  2001/06/29 11:13:15  rogerh
 * Add AudioDelay class which removes the jitter in recorded files.
 *
 * Revision 1.17  2001/06/29 06:34:57  rogerh
 * Add mutex locks in PCM_Recordfile. This solves the race condition where
 * Close() was called while Write() was still running.
 *
 * Revision 1.16  2000/08/29 12:32:08  craigs
 * Fixed problems with recording messages
 *
 * Revision 1.15  2000/08/28 16:42:59  craigs
 * Finally fixed problems with G.723.1. All codecs now working
 *
 * Revision 1.14  2000/08/28 07:49:51  craigs
 * Added extra stuff
 *
 * Revision 1.13  2000/08/28 00:38:37  craigs
 * Added support for setting listening port number
 *
 * Revision 1.12  2000/08/27 23:42:24  craigs
 * Fixed problem with playback of messages
 * Fixed problem with recording messages
 *
 * Revision 1.11  2000/05/25 12:06:17  robertj
 * Added PConfigArgs class so can save program arguments to config files.
 *
 * Revision 1.10  2000/05/10 05:14:25  robertj
 * Changed capabilities so has a function to get name of codec, instead of relying on PrintOn.
 *
 * Revision 1.9  2000/05/09 11:22:15  craigs
 * Fixed problems caused by new jitter buffer code
 * and fixed OGM problems
 *
 * Revision 1.8  2000/04/25 23:34:22  craigs
 * Added lots of new code, including outgoing and incoming
 * multiplexors, and the start of an IVR system
 *
 * Revision 1.7  2000/01/13 04:03:45  robertj
 * Added video transmission
 *
 * Revision 1.6  1999/11/11 00:27:49  robertj
 * Changed OnAnswerCall() call back function  to allow for asyncronous response.
 *
 * Revision 1.5  1999/11/06 13:27:49  craigs
 * Added extra output and changed for new library changes
 *
 * Revision 1.4  1999/10/24 12:50:37  craigs
 * Fixed G723.1 capability, and added ability for discrete OGMs
 *
 * Revision 1.3  1999/10/24 03:08:49  craigs
 * Fixed problem with recording zero length messages, and added autodelete of files
 *
 * Revision 1.2  1999/10/22 09:56:41  craigs
 * Fixed compile warning
 *
 * Revision 1.1  1999/10/11 00:15:18  craigs
 * Initial version
 *
 *
 */

#ifndef _Voxilla_MAIN_H
#define _Voxilla_MAIN_H

#include <h323.h>
#include <h323pdu.h>
#include <h245.h>
//f#include <lid.h>

#include <ptclib/pwavfile.h>
#include <ptclib/delaychan.h>

#ifndef NO_H323_VIDEO
#if P_VIDFILE
#define OPENAM_VIDEO  1
#endif
#endif

#if OPENAM_VIDEO
#include <ptlib/video.h>
#endif

class MyH323EndPoint : public H323EndPoint
{
  PCLASSINFO(MyH323EndPoint, H323EndPoint);

  public:
    MyH323EndPoint(unsigned callLimit,
                   const PString & runCmd,
                   const PDirectory & dir,
                   int flags);
	virtual ~MyH323EndPoint() { };

    // overrides from H323EndPoint
    virtual H323Connection * CreateConnection(unsigned callReference);
    virtual BOOL OnIncomingCall(H323Connection &, const H323SignalPDU &, H323SignalPDU &);

    // new functions
    virtual BOOL Initialise(PConfigArgs & args);

    PString    GetGSMOGM() const            { return gsmOgm; }
    void       SetGSMOGM(const PString & s) { gsmOgm = s; }

    PString    GetG711OGM() const            { return g711Ogm; }
    void       SetG711OGM(const PString & s) { g711Ogm = s; }

    PString    GetLPC10OGM() const            { return lpc10Ogm; }
    void       SetLPC10OGM(const PString & s) { lpc10Ogm = s; }

    PString    GetSPEEXOGM() const            { return speexOgm; }
    void       SetSPEEXOGM(const PString & s) { speexOgm = s; }

    PString    GetG7231OGM() const            { return g7231Ogm; }
    void       SetG7231OGM(const PString & s) { g7231Ogm = s; }

    PString    GetiLBCOGM() const            { return ilbcOgm; }
    void       SetiLBCOGM(const PString & s) { ilbcOgm = s; }

    unsigned   GetCallLimit() const { return callLimit; }
    PString    GetRunCmd() const    { return runCmd; }
    PDirectory GetDirectory() const { return dir; }

    void       SetRecordWav(const BOOL rec){ recordWav = rec; }
    BOOL       GetRecordWav() const        { return recordWav; }

    void       SetLoopMessage(BOOL flag) { loopMessage = flag; }
    BOOL       GetLoopMessage() const    { return loopMessage; }

#if OPENAM_VIDEO
    PString GetVideoOGM() const       { return videoOgm; }
    int     GetVideoSize() const      { return videoSize; }
    BOOL    GetVideoIsPal() const     { return videoIsPal; }
    int     GetVideoFrameRate() const { return frameRate; }
    int     GetVideoPlayMode() const  { return videoChannel; }
#endif
    
    enum {
      DeleteAfterRecord = 0x01,
      NoRecordG7231     = 0x02,
      HangupAfterPlay   = 0x04
    };

    BOOL GetDeleteAfterRecord() const   { return flags & DeleteAfterRecord; }
    BOOL GetNoRecordG7231() const       { return flags & NoRecordG7231; }
    BOOL GetHangupAfterPlay() const     { return flags & HangupAfterPlay; }

  protected:
    unsigned callLimit;
    PString pcmOgm, g711Ogm, gsmOgm, lpc10Ogm, g7231Ogm, runCmd;
    PString speexOgm, ilbcOgm;
    PDirectory dir;
    int flags;
    BOOL recordWav;
    BOOL loopMessage;
#if OPENAM_VIDEO
    PString videoOgm;
    int videoSize;
    int frameRate;
    int videoChannel;
    BOOL videoIsPal;
#endif
};

class OpenAm : public PProcess
{
  PCLASSINFO(OpenAm, PProcess)

  public:
    OpenAm();
    ~OpenAm();

    void Main();
    static void Shutdown();

  protected:
    static MyH323EndPoint * endpoint;
};

class PCM_RecordFile;
class MyH323Connection;
PQUEUE(PStringQueue, PString);

class PCM_OGMChannel : public PIndirectChannel
{
  PCLASSINFO(PCM_OGMChannel, PIndirectChannel);

  public:
    PCM_OGMChannel(MyH323Connection & conn);

    virtual BOOL Read(void * buffer, PINDEX amount);
    virtual void PlayFile(PFile * chan);

    virtual BOOL Close();

    void QueueFile(const PString & cmd);
    void FlushQueue();

    void SetRecordTrigger();
    void SetHangupTrigger();

    void SetPlayOnce() { playOnce = TRUE; }
    void SetLoopMessage() { loopMessage = TRUE; }

  protected:
    virtual BOOL ReadFrame(PINDEX amount);
    virtual void CreateSilenceFrame(PINDEX amount);
    virtual void Synchronise(PINDEX amount);
    virtual BOOL IsWAVFileValid(PWAVFile *chan);

    BOOL AdjustFrame(void * buffer, PINDEX amount);

    PStringQueue playQueue;

    MyH323Connection & conn;
    PMutex chanMutex;
    int silentCount;
    int totalData;
    BOOL recordTrigger, hangupTrigger;
    BOOL closed;
    BOOL playOnce;
	  BOOL loopMessage;

    PAdaptiveDelay ogm_delay;

    PBYTEArray frameBuffer;
    PINDEX frameLen, frameOffs;
};

class G7231_OGMChannel : public PCM_OGMChannel
{
  PCLASSINFO(G7231_OGMChannel, PCM_OGMChannel);
  public:
    G7231_OGMChannel(MyH323Connection & conn);

  protected:
    virtual BOOL ReadFrame(PINDEX amount);
    virtual void CreateSilenceFrame(PINDEX amount);
    virtual void Synchronise(PINDEX amount);
    virtual BOOL IsWAVFileValid(PWAVFile *chan);
};

class TimeLimitedVideoChannel : public PVideoChannel
{
	PCLASSINFO(TimeLimitedVideoChannel, PVideoChannel);
	public:
		TimeLimitedVideoChannel(MyH323Connection & _conn, unsigned _callLimit);

		virtual BOOL Write(const void * buf, PINDEX len);

	protected:
		MyH323Connection & conn;
		unsigned callLimit;
		PTime finishTime;
};

class MyH323Connection : public H323Connection
{
  PCLASSINFO(MyH323Connection, H323Connection);

  public:
    MyH323Connection(MyH323EndPoint &, unsigned, unsigned);
    virtual ~MyH323Connection();

    // overrides from H323Connection
    virtual BOOL OpenAudioChannel(BOOL, unsigned, H323AudioCodec & codec);
#if OPENAM_VIDEO
    virtual BOOL OpenVideoChannel(BOOL, H323VideoCodec & codec);
#endif
    virtual AnswerCallResponse OnAnswerCall(const PString &, const H323SignalPDU &, H323SignalPDU &);
    virtual BOOL OnStartLogicalChannel(H323Channel & channel);
    virtual void OnUserInputString(const PString & value);
    virtual BOOL OnReceivedSignalSetup(const H323SignalPDU & setupPDU);

    // new functions
    void StartRecording();
    void Hangup();

    void SetE164Number(const PString & _num)
      { e164Number = _num; }

    PString GetE164Number() const
      { return e164Number; }

  protected:
#if OPENAM_VIDEO
    BOOL InitGrabber(PVideoInputDevice  * grabber, unsigned newWidth, unsigned newHeight);
#endif

    void OnUserInputChar(char ch);
    BOOL StartMenu(int menuNumber);
    BOOL ProcessMenuCmd(const PString & cmdStr);

    const MyH323EndPoint & ep;
    PString product;
    PTime   callStartTime;
    PTime   recordStartTime;
    PString basename;
    PFilePath recordFn;
    PString transmitAudioCodecName, receiveAudioCodecName;
#if OPENAM_VIDEO
    PString transmitVideoCodecName, receiveVideoCodecName;
#endif
    BOOL    recordTrigger;
    PString calledParty;
    PMutex  connMutex;

    PCM_RecordFile * recordFile;
    PCM_OGMChannel * ogmChannel;

    PString digits, lastDigits;
    int currentMenu;
    PStringList menuNames;

    PString securityToken, e164Number;
    PString sourceno;
};

class PCM_RecordFile : public PIndirectChannel
{
  PCLASSINFO(PCM_RecordFile, PIndirectChannel)

  public:
    PCM_RecordFile(MyH323Connection & conn, const PFilePath & fn, unsigned callLimit);
    virtual ~PCM_RecordFile();

    virtual BOOL Write(const void * buf, PINDEX len);
    virtual BOOL Close();
    virtual void StartRecording();

    virtual void DelayFrame(PINDEX len);
    virtual BOOL WriteFrame(const void * buf, PINDEX len);

    virtual BOOL WasRecordStarted() const { return recordStarted; }

  protected:
    MyH323Connection & conn;
    PTime finishTime;
    PFilePath fn;
    unsigned callLimit;
    BOOL recordStarted;
    BOOL timeLimitExceeded;
    BOOL closed;
    BOOL isPCM;
    BOOL dataWritten;
    PAdaptiveDelay delay;
    PMutex pcmrecordMutex;
    PFile *fileclass; // will point to a PWAVFile or PFile class
};

class G7231_RecordFile : public PCM_RecordFile
{
  PCLASSINFO(G7231_RecordFile, PCM_RecordFile);

  public:
    G7231_RecordFile(MyH323Connection & conn, const PFilePath & fn, unsigned callLimit);
    virtual void DelayFrame(PINDEX len);
    virtual BOOL WriteFrame(const void * buf, PINDEX len);
};


#endif  // _Voxilla_MAIN_H


// End of File ///////////////////////////////////////////////////////////////

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区| 欧美一级生活片| 国产精一品亚洲二区在线视频| 亚洲综合色丁香婷婷六月图片| 国产精品区一区二区三| 国产精品免费看片| 中文字幕av一区二区三区| 国产日韩欧美制服另类| 国产人成一区二区三区影院| 精品福利在线导航| 久久伊人蜜桃av一区二区| 久久久久久久综合狠狠综合| 久久蜜臀中文字幕| 国产午夜精品在线观看| 日韩美女视频一区| 午夜精品123| 久久99在线观看| 精品一区二区在线观看| 国产不卡在线视频| 99国产精品国产精品毛片| 一本色道久久综合亚洲aⅴ蜜桃| 91麻豆swag| 91精品国产综合久久精品app| 欧美大白屁股肥臀xxxxxx| 欧美精品一区二区久久久| 欧美经典一区二区三区| 亚洲婷婷综合久久一本伊一区| 亚洲激情一二三区| 毛片基地黄久久久久久天堂| 国模冰冰炮一区二区| jlzzjlzz欧美大全| 欧美精品自拍偷拍动漫精品| 精品国产人成亚洲区| 亚洲欧美在线观看| 美女网站一区二区| 99久久精品免费看| 日韩一级免费一区| 国产精品福利在线播放| 婷婷中文字幕综合| 成人精品免费网站| 日韩欧美一区电影| 亚洲视频香蕉人妖| 精品在线一区二区| 色综合久久久久久久久久久| 日韩美女一区二区三区| 亚洲精品第一国产综合野| 麻豆国产91在线播放| 91美女片黄在线| 欧美精品一区二区三区视频| 亚洲午夜久久久久久久久电影网 | 丁香婷婷综合网| 欧美专区在线观看一区| 国产人妖乱国产精品人妖| 日韩国产精品91| 91免费看视频| 日本一区二区三区在线不卡| 蜜臀99久久精品久久久久久软件| 99视频精品在线| 久久综合九色欧美综合狠狠| 午夜精品久久久久久久久久| 99久久99久久精品免费观看| 久久这里只有精品视频网| 爽好多水快深点欧美视频| 91一区在线观看| 国产欧美日韩三级| 国产自产2019最新不卡| 制服丝袜激情欧洲亚洲| 亚洲一区在线视频观看| 一本到不卡免费一区二区| 国产精品麻豆久久久| 国产精品18久久久| 欧美精品一区二区三区蜜桃视频| 日韩高清一区二区| 91精品国产欧美日韩| 日韩不卡在线观看日韩不卡视频| 欧美色精品天天在线观看视频| 中文字幕综合网| 99免费精品在线| 国产精品久久一卡二卡| 东方欧美亚洲色图在线| 国产日韩欧美不卡在线| 福利视频网站一区二区三区| 精品久久久久99| 国产在线精品一区二区不卡了 | 亚洲三级免费观看| 91丝袜国产在线播放| 亚洲欧洲av另类| 91性感美女视频| 亚洲一区在线免费观看| 欧美色图免费看| 日本中文字幕一区二区视频| 555www色欧美视频| 美女一区二区视频| 国产日产欧美一区二区视频| 成人午夜视频免费看| 亚洲老妇xxxxxx| 欧美亚洲图片小说| 免费视频最近日韩| 国产片一区二区| 91国产精品成人| 性感美女久久精品| 精品电影一区二区| bt欧美亚洲午夜电影天堂| 一区二区三区四区不卡视频| 欧美电影影音先锋| 粉嫩av一区二区三区| 亚洲人快播电影网| 欧美不卡一区二区三区| av高清不卡在线| 婷婷综合五月天| 久久久久99精品一区| 91久久国产综合久久| 免费精品视频最新在线| 国产精品亲子乱子伦xxxx裸| 欧美专区亚洲专区| 国产精品一区二区91| 亚洲激情一二三区| 久久嫩草精品久久久久| 欧美性感一区二区三区| 国产精品资源在线看| 亚洲一级电影视频| 国产亚洲精品aa午夜观看| 在线观看av不卡| 经典三级一区二区| 亚洲国产wwwccc36天堂| 国产日韩三级在线| 日韩视频在线你懂得| 91啪亚洲精品| 国产精品一品视频| 免费成人小视频| 一区二区三区国产豹纹内裤在线| 久久久久久综合| 91麻豆精品国产91久久久久| 欧美日韩的一区二区| 成人晚上爱看视频| 激情文学综合插| 日韩精品视频网站| 亚洲午夜激情av| 亚洲男人的天堂在线观看| 久久九九影视网| 日韩欧美国产高清| 欧美电影一区二区| 欧美日韩一级片网站| 色综合一区二区三区| 丁香激情综合国产| 国产成人精品亚洲日本在线桃色| 奇米888四色在线精品| 亚洲成人先锋电影| 亚洲午夜精品一区二区三区他趣| 自拍偷拍欧美精品| 亚洲欧美精品午睡沙发| 成人欧美一区二区三区| 国产精品人妖ts系列视频| 欧美激情一区二区三区蜜桃视频| 久久久九九九九| 久久精品一区四区| 欧美国产精品专区| 国产精品乱人伦| 国产精品久久久久一区二区三区 | 日韩欧美在线一区二区三区| 欧美综合亚洲图片综合区| 色偷偷一区二区三区| 91在线视频网址| 97se亚洲国产综合自在线观| 91亚洲精品久久久蜜桃| 色婷婷久久综合| 欧美亚洲国产一区二区三区va| 91福利精品视频| 在线播放欧美女士性生活| 欧美sm极限捆绑bd| 国产日本欧洲亚洲| 一区二区免费看| 五月天国产精品| 久久精工是国产品牌吗| 丁香亚洲综合激情啪啪综合| 色综合天天狠狠| 日韩精品一区二区在线| 国产视频一区二区在线观看| 亚洲色欲色欲www| 亚洲不卡一区二区三区| 蜜桃久久久久久久| 成人免费视频视频| 欧美区在线观看| 国产午夜三级一区二区三| 亚洲久草在线视频| 精品一区二区三区免费毛片爱| 国产成人精品aa毛片| 欧美在线影院一区二区| 日韩免费电影网站| 亚洲精品视频免费观看| 另类人妖一区二区av| 99久久综合狠狠综合久久| 制服丝袜在线91| 国产精品丝袜在线| 午夜电影网亚洲视频| 国产精品一区二区久久不卡| 欧美午夜视频网站| 国产精品乱码妇女bbbb| 日韩高清一级片| 色婷婷av一区|