Hello Benny,
Last week if been trying to make the "Simple PJSUA" without the soundcard,
but with a "Memory/Buffer-based Capture Port" and a "Memory/Buffer-based
Playback Port", but it don't get it working, and also i don't really know if
about what i do is correct. E.g. do i also have to create a conference
bridge in the "Simple PJSUA" or is it already created in the PJSUA library.
ALso i don's know about clearing and deleting what object at the end of the
program.
Is it possible that you modify the "Simple PJSUA" and send this file to me?
For you it is propably very easy and propably does not take much time.
I would very much appreciate it. When i have such a working example, i'm
pretty sure that i then can create the things we like to make.
So if possible modify the PJSUA in such a way that the audio in received
into a callback function where the audio bytes are e.g. only send to 'cout'.
And for the other audio direction, to have a callback funtion where e.g. you
have an array of nn bytes which are cylic send into the pjsip stack.
I hope you can help me.
Regards,
B. van Klinken
-----Original Message-----
From: pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org]On Behalf Of Benny Prijono
Sent: 07-09-21 16:37
To: pjsip embedded/DSP SIP discussion
Subject: Re: [pjsip] Example "Simple PJSUA" without soundcard
B. van Klinken wrote:
Hello Benny,
Thanks, i had seen the pages already, but somehow it's not clear for me
how
to realize the requested functionality (my problem).
I understood that i had to use a splitcomb.
You don't have to, actually. You only need to use splitcomb when
your application wants to actively get and put frames from/to pjmedia.
Alternatively, you can let pjmedia get and put frames from/to your
application instead. To do this, you'll just need to implement a
pjmedia_port, and provide two callbacks (get_frame and put_frame) to
be called by pjmedia. Then register your media port to the
conference bridge by using pjsua_conf_add_port(). This in fact is
the easiest way to manipulate audio frames.
See playsine.c in samples directory for a simple pjmedia_port
implementation.
I think that it must be for you only a couple of minutes and copy/paste to
modify the "Simple PJSUA", where it works with external data (e.g. store
info a memory bufer and read from another memory buffer.
For a splitcomb sample, see stereo_demo() in pjsua_app.c.
For pjmedia_port's that operate on buffer, see mem_capture.c and
mem_player.c in pjmedia. There are a whole bunch of other
pjmedia_port implementations to look at in pjmedia, of course.
cheers,
-benny
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
B. van Klinken wrote:
Hello Benny,
Last week if been trying to make the "Simple PJSUA" without the soundcard,
but with a "Memory/Buffer-based Capture Port" and a "Memory/Buffer-based
Playback Port", but it don't get it working, and also i don't really know if
about what i do is correct. E.g. do i also have to create a conference
bridge in the "Simple PJSUA" or is it already created in the PJSUA library.
ALso i don's know about clearing and deleting what object at the end of the
program.
Conference bridge is always created internally by PJSUA-LIB, which
Simple-PJSUA is based on.
Is it possible that you modify the "Simple PJSUA" and send this file to me?
For you it is propably very easy and propably does not take much time.
There are couple of FAQ entries relevant to this, please check it out:
This is about plugging a media port into PJSUA's conference bridge:
http://www.pjsip.org/trac/wiki/FAQ#inband-dtmf
This is about manipulating audio samples using callback:
http://www.pjsip.org/trac/wiki/FAQ#audio-man
You're probably right that it won't take much time for me to write a
complete program for you, but once everybody asks for the same
thing, I won't be having much time left to do anything else! So lets
start with the samples from the FAQ and work on the issues.
regards,
-benny
I would very much appreciate it. When i have such a working example, i'm
pretty sure that i then can create the things we like to make.
So if possible modify the PJSUA in such a way that the audio in received
into a callback function where the audio bytes are e.g. only send to 'cout'.
And for the other audio direction, to have a callback funtion where e.g. you
have an array of nn bytes which are cylic send into the pjsip stack.
I hope you can help me.
Regards,
B. van Klinken