H323plus的学习使用(1)——编译安装h323plus

H323plus的学习使用(1)——编译安装h323plus

 

首先是从官网上下载h323plus与ptlib源码

在ptlib库中的readme可知,最好将俩个开源库放在个人home目录下,否则将需要更改路径,并将其改名为ptlib与h323plus,这样子在接下去的编译过程中,便无需增添路径

 
  1. le@ubuntu:~$ ls

  2. Desktop Downloads h323plus Pictures Public Videos

  3. Documents examples.desktop Music ptlib Templates

  4. le@ubuntu:~$ cd ptlib

  5. le@ubuntu:~/ptlib$ ./configure

接下去便是进去开源库中安装了,但如果这样子直接编译,会出错,根据出错信息,明显可以知道是缺少flex和bison这俩个库

sudo apt-get install flex bison

接下去就可以进入ptlib开源库中编译安装了,根据国外的教程,官方建议不要直接使用make,而是使用make depend 同make bothnoshared,这样子就能同时得到debug版本和优化版本,实际上的意义似乎不大,主要是加载动态库的问题,以及减少需要添加的环境变量的问题

 
  1. cd ~/ptlib

  2. ./configure

  3. make bothdepend

  4. make bothnoshared

  5.  
  6. cd ~/h323plus

  7. ./configure

  8. make bothdepend

  9. make bothnoshared

如果上述都做完了,而且没有出现问题,那么便可以进入h323plus库中的sample中编译simph323使用看看

 
  1. cd ~/h323plus/samples/simple

  2. make bothnoshared

  3. cd obj_linux_86_64_d_s

  4. ./simph323 -h

便可以看到simph323输出其使用教程了,其中包括了可用能力集同输出输入音频设备等,一般来说,此时音频设备应该都不存在,这是由于其他依赖库的问题,暂时先不考虑

 
  1. simple Version 1.27.0 by H323Plus on Unix Linux (4.13.0-45-generic-x86_64)

  2.  
  3. Usage : simple [options] -l

  4. : simple [options] [alias@]hostname (no gatekeeper)

  5. : simple [options] alias[@hostname] (with gatekeeper)

  6. Options:

  7. -l --listen : Listen for incoming calls.

  8. -g --gatekeeper host : Specify gatekeeper host.

  9. -n --no-gatekeeper : Disable gatekeeper discovery.

  10. -r --require-gatekeeper : Exit if gatekeeper discovery fails.

  11. -a --auto-answer : Automatically answer incoming calls.

  12. -u --user name : Set local alias name(s) (defaults to login name).

  13. -p --password pwd : Set the H.235 password to use for calls.

  14. -b --bandwidth bps : Limit bandwidth usage to bps bits/second.

  15. -j --jitter [min-]max : Set minimum (optional) and maximum jitter buffer (in milliseconds).

  16. -D --disable codec : Disable the specified codec (may be used multiple times)

  17. -P --prefer codec : Prefer the specified codec (may be used multiple times)

  18. -i --interface ipnum : Select interface to bind to.

  19. -B --forward-busy party : Forward to remote party if busy.

  20. -e --silence : Disable transmitter silence detection.

  21. -f --fast-enable : Enable fast start.

  22. -T --h245tunneldisable : Disable H245 tunnelling.

  23. --h245setupenable : Enable H245 in Setup.

  24. -Q --h245qosdisable : Disable H245 QoS Exchange.

  25. --h46018disable : Disable H.460.18.

  26. -s --sound device : Select sound input/output device.

  27. --sound-in device : Select sound input device.

  28. --sound-out device : Select sound output device.

  29. -v --video device : Select video input/output device.

  30. -t --trace : Enable trace, use multiple times for more detail.

  31. -o --output : File for trace output, default is stderr.

  32. -x --listenport : Listening port (default 1720).

  33. -S --sleep : Sleep instead of listening for commands on STDIN.

  34. -h --help : This help message.

在使用simph323编译时,建议不要使用make,会导致出现的程序没办法使用,具体原因是由于动态库加载失败的问题,解决方法是添加环境变量,或将对应动态库移到对应目录

在俩台机器上运行simph323,可实现文字交流(俩台虚拟机也行)

 
  1. 运行需要找两台linux机器,分别运行命令:

  2. 服务端: $./simph323 -n -l -v FakeVideo

  3. 客户端: $./simph323 -n 服务端IP地址 -v FakeVideo

如果机器上的音频设备同麦克风都可使用,可以使用以下命令,实现音频交流(理想情况)

 
  1. 服务端: $./simph323 -n -l -v FakeVideo -s Default

  2. 客户端: $./simph323 -n 服务端IP地址 -v FakeVideo -s Default

在运行时,simph323会输出对应的设备同能力集,如果是如下图,那么音频设备便是都不能使用的

 
  1. Available Video Drivers:

  2. FakeVideo

  3. YUVFile

  4. FFMPEG

  5. Using video driver FakeVideo

  6. Local username: le

  7. Silence compression is Disabled

  8. Auto answer is 0

  9. FastConnect is Disabled

  10. H245Tunnelling is Enabled

  11. H245QoS is Enabled

  12. Jitter buffer: 50-250 ms

  13. Sound output device: "Null Audio"

  14. Sound input device: "Null Audio"

  15. Codecs (in preference order):

  16. Table:

  17. G.711-ALaw-64k <1>

  18. G.711-uLaw-64k <2>

  19. UserInput/hookflash <3>

  20. UserInput/basicString <4>

  21. UserInput/dtmf <5>

  22. UserInput/RFC2833 <6>

  23. Set:

  24. 0:

  25. 0:

  26. G.711-ALaw-64k <1>

  27. G.711-uLaw-64k <2>

  28. 1:

  29. UserInput/hookflash <3>

  30. 2:

  31. UserInput/basicString <4>

  32. UserInput/dtmf <5>

  33. UserInput/RFC2833 <6>

下一篇如何加载音视频设备问题,从而达到音视频聊天功能,上述方法是为最简单的安装教程,

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值