⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cxx

📁 openh323_1.1.2.2.zip; 2. 把pwlib_1.52.zip 、openh323_1.1.2.2.zip分别展开到目录e:h323sourcepwlib及e:h323sourc
💻 CXX
📖 第 1 页 / 共 5 页
字号:
#endif
#ifdef HAS_VBLASTER
             "V-voipblaster:"        "-no-voipblaster."
#endif
             "r-require-gatekeeper."    "-no-require-gatekeeper."
	           "S-disable-h245-in-setup." "-no-disable-h245-in-setup."
             "-save."
             "-setup-param:"         "-no-setup-param."
             "s-sound:"              "-no-sound."
             "-sound-in:"            "-no-sound-in."
             "-sound-out:"           "-no-sound-out."
             "-sound-buffers:"       "-no-sound-buffers."

#ifdef HAS_OSS
             "-sound-mixer:"         "-no-sound-mixer."
             "-sound-recchan:"       "-no-sound-recchan."
             "-sound-recvol:"        "-no-sound-recvol."
             "-sound-playvol:"       "-no-sound-playvol."
#endif
             "-sound-driver:"        "-no-sound-driver." 
             "-record-driver:"       "-no-record-driver."
             "-play-driver:"         "-no-play-driver." 

#ifdef PMEMORY_CHECK
             "-setallocationbreakpoint:"
#endif
             "T-h245tunneldisable."  "-no-h245tunneldisable."
#if PTRACING
             "t-trace."              "-no-trace."
#endif
             "-tos:"                 "-no-tos."
             "-translate:"           "-no-translate."
	           "-stun:"                "-no-stun."
             "u-user:"               "-no-user."
	           "U-userinputcap:"       "-no-user-input-cap."
             "v-verbose:"            "-no-verbose."
             "-disable-menu."        "-no-disable-menu."
#ifdef HAS_IXJ
             "-aec:"                 "-no-aec."
             "-dial-after-hangup."   "-no-dial-after-hangup."
             "-callerid."            "-no-callerid."
             "-calleridcw."          "-no-calleridcw."
             "-autohook."            "-no-autohook."
             "-quicknet-recvol:"     "-no-quicknet-recvol."
             "-quicknet-playvol:"    "-no-quicknet-playvol."
#endif

             "-g728."                "-no-g728."
#ifdef  G729
             "-g729."                "-no-g729."
#endif
             "-fpp:-frames-per-packet:" 
             "-gsm."                 "-no-gsm."
             "-gsmframes:"           "-no-gsmframes."
             "-g711-ulaw."           "-no-g711-ulaw."
             "-g711-alaw."           "-no-g711-alaw."
             "-g711frames:"          "-no-g711frames."
             "-g7231."               "-no-g7231."
             "-h261:"                "-no-h261."
             "-playvol:"             "-no-playvol."
             "-recvol:"              "-no-recvol."
             "-ringfile:"
             "-ringdelay:"

             "-videolocal."          "-no-videolocal."
             "-videosize:"           "-no-videosize."
             "-videoformat:"         "-no-videoformat."
             "-videocolorfmt:"       "-no-videocolorfmt."
             "-videoinput:"          "-no-videoinput."
             "-videoquality:"        "-no-videoquality."

             "-videoreceive:"        "-no-videoreceive."
             "-videorxdevice:"       "-no-videorxdevice."

             "-videotransmit:"       "-no-videotransmit."
             "-videotxdevice:"       "-no-videotxdevice."
             "-videotxquality:"      "-no-videotxquality."
             "-videotxminquality:"   "-no-videotxminquality."

             "-videoidle:"           "-no-videoidle."
             "-videopip."            "-no-videopip."
             "-videofill:"           "-no-videofill."
             "-videotxfps:"          "-no-videotxfps."
             "-videobitrate:"        "-no-videobitrate."
             "-videotest."           "-no-videotest."
	           "-videolose:"           "-no-videolose."
#ifdef DEPRECATED_CU30
             "-videocu30stats:"      "-no-videocu30stats."
             "-videocu30."           "-no-videocu30."
#endif
             "-autodisconnect:"
             "-autorepeat:"

             "-portbase:"
             "-portmax:"

#ifdef H323_TRANSNEXUS_OSP
             "-osp:"
             "-ospdir:"
#endif
             "-osptoken."

          , FALSE);

#if PMEMORY_CHECK
  if (args.HasOption("setallocationbreakpoint"))
    PMemoryHeap::SetAllocationBreakpoint(args.GetOptionString("setallocationbreakpoint").AsInteger());
#endif


  int verbose = 255;
  if (args.HasOption('v'))
    verbose = args.GetOptionString('v').AsInteger();

  if (verbose >= 3)
    cout << GetName()
         << " Version " << GetVersion(TRUE)
         << " by " << GetManufacturer()
         << " on " << GetOSClass() << ' ' << GetOSName()
         << " (" << GetOSVersion() << '-' << GetOSHardware() << ")\n\n";

#if PTRACING
  PTrace::Initialise(args.GetOptionCount('t'),
                     args.HasOption('o') ? (const char *)args.GetOptionString('o') : NULL,
         PTrace::Blocks | PTrace::Timestamp | PTrace::Thread | PTrace::FileAndLine);
#endif

  if (args.HasOption('h') || (!args.HasOption('l') && args.GetCount() == 0)) {
    cout << "Usage : " << GetName() << " [options] -l\n"
            "      : " << GetName() << " [options] [-p host] hostname/alias\n"
      "\n   where:  hostname/alias = Remote host/alias to call\n"
            "\nOptions:\n"
            "  -a --auto-answer        : Automatically answer incoming calls\n"
            "  -d --autodial host      : Autodial host if phone off hook\n"
            "  -h --help               : Display this help message.\n"
            "  -l --listen             : Only listen for incoming calls\n"
            "  -v --verbose n          : Set amount of information displayed (0=none)\n"
            "  --disable-menu          : Disable internal menu\n"
            "  --ringfile filename     : Set sound file for \"ring\" annunciation\n"
            "  --ringdelay seconds     : Set delay between playing above file\n"
            "  --save                  : Save parameters in configuration file.\n"

            "\nGatekeeper options:\n"
            "  -g --gatekeeper host    : Specify gatekeeper host.\n"
            "  -G --gatekeeper-id name : Specify gatekeeper by ID.\n"
            "  -n --no-gatekeeper      : Disable gatekeeper discovery.\n"
            "  -r --require-gatekeeper : Exit if gatekeeper discovery fails.\n"
            "     --password pwd       : Password for gatekeeper H.235 authentication.\n"
            "  -p --proxy host         : Proxy/Gateway hostname/ip address\n"
            "  --osptoken              : Copy OSP tokens (if present) from ACF to SETUP\n"
            "  --disable-grq           : Do not sent GRQ for GK registration\n"

            "\nDivert options:\n"
            "  -F --forward-always party    : Forward to remote party.\n"
            "  -B --forward-busy party      : Forward to remote party if busy.\n"
            "  -N --forward-no-answer party : Forward to remote party if no answer.\n"
            "     --answer-timeout time     : Time in seconds till forward on no answer.\n"

            "\nProtocol options:\n"
            "  -i --interface ipaddr   : Select interface to bind to for incoming connections (default is all interfaces)\n"
            "  --listenport            : Port to listen on for incoming connections (default 1720)\n"
            "  --no-listenport         : No listen port\n"
            "  --connectport port      : Port to connect to for outgoing connections (default 1720)\n"
            "  --connectring num       : Distinctive ring number to send to remote - 0 (default) to 7\n"
            "  -b --bandwidth n        : Limit bandwidth usage to (n * 100) bits/second\n"
            "  -f --fast-disable       : Disable fast start\n"
            "  -T --h245tunneldisable  : Disable H245 tunnelling.\n"
            "  -u --user name          : Set local alias name(s) (defaults to login name)\n"
	          "  -S --disable-h245-in-setup Disable H245 in setup\n"
            "  --tos n                 : Set IP Type of Service byte to n\n"
            "  --setup-param string    : Arbitrary data to be put into H.225 Setup PDU\n"
            "  --portbase port         : Base port for H.245 and RTP data\n"
            "  --portmax port          : Maximum port for H.245 and RTP data\n"
            "  --translate ip          : Set external IP address to ip if masQueraded\n"
            "  --stun ip               : Set STUN server at ip"
#ifdef H323_TRANSNEXUS_OSP
            "  --osp server            : Use OSP server for number resolution (disable GK if selected).\n"
            "  --ospdir dir            : Directory in which OSP certs are stored\n"
#endif


            "\nAudio options:\n"
            "  -e --silence            : Disable silence detection for GSM and software G.711\n"
            "  -j --jitter [min-]max   : Set minimum (optional) and maximum jitter buffer (in milliseconds).\n"
            "  --recvol n              : Set record volume\n"
            "  --playvol n             : Set play volume\n"

            "\nVideo transmit options:\n"
            "  --videotransmit viddrv  : Transmit video using the specified driver\n"
            "  --videotxdevice dev     : Select video capture device\n"
            "  --videolocal            : Enable local video window\n"
            "  --videosize size        : Sets size of transmitted video window\n"
            "                             size can be small (default) or large\n"
            "  --videoformat type      : Set capture video format\n"
            "                             can be auto (default) pal or ntsc\n"
            "  --videocolorfmt format  : Set the preferred capture device color format\n"
            "                             can be RGB24, RGB32, YUV420P, ...\n"
            "  --videoinput num        : Select capture video input (default is 0)\n"
            "  --videotxquality n      : Select sent video quality,(def 9). 1(best)<=n<=31\n"
            "  --videotxminquality n   : Select video quality lower limit,(def 1). 1(best)<=n<=31\n"
            "                             A value of 4 works best for NetMeeting\n" 
            "  --videofill n           : Select number of updated background blocks per frame 2(def)<=n<=99\n"
            "  --videotxfps n          : Maximum number of video frames grabbed per sec 2<10(def)<30\n"
            "  --videosendfps n        : Target minimum number of video frames sent per sec 0.001<6(def)<30\n"
            "  --videobitrate n        : Enable bitrate control.   16< n <2048 kbit/s (net bw)\n"
            "\nVideo receive options:\n"
            "  --videoreceive viddrv   : Receive video using the specified driver\n"
            "  --videorxdevice dev     : Select the video display device.\n"
            "  --videoquality n        : Set received video quality hint - 0 <= n <= 31\n"
            "  --videopip              : Local video is displayed in corner of received video\n"

            "\nVideo options:\n"
            "  --videotest             : Display local video. Exit after 10 seconds. NO h323 call\n"
            "  --videolose             : Delete this percentage of the video rtp packets.- For videotest only. Default 0\n"
#ifdef DEPRECATED_CU30
            "  --videocu30             : Enable Cu30 codec\n"
            "  --videocu30stats n      : Collect stats for n frames, to optimise subsequent calls. (100-10000)\n"
#endif

            "\nSound card options:\n"
            "  -s --sound device       : Select sound card input/output device\n"
            "  --sound-in device       : Select sound card input device (overrides --sound)\n"
            "  --sound-out device      : Select sound card output device (overrides --sound)\n"
            "  --sound-buffers n       : Set sound buffer depth (default=2)\n"

#ifdef HAS_OSS
            "  --sound-mixer device    : Select sound mixer device (default is " DEFAULT_MIXER ")\n"
            "  --sound-recchan device  : Select sound mixer channel (default is mic)\n"
            "  --sound-recvol n        : Set record volume for sound card only (overrides --recvol)\n"
            "  --sound-playvol n       : Set play volume for sound card only (overrides --playvol)\n"
#endif

#ifdef HAS_IXJ
            "\nQuicknet card options:\n"
            "  -q -quicknet dev        : Use device (number or full device name)\n"
            "  -C --country name       : Set the country code for Quicknet device\n"
            "  --aec n                 : Set Audio Echo Cancellation level (0..3)\n"
            "  --autohook              : Don't use hook switch (for PhoneCard)\n"
            "  -c --callerid           : Enable caller id display\n"
            "  --calleridcw            : Enable caller id on call waiting display\n"
            "  --dial-after-hangup     : Present dial tone after remote hang up\n"
            "  --quicknet-recvol n     : Set record volume for Quicknet card only (overrides recvol)\n"
            "  --quicknet-playvol n    : Set play volume for Quicknet card only (overrides playvol)\n"
#endif

#ifdef HAS_VBLASTER
            "\nVoIPBlaster options:\n"
            "  -V --voipblaster num    : Use device number\n"
#endif

            "\nAudio Codec options:\n"
            "  -D --disable codec      : Disable the specified codec (may be used multiple times)\n"
            "  -P --prefer codec       : Prefer the specified codec (may be used multiple times)\n"
            "  --fpp codec=count       : Set frames per packet, e.g. '--fpp GSM06.10=3' (may be used multiple times)\n"
            "  --g711frames count      : (deprecated) Set the number G.711 frames in capabilities (default 30)\n"
            "  --gsmframes count       : (deprecated) Set the number GSM frames in capabilities (default 4)\n"

#if defined(HAS_LIDDEVICE)
            "  --g7231                 : Set G.723.1 as preferred codec\n"
#endif
            "  --gsm                   : Set GSM 06.10 as preferred codec (default)\n"
            "  --g711-ulaw             : Set G.711 uLaw as preferred codec\n"
            "  --g711-alaw             : Set G.711 ALaw as preferred codec\n"
            "  --g728                  : Set G.728 as preferred codec\n"
#ifdef  G729
            "  --g729                  : Set G.729 as preferred codec\n"
#endif
            "  --g7231                 : Set G.723.1 as preferred codec\n"
            "  -I --input-mode mode    : Set the mode for sending User Input Indications (DTMF)\n"
            "                             can be string, signal, q931 or rfc2833 (default is string)\n"
            "  -U --user-input-cap mode : Set the mode for User Input Capabilities\n"
            "                             can be string, signal, rfc2833 or none (default is all)\n"

#if PTRACING || PMEMORY_CHECK
            "\nDebug options:\n"
#endif
#if PTRACING
            "  -t --trace              : Enable trace, use multiple times for more detail\n"
            "  -o --output             : File for trace output, default is stderr\n"
#endif
#ifdef PMEMORY_CHECK
      "  --setallocationbreakpoint n : Enable breakpoint on memory allocation n\n"
#endif
            << endl;
    return;
  }

  BOOL hasMenu = !args.HasOption("disable-menu");

  int autoRepeat;
  if (!args.HasOption("autorepeat"))
    autoRepeat = -1;
  else {
    autoRepeat = args.GetOptionString("autorepeat").AsInteger();
    if (autoRepeat < 1) {
      cout << "autorepeat must be >= 1" << endl;
      return;
    }
    hasMenu = FALSE;
  }

  args.Save("save");

  MyH323EndPoint * endpoint = new MyH323EndPoint;


  if (endpoint->Initialise(args, verbose, hasMenu)) {
    if (!args.HasOption("videotest")) {
      if (autoRepeat < 0) {
        if (args.HasOption('l')) {
          if (verbose >= 2)
            cout << "Waiting for incoming calls for \"" << endpoint->GetLocalUserName() << "\"\n";
        } else
          endpoint->MakeOutgoingCall(args[0], args.GetOptionString('p'));
        endpoint->AwaitTermination();
      } else {
        int i;
        endpoint->terminateOnHangup = TRUE;
        for (i = 1; i <= autoRepeat; i++) {
          if (!args.HasOption('l')) {
            cout << "Making automatic call " << i << endl;
            endpoint->MakeOutgoingCall(args[0], args.GetOptionString('p'));
          }
          //endpoint->AwaitTermination();
          Sleep(20);

          cout << "Call #" << i;
#ifdef P_LINUX
          struct rusage usage;
          if (getrusage(RUSAGE_SELF, &usage) == 0)
            cout << ": memory = " << usage.ru_ixrss << ", " << usage.ru_idrss;
#endif
          cout << endl;
          if (i == autoRepeat)
            break;
        }
      }
    } 
    else
      endpoint->TestVideoGrabber(args);
  } //initialised OK

  delete endpoint;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -