返回列表 發帖

[Raspberry Pi]Compile your own g729 codec

本帖最後由 Qnewbie 於 2014-3-4 23:22 編輯

Following the link:
http://smallhacks.wordpress.com/ ... r-other-arm-device/
Please note: G729 is governed by a patent license. More info: http://www.linphone.org/eng/documentation/dev/bcg729.html

In raspberry:
  1. mkdir /usr/src/bcg729
  2. cd /usr/src/bcg729
  3. wget https://bitbucket.org/samm_hg/asterisk-g72x/get/bcg729.tar.gz
  4. tar xvf bcg729.tar.gz
  5. cd samm_hg-asterisk-g72x-7c924918dff5
複製代碼
Edit the build-portable.sh file and change according to your own setting:
  1. # Asterisk 1.8
  2. inc=/asterisk_source_directory/include
  3. def=-DG72X_ASTERISK=asterisk_version
複製代碼
Uncomment the compiler option:
  1. #o="-march=barcelona -msse -msse2 -msse3 -O3 -fomit-frame-pointer -fPIC"
複製代碼
and change it to raspberry pi option:
  1. o="-march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -O3 -Wall"
複製代碼
Afterwards, you can simply compile:
  1. ./build-portable.sh
複製代碼
To check if your codec is working(asterisk1.8 or later),
  1. ./build-astconv.sh
  2. cp /var/lib/asterisk/sounds/en/demo-thanks.gsm /tmp/demo-thanks.gsm
  3. rasterisk -x "file convert /tmp/demo-thanks.gsm /tmp/demo-thanks.sln"
  4. ./astconv ./codec_g729.so -e 160 /tmp/demo-thanks.sln demo-thanks.g729
複製代碼
If everything works:
  1. cp codec_g72*.so /usr/lib/asterisk/modules/
複製代碼
RB750G, RB2011UAS-2HnD
IP01, A580IP, AT-610

Since it depends on your own asterisk version(defined in build-portable.sh). It is hard to share codec_g72*.so.
RB750G, RB2011UAS-2HnD
IP01, A580IP, AT-610

TOP

本帖最後由 Qnewbie 於 2014-3-7 19:41 編輯

The codec might be OK.

build-astconv.sh requires the version for asterisk is 1.8 or latter.

Try something like
  1. module load codec_g729.so
複製代碼
in asterisk's cli.
RB750G, RB2011UAS-2HnD
IP01, A580IP, AT-610

TOP

返回列表