[pjsip] manipulation media frames using pjsua/pjmedia

MatzeMuc86 matzemuc86 at gmail.com
Tue Apr 19 02:56:15 CDT 2011

Hello pjsip-team,

I still try to implement the idea of spartial hearing into the pjsip
conference. I tryed a lot and got it working manually by opening a
wav_player port, getting the sound frames manually in a loop and
putting the new, special stereo frames into a 2 channel wav_writer
port. Therefore I already integrated a convolution engine. So far
everything works fine.

Nevertheless the next step is to integrate this feature into the pjsua
application and running the convolution part automatically (with the
master port/clock !?). I primarly worked with the pjmedia lib and I am
not sure where to integrate the convolution part best in pjsua.
I have to take care that all media ports are opend in stereo mode. I
do this by using the parameter "--stereo" and tested the channel
numbers every time the "pjmedia_conf_add_port" function is called.
Which function do you recommend to implement the convolution part. The
best case would be to get a pointer to the media port (and some
details like size of the frame + channel number, to be sure). If I get
a media port pointer + the size + knowing it is stereo, I can take the
frame (left and right part included) and put it to my convolver which
will overwrite the value of the actual frame => spartial hearing is
integrated :-).

I saw that sometimes links use the pjsua_conf_connect function but
sometimes the pjsua_conf_add_port function. I'm not sure what the
difference by using those function is or when to use which one of

Thanks for support

More information about the pjsip mailing list