Changes between Initial Version and Version 1 of Using-OpenCORE-AMR-NB-WB-Codec


Ignore:
Timestamp:
Oct 9, 2013 8:24:25 AM (9 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Using-OpenCORE-AMR-NB-WB-Codec

    v1 v1  
     1{{{ 
     2#!html 
     3<!-- MAIN TABLE START --> 
     4<table border=0 width="90%" align="center"><tr><td> 
     5}}} 
     6 
     7= Using OpenCORE AMR NB and WB Codec = 
     8 
     9'''Table of Contents''' 
     10[[PageOutline(2-3,,inline)]] 
     11 
     12This page describes how to add OpenCORE AMR-NB and AMR-WB support into PJSIP. 
     13 
     14[[BR]] 
     15 
     16== Building and Installing OpenCORE AMR Library == 
     17 
     18This instruction applies for '''all platforms''' that OpenCORE supports, '''including Windows'''. For Windows, you need to use MinGW to build the OpenCORE library. 
     19 
     20We tested building the OpenCORE libraries for Linux, MacOS X, Windows (MinGW), and !BlackBerry 10 (BB10). 
     21 
     22=== Building and installing OpenCORE AMR library === 
     23 1. Download the latest [http://sourceforge.net/projects/opencore-amr/files/opencore-amr/ opencore-amr] tarball. We tested with version 0.1.3. 
     24 1. Unpack the tarballs to a directory: 
     25 {{{ 
     26$ cd my_build_directory 
     27$ tar xzf opencore-amr-0.1.3.tar.gz 
     28$ 
     29 }}} 
     30 1. Run configure. Add {{{--prefix}}} to install the library to an alternate directory (such as your home folder) instead of to the system wide {{{/usr}}} directory: 
     31 {{{ 
     32$ ./configure --prefix=/home/foo 
     33 }}} 
     34 1. Build and install: 
     35 {{{ 
     36$ make && make install 
     37 }}} 
     38 
     39=== Adding AMR-WB Support === 
     40The OpenCORE AMR tarball contains AMR-NB encoder and decoder, but only AMR-WB decoder. We have to install AMR-WB encoder separately: 
     41 1. Download the latest [http://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/ vo-amrwbenc] tarball. We tested with version 0.1.3 
     42 1. Unpack the tarballs to a directory: 
     43 {{{ 
     44$ cd my_build_directory 
     45$ tar xzf vo-amrwbenc-0.1.3.tar.gz 
     46$ 
     47 }}} 
     48 1. Run configure. If you use {{{--prefix}}}, make sure it has the same prefix as the one you used when configuring opencore-amr library: 
     49 {{{ 
     50$ ./configure --prefix=/home/foo 
     51 }}} 
     52 1. Build and install: 
     53 {{{ 
     54$ make && make install 
     55 }}} 
     56 
     57=== Testing The Installation === 
     58To verify, make sure '''include''' directory in the installation directory contains these files. Suppose you use {{{--prefix=/home/foo}}}, then: 
     59 
     60 {{{ 
     61$ ls /home/foo/include 
     62opencore-amrnb  opencore-amrwb  vo-amrwbenc 
     63 }}} 
     64 
     65[[BR]] 
     66== Adding AMR Support in PJSIP == 
     67 
     68=== Make Build System (MacOS X, Linux, BB10, etc.) === 
     69 1. In the pjproject directory, run {{{configure}}} script, specifying the installation directory of OpenCORE codec to the {{{--with-opencore-amr}}} option: 
     70 {{{ 
     71$ ./configure --with-opencore-amr=/home/foo 
     72 }}} 
     73 1. Check the output of {{{configure}}} command, make sure that the codecs are detected: 
     74 {{{ 
     75checking for OpenCORE AMR installations.. 
     76Using OpenCORE AMR prefix... /home/foo 
     77... 
     78... 
     79OpenCORE AMR-NB library found, AMR-NB support enabled 
     80... 
     81... 
     82OpenCORE AMR-WB library found, AMR-WB support enabled 
     83 }}} 
     84 1. If the codecs are not enabled, that means the {{{configure}}} script were unable to find some files in the specified directory. Check the screen output again to see what were missing, and rebuild or reinstall the OpenCORE libraries if necessary. 
     85 1. Build PJSIP: 
     86 {{{ 
     87$ make dep && make clean && make 
     88 }}} 
     89 1. PJSIP is now built with OpenCORE AMR support 
     90 
     91=== Windows === 
     92 
     93 1. Add your installed OpenCORE directories to Visual Studio include and lib paths. You should know how to do this. 
     94 1. Configure and build pjsip with Visual Studio: 
     95   1. Download the latest pjproject 
     96   1. Add this to your {{{config_site.h}}}: 
     97     {{{ 
     98#define PJMEDIA_HAS_OPENCORE_AMRNB_CODEC 1 
     99/* And if you want to have AMR-WB support: */ 
     100#define PJMEDIA_HAS_OPENCORE_AMRWB_CODEC 1 
     101     }}} 
     102   1. Build the pjproject solution. 
     103   1. The AMR-NB (and AMR-WB) codecs are now available ready to be used. 
     104 
     105[[BR]] 
     106== Testing PJSIP For OpenCORE AMR Support == 
     107 
     108 1. Run {{{pjsua}}} 
     109 1. List the codecs with {{{Cp}}} command from pjsua console: 
     110 {{{ 
     111>>> Cp 
     112List of audio codecs: 
     113  ... 
     114  128   AMR/8000/1 
     115  128   AMR-WB/8000/1 
     116  ... 
     117 
     118List of video codecs: 
     119  ... 
     120 
     121Enter codec id and its new priority (e.g. "speex/16000 200", "H263 200"), 
     122or empty to cancel. 
     123Codec name ("*" for all) and priority:  
     124Done 
     125>>> 
     126 }}} 
     127 
     128 
     129 
     130{{{ 
     131#!html 
     132<!-- MAIN TABLE END --> 
     133</td></tr></table> 
     134}}} 
     135