To compile PJSIP with bdIMAD support in version 2.1 it is necessary to manually performing those modifications already present in version 2.x.
Once the PJSIP project 2.1 has been downloaded from the PJSIP website, it is necessary to follow these additional steps to compile PJSIP and PJSUA with bdIMAD support. For general PJSIP compilation issues please refers to PJSIP wiki.
To compile PJSIP 2.1 with bdIMAD support follow these steps:
1] Create (or modify if present) the file config_site.h
in the directory /pjlib/include/pj
as below, in order to enable bdIMAD support and disable other I/O audio libraries:
1 2 3 4 5 | #include "config_site_sample.h" #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_WMME 0 #define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_BDIMAD 1 |
#include "config_site_sample.h" #define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_WMME 0 #define PJMEDIA_AUDIO_DEV_HAS_COREAUDIO 0 #define PJMEDIA_AUDIO_DEV_HAS_BDIMAD 1
Only for bdIMAD 2.0.0-beta, for following step use:
– bdimad.h
located in the folder Modified_Files/pjsip
of the downloaded package for Windows.
– bdimad_dev.c
located in the folder Modified_Files/pjsip
of the downloaded package for Windows.
2] Create the directory third_party/bdsound/include
and copy bdimad.h
within this directory.
3] Add the created directory to the project pjmedia_audiodev
, in order to include the header file bdimad.h
, that is located under the directory ../../third_party/bdsound/include
4] Create a directory containing the bdIMADpj.lib
and bdClientValidation.lib
files from bdSound and link these libraries to PJSUA project;
5] Copy the file bdimad_dev.c
from the SRC_Files_for_PJSIP_2.1 folder into the directory /pjmedia/src/pjmedia-audiodev/
and add it to the pjmedia_audiodev project
6] Copy errno.c
and audiodev.c
from the SRC_Files_for_PJSIP_2.1 folder into the same directory /pjmedia/src/pjmedia-audiodev/
7] Copy and overwrite errno.h
and config.h
from the SRC_Files_for_PJSIP_2.1 folder into /pjmedia/include/pjmedia-audiodev.h
8] Compile the whole PJSIP project;
9] Copy bdIMADpj.dll
into the folder containing the PJSUA executable (/pjsip-apps/bin
)
10] To start the PJSUA application be sure to disable the following feature in PJSIP application, passing to PJSUA executable the following command line arguments: --ec-tail=0 --no-vad --capture-lat=0 --playback-lat=0
11] Launch PJSUA application (be sure that the bdIMADpj.dll
is reachable from the executable)