Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#2029 closed enhancement (fixed)

Support for bcg729

Reported by: riza Owned by: nanang
Priority: normal Milestone: release-2.7
Component: pjmedia Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description (last modified by nanang)

Support for G729 backend implementation from bcg729.

Requirement:

  • Source code to bcg729, (download here).

Notes:

  • The source code of bcg729 is licensed under GPLv2.

Below are the steps to use the codec:

For GNU targets:

  1. Build the bcg729 library as specified by the their doc.
  2. Run PJSIP's configure by specifying the location to bcg729 library using --with-bcg729 option. E.g.:
    ./configure --with-bcg=/home/user/opt
    
  3. Make sure that the library is usable and correctly configured by looking at the configure output. The check is applicable for iOS and android build as well.
    Using bcg729 prefix... /Users/riza/src/bcg729/ios
    checking bcg729 usability... ok
    

For Visual Studio:

  1. Build the bcg729 library using Visual Studio, by generating the project using cmake.
  2. Add bcg729 include and library installation paths (folder that contains libbcg729.dll.a) to Visual Studio search path settings.
  3. Add this to your config_site.h:
    #define PJMEDIA_HAS_BCG729		1
    

For iOS:

  1. Build the bcg729 library as specified by the their doc.
  2. Run PJSIP's configure with --with-bcg729 option. E.g.:
    ./configure-iphone --with-bcg729=/Users/teluu/bcg729/iphone
    
  3. Copy libbcg729.a to your XCode project directory. Create a folder ios_local/lib inside your XCode project directory (example: for our ipjsua sample app, the directory will be: (PJPROJECT_DIR)/pjsip-apps/src/pjsua/ios/ios_local/lib). Then copy bcg729 dynamic library files to the folder. E.g:
    cp bcg729/lib/libbcg729.a pjproject-iphone/pjsip-apps/src/pjsua/ios/
    cp bcg729/lib/*.dylib pjproject-iphone/pjsip-apps/src/pjsua/ios/ios_local/lib
    
  4. Add libbcg729.a to your application project in XCode.

For Android:

  1. Patch Android.mk in the bcg729 source root directory, just append src/cng.c, src/dtx.c, src/vad.c to LOCAL_SRC_FILES.
  2. Build the bcg729 library, e.g:
    cd [bcg729-source-path]
    $ANDROID_NDK_ROOT/build/ndk-build APP_ABI=arm64-v8a \
            NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk
    
  3. Create directory lib under bcg729 library source, and copy the libbcg729.a from [bcg729-source-path]/obj/local/[ABI] to it.
  4. Run PJSIP's configure with --with-bcg729 option. E.g.:
    ./configure-android --with-bcg729=/Users/teluu/bcg729/android
    

Change History (4)

comment:1 Changed 7 years ago by riza

In 5630:

Re #2029: Support for G.729 backend implementation from bcg729.

comment:2 Changed 7 years ago by riza

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 7 years ago by ismangil

  • Description modified (diff)

comment:4 Changed 5 years ago by nanang

  • Description modified (diff)
Note: See TracTickets for help on using tickets.