4

I'm building a VOIP application on Android using PJSIP library.

I was trying to enable OPUS codec since OPUS was supported in PJSIP from v2.5.

I've followed the following link to configure OPUS on PJSIP.

I inserted #define PJMEDIA_HAS_OPUS_CODEC 1 in config_site_sample.h file to enable the OPUS codec.

But when I was trying to build PJSIP, I was getting the following error

../src/pjmedia-codec/opus.c:31:23: fatal error: opus/opus.h: No such file or directory
 #include <opus/opus.h>
                       ^
compilation terminated.

Am I doing anything wrong? What is the actual procedure to enable OPUS codec in PJSIP?

Samik Bandyopadhyay
  • 858
  • 1
  • 11
  • 19

1 Answers1

2

you have to set the compiler-flag --with-opus=[absolute-path-to]/opus-dev-lib like described here: https://trac.pjsip.org/repos/ticket/1904

Don't change the static variables in the source code.

Jeyhey
  • 490
  • 3
  • 16
  • Thanks for the response. I'll try it and update you on the same. – Samik Bandyopadhyay Jul 22 '16 at 02:40
  • I followed the steps and got the following error during the pjsip 2.5.1 build. I was using opus-1.1.3. – Samik Bandyopadhyay Jul 22 '16 at 07:47
  • jni/../celt/entcode.h:112: error: undefined reference to '__clzsi2' jni/../src/opus_decoder.c:412: error: undefined reference to '__clzsi2' jni/../src/opus_decoder.c:815: error: undefined reference to '__gnu_thumb1_case_sqi' jni/../celt/mathops.h:151: error: undefined reference to '__clzsi2' jni/../celt/kiss_fft.c:548: error: undefined reference to '__gnu_thumb1_case_uhi' jni/../silk/Inlines.h:123: error: undefined reference to '__aeabi_lmul' collect2: error: ld returned 1 exit status – Samik Bandyopadhyay Jul 22 '16 at 07:54
  • The issue got fixed by upgrading to pjsip-2.5.5. Thanks. – Samik Bandyopadhyay Jul 22 '16 at 12:56
  • @SamikBandyopadhyay Did you resolve the problem for enabling opus codec into pjsip ? – Nandhakumar Kittusamy Jan 23 '17 at 10:06
  • I followed the following link to fix the issue on PJSIP 2.5.5: https://trac.pjsip.org/repos/ticket/1904 – Samik Bandyopadhyay Jan 28 '17 at 19:39